1 / 11

John A. Thywissen •  Arthur Peters 26 March 2014

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.

delu
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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Cohesive Programming for Distributed Systems:Matching the programming modelto the conceptual model John A. Thywissen • Arthur Peters 26 March 2014

  2. 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

  3. 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

  4. dOrcprograms are cohesive dOrc defattemptRegistration() = username = askUser(“Pick a username”)ifisLegal(username)andisUnique(username)thencreateNewUser(username)elsedisplayError(username) Browser Server Distributed Orc =dOrc

  5. 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

  6. 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

  7. 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

  8. 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

  9. 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)

  10. The right people and right place Personal experience in all three phases

  11. 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)

More Related