Cohesive
This presentation is the property of its rightful owner.
Sponsored Links
1 / 11

John A. Thywissen •  Arthur Peters 26 March 2014 PowerPoint PPT Presentation


  • 48 Views
  • Uploaded on
  • Presentation posted in: General

Cohesive Programming for Distributed Systems: Matching the programming model to the c onceptual model. John A. Thywissen •  Arthur Peters 26 March 2014. Some distributed problems are cohesive.

Download Presentation

John A. Thywissen •  Arthur Peters 26 March 2014

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


John a thywissen arthur peters 26 march 2014

Cohesive Programming for Distributed Systems:Matching the programming modelto the conceptual model

John A. Thywissen • Arthur Peters

26 March 2014


Some distributed problems are cohesive

Some distributed problems are cohesive

defattemptRegistration() = username = askUser(“Pick a username”)ifisLegal(username)andisUnique(username)thencreateNewUser(username)elsedisplayError(username)

A cohesive distributedactivity is conceptually an individual operation


Current techniques shatter cohesion

Current techniques shatter cohesion

Browser

Server

defattemptRegistration() = username = askUser(“Pick a username”)

def callback(success) =ifnot successthendisplayError(username)

ifisLegal(username)thencreateIfUnique(username, callback)else   callback(false)

remotedef

createIfUnique(username)

remotedef

createIfUnique(username) =ifisUnique(username)thencreateNewUser(username)

return trueelsereturn false


D o rc programs are cohesive

dOrcprograms are cohesive

dOrc

defattemptRegistration() = username = askUser(“Pick a username”)ifisLegal(username)andisUnique(username)thencreateNewUser(username)elsedisplayError(username)

Browser

Server

Distributed Orc =dOrc


Execution of dorc example

Execution of dOrc example

username = askUser(“Pick a username”)

b = isUnique(username)

ifb then

createNewUser(username)

else

displayError(username)

isUnique

displayError

askUser

createNewUser

username

username

b


Values have location and policy sets

Values have location and policy sets

𝓁t(v) = { A, B }

𝓅(v) = { A, B, C }

Invariant:

∀v.∀t. 𝓁t(v) ⊆ 𝓅(v)

A

B

v

v

D

C


The call site rule uses policy sets

For a call: M(x1, ..., xn)

P = 𝓅(M) ∩ 𝓅(x1) ∩ ... ∩ 𝓅(xn)

Move to any location in P and execute.

Fail if there is no such location.

The call site rule uses policy sets

A

B

v

v

D

C


Optimization opportunities abound

For a call: M(x1, ..., xn)

Avoid communication

Lt= 𝓁t(M) ∩ 𝓁t(x1) ∩ ... ∩ 𝓁t(xn)

∀t. 𝓁t(+) = All locations

transform.applyTo(image)

sizeof(transform) ≪ sizeof(image)

Optimization opportunities abound

A

B

v

v

D

C


Optimization opportunities abound1

x = 1 + 2

displayError(x)

Optimization opportunities abound

username = askUser(“Pick a username”)

move to server with username

b = isUnique(username)

if b then

createNewUser(username)

move to browser

else

move to browser

displayError(username)

x = f(y)

M(x)


The r ight people and right place

The right people and right place

Personal experience in all three phases


Cohesive programming for distributed systems

Cohesive Programming for Distributed Systems

defattemptRegistration() =

username = askUser(“Pick a username”)

ifisLegal(username)

andisUnique(username)

then

createNewUser(username)

else

displayError(username)

isUnique

askUser

displayError

createNewUser

username

username

P = 𝓅(M) ∩ 𝓅(x1) ∩ ... ∩ 𝓅(xn)

Lt = 𝓁t(M) ∩ 𝓁t(x1) ∩ ... ∩ 𝓁t(xn)

x = f(y)

M(x)


  • Login