1 / 50

ASYNCHRONOUS AND DETERMINISTIC OBJECTS

ASYNCHRONOUS AND DETERMINISTIC OBJECTS. Denis CAROMEL, Ludovic HENRIO , Bernard Paul SERPETTE. ASP: Asynchronous Sequential Processes Distributed objects Asynchronous method calls Futures and Wait-by-necessity Determinism properties. I3S - INRIA - Univ Nice Sophia-Antipolis. Context.

odette
Download Presentation

ASYNCHRONOUS AND DETERMINISTIC OBJECTS

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. ASYNCHRONOUS AND DETERMINISTIC OBJECTS Denis CAROMEL, Ludovic HENRIO, Bernard Paul SERPETTE ASP: Asynchronous Sequential Processes Distributed objects Asynchronous method calls Futures and Wait-by-necessity Determinism properties I3S - INRIA - Univ Nice Sophia-Antipolis

  2. Context • V-calculus • Objects, not concurrent • Some concurrent extensions, notour way to determinism • -calculus • Communications, channel based, not object structured • Linear(ized) channels(pobl), no implicit synchronization • Process Networks • Processes, channel based, not object oriented • Determinism, no implicit synchronization Context

  3. Contents • 1 - ASP Principles • 2 - Syntax and Semantics • 3 - Confluence and Determinacy • 4 - Conclusion

  4. a b foo f2 f1 foo g d f3 Structure Active(a) 1- ASP Principles

  5. Sending Requests ( REQUEST ) a b beta.foo(b) foo result=beta.foo(b) 1- ASP Principles

  6. result Sending Requests ( REQUEST ) a b beta.foo(b) foo result=beta.foo(b) 1- ASP Principles

  7. result Serving Requests ( SERVE ) a b Serve(foo);... beta.foo(b) bar foo Serve(foo);... 1- ASP Principles

  8. result foo ... foo Serving Requests ( SERVE ) a b Serve(foo) beta.foo(b) bar Serve(foo);... 1- ASP Principles

  9. End of Service ( ENDSERVICE ) a b value ... foo 1- ASP Principles

  10. End of Service ( ENDSERVICE ) a b ... foo 1- ASP Principles

  11. Sending Results ( REPLY ) a b foo 1- ASP Principles

  12. Sending Results ( REPLY ) a b foo 1- ASP Principles

  13. Wait by Necessity a b delta.send(result) d 1- ASP Principles

  14. result.bar() Wait by Necessity a b delta.send(result) result.bar() d 1- ASP Principles

  15. result.bar() Wait by Necessity a b delta.send(result) result.bar() d 1- ASP Principles

  16. Wait by Necessity a b Futures updates can occur at any time result.bar() d 1- ASP Principles

  17. Contents • 1 - ASP Principles • 2 - Syntax and Semantics • 3 - Confluence and Determinacy • 4 - Conclusion

  18. ASP Syntax : source terms • Imperative V-calculus • ASP parallelism primitives 2- Syntax and Semantics

  19. Service Local Creating Activity Sending request Receiving replies 2- Syntax and Semantics

  20. Contents • 1 - ASP Principles • 2 - Syntax and Semantics • 3 - Confluence and Determinacy • 4 - Conclusion

  21. g b a delta.foo() Compatibility Serves the oldest request on foo OR bar bar d …. Serve(foo,bar) … Serve(foo,gee) foo gee 3- Confluence and Determinacy

  22. P0 P Q R • RSL definition: • Configuration Compatibility: Confluence • Potential services: Execution characterized by the order of Request Senders Compatibility  Confluence 3- Confluence and Determinacy

  23. delta.gee(a) bar delta.bar(a) gee DON(P): Deterministic Object Networks g b d {foo,bar} , {foo,gee} {bar,gee} , {foo} gee bar bar gee 3- Confluence and Determinacy

  24. g {gee}, {f,g} Static DON a d f {foo,bar} , {gee} {gee}, {f,g} {foo,bar} , {gee} {f,g} g g g foo f {foo}, {bar} {foo,bar} , {gee} bar f e b {gee}, {f,g} {bar} , {gee} {gee}, {f,g} gee 3- Confluence and Determinacy

  25. Contents • 1 - ASP Principles • 2 - Syntax and Semantics • 3 - Confluence and Determinacy • 4 - Conclusion

  26. Conclusion • An Asynchronous Object Calculus : • Structured asynchronous activities • Structured communications with futures • Data-driven synchronization • ASP Confluence and Determinacy • Future updates can occur at any time • Execution characterized by the order of request senders • Determinacy of programs communicating over trees, … Thank You Any Question? 4- Conclusion

  27. Perspectives • Approximation of confluence property • Static analysis • Generalization of confluence property • Functional behavior • Scheduling of requests • Extensions of ASP • Group communication • Component calculus • Mobility and other features

  28. Related Work • Futures and Wait by Necessity: • MultiLisp by Halstead • Wait-By-Necessity by Caromel • Determinism: • pobl by Jones, Linearized channels • Process Networks by Kahn and MacQueen • Objects and concurrency: • Obliq, Gordon-Hankin-Lassen • Actors • -calculus, blue calculus, join-calculus

  29. Intermediate Structures • Terms: • Configuration: • Request queue: • Futures list: • Store:

  30. Static DON versus Process Networks a d f {foo,bar} , {gee} {gee}, {f},{g} {foo,bar} , {gee} {f},{g} g put g g foo f {foo,bar} , {gee} {foo}, {bar} bar f e b get {bar} , {gee} {gee}, {f},{g} {gee}, {f},{g} gee

  31. g newact Activity Creation ( NEWACT ) a Active(a) b newact=Active(a)

  32. Objects Topology a b g d

  33. Equivalence Modulo Futures Updates a f1 b g f2 f3

  34. More Futures a d ... result.bar() g b

  35. More Futures a d result.bar() g b

  36. More Futures a d result.bar() g b

  37. More Futures a d result.bar() g b

  38. More Futures a d Futures updates can occur at any time result.bar() g b

  39. Constraint programming, different notion of store Shared memory No internal state in the store (functional agents) Data-driven / constraint driven synchronization: Blocking Ask Determinate case Concurrent Constraint Programming

  40. g Activity Creation ( NEWACT ) a Active(a,s) newact=Active(a,s)

  41. g newact ao.s() Activity Creation ( NEWACT ) a Active(a,s) newact=Active(a,s)

  42. a f1 b g f2 Equivalence Modulo Futures Updates a f1 b g f2 f3

  43. f1 f1 Equivalence Modulo Futures Updates a a f2 f1 b g b g f2 f3

  44. b Store Partitioning

  45. Request Service ( SERVE ) b Serve(foo) bar foo Serve(foo);...

  46. foo Request Service ( SERVE ) b Serve(foo) foo ... bar Serve(foo);...

  47. Objectives • Model of the following features • Object orientation (activities, communications) • Asynchronous communications with futures • Service policy • Confluence and determinacy • Identify sources of non-determinism • Characterize equivalent executions • Give general properties • Find some properties easy to verify

  48. End Of Service ( ENDSERVICE ) b value foo ... bar

  49. ... End Of Service ( ENDSERVICE ) b value foo ... bar

More Related