from communicating machines to graphical choreographies
play

From Communicating Machines to Graphical Choreographies Julien - PowerPoint PPT Presentation

From Communicating Machines to Graphical Choreographies Julien Lange based on joint works with L. Bocchi, E. Tuosto, and N. Yoshida May 2015 L. Bocchi, J. Lange, E. Tuosto, N. Yoshida From Communicating Machines to Graphical Choreographies


  1. From Communicating Machines to Graphical Choreographies Julien Lange based on joint works with L. Bocchi, E. Tuosto, and N. Yoshida May 2015 L. Bocchi, J. Lange, E. Tuosto, N. Yoshida From Communicating Machines to Graphical Choreographies

  2. alignment separation cohesion Single bird » local behaviour » CFSM Flock » global behaviour » choreography L. Bocchi, J. Lange, E. Tuosto, N. Yoshida From Communicating Machines to Graphical Choreographies

  3. alignment separation cohesion Single bird » local behaviour » CFSM Flock » global behaviour » choreography L. Bocchi, J. Lange, E. Tuosto, N. Yoshida From Communicating Machines to Graphical Choreographies

  4. Introduction § Parts of distributed systems change/evolve, not always in a coordinated way, § these changes are often not documented. § Service oriented systems are sometimes composed dynamically, § it is often unclear how complex the overall system has become. § Cognizant’s Zero Deviation Lifecyle Business Unit. A global point of view of a distributed system is essential for top-level management. L. Bocchi, J. Lange, E. Tuosto, N. Yoshida From Communicating Machines to Graphical Choreographies

  5. Choreography Project Project Project Local Type 1 Local Type i Local Type n Validate Validate Validate Process 1 Process i Process n § Choreography-driven development, cf. Multiparty Session Types top-down approach (POPL ’08 & ESOP’12) § Not applicable without a priori knowledge of a choreography L. Bocchi, J. Lange, E. Tuosto, N. Yoshida From Communicating Machines to Graphical Choreographies

  6. Choreography Local Type 1 Local Type i Local Type n Validate Validate Validate Process 1 Process i Process n § Choreography-driven development, cf. Multiparty Session Types top-down approach (POPL ’08 & ESOP’12) § Not applicable without a priori knowledge of a choreography § Our goal: from Communicating Finite-State Machines to Global Graphs L. Bocchi, J. Lange, E. Tuosto, N. Yoshida From Communicating Machines to Graphical Choreographies

  7. Background: CFSMs B 0 AB ? orange A 0 AB ? apple İ AB ! apple AB ! orange ... ... B 1 B 2 A 1 A 2 AB ? apple AB ! apple ... ... AB ? drink AB ! drink AB ! orange � B 3 AB ? orange A 3 BA ! orange A B “On Communicating Finite-State Machines”, Brand & Zafiropulo (’83) L. Bocchi, J. Lange, E. Tuosto, N. Yoshida From Communicating Machines to Graphical Choreographies

  8. Background: CFSMs B 0 AB ? orange A 0 AB ? apple İ AB ! apple AB ! orange apple ... ... B 1 B 2 A 1 A 2 AB ? apple AB ! apple ... ... AB ? drink AB ! drink AB ! orange � B 3 AB ? orange A 3 BA ! orange A B “On Communicating Finite-State Machines”, Brand & Zafiropulo (’83) L. Bocchi, J. Lange, E. Tuosto, N. Yoshida From Communicating Machines to Graphical Choreographies

  9. Background: CFSMs B 0 AB ? orange A 0 AB ? apple İ AB ! apple AB ! orange orange apple ... ... B 1 B 2 A 1 A 2 AB ? apple AB ! apple ... ... AB ? drink AB ! drink AB ! orange � B 3 AB ? orange A 3 BA ! orange A B “On Communicating Finite-State Machines”, Brand & Zafiropulo (’83) L. Bocchi, J. Lange, E. Tuosto, N. Yoshida From Communicating Machines to Graphical Choreographies

  10. Background: CFSMs B 0 AB ? orange A 0 AB ? apple İ AB ! apple AB ! orange orange apple ... ... B 1 B 2 A 1 A 2 AB ? apple AB ! apple ... ... AB ? drink AB ! drink AB ! orange � B 3 AB ? orange A 3 BA ! orange A B “On Communicating Finite-State Machines”, Brand & Zafiropulo (’83) L. Bocchi, J. Lange, E. Tuosto, N. Yoshida From Communicating Machines to Graphical Choreographies

  11. Background: CFSMs B 0 AB ? orange A 0 AB ? apple İ AB ! apple AB ! orange orange ... ... B 1 B 2 A 1 A 2 AB ? apple AB ! apple ... ... AB ? drink AB ! drink AB ! orange � B 3 AB ? orange A 3 BA ! orange A B “On Communicating Finite-State Machines”, Brand & Zafiropulo (’83) L. Bocchi, J. Lange, E. Tuosto, N. Yoshida From Communicating Machines to Graphical Choreographies

  12. Background: CFSMs B 0 AB ? orange A 0 AB ? apple İ AB ! apple AB ! orange ... ... B 1 B 2 A 1 A 2 AB ? apple orange AB ! apple ... ... AB ? drink AB ! drink AB ! orange � B 3 AB ? orange A 3 BA ! orange A B “On Communicating Finite-State Machines”, Brand & Zafiropulo (’83) L. Bocchi, J. Lange, E. Tuosto, N. Yoshida From Communicating Machines to Graphical Choreographies

  13. Background: CFSMs B 0 AB ? orange A 0 AB ? apple İ AB ! apple AB ! orange ... ... B 1 B 2 A 1 A 2 AB ? apple orange orange AB ! apple ... ... AB ? drink AB ! drink AB ! orange � B 3 AB ? orange A 3 BA ! orange A B “On Communicating Finite-State Machines”, Brand & Zafiropulo (’83) L. Bocchi, J. Lange, E. Tuosto, N. Yoshida From Communicating Machines to Graphical Choreographies

  14. Background: CFSMs B 0 AB ? orange A 0 AB ? apple İ AB ! apple AB ! orange ... ... B 1 B 2 A 1 A 2 AB ? apple orange orange orange AB ! apple ... ... AB ? drink AB ! drink AB ! orange � B 3 AB ? orange A 3 BA ! orange A B “On Communicating Finite-State Machines”, Brand & Zafiropulo (’83) L. Bocchi, J. Lange, E. Tuosto, N. Yoshida From Communicating Machines to Graphical Choreographies

  15. Background: CFSMs B 0 AB ? orange A 0 AB ? apple İ AB ! apple AB ! orange ... ... B 1 B 2 A 1 A 2 AB ? apple orange orange orange orange AB ! apple ... ... AB ? drink AB ! drink AB ! orange � B 3 AB ? orange A 3 BA ! orange A B “On Communicating Finite-State Machines”, Brand & Zafiropulo (’83) L. Bocchi, J. Lange, E. Tuosto, N. Yoshida From Communicating Machines to Graphical Choreographies

  16. Background: CFSMs B 0 AB ? orange A 0 AB ? apple İ AB ! apple AB ! orange ... ... B 1 B 2 A 1 A 2 AB ? apple orange orange orange orange orange AB ! apple ... ... AB ? drink AB ! drink AB ! orange � B 3 AB ? orange A 3 BA ! orange A B “On Communicating Finite-State Machines”, Brand & Zafiropulo (’83) L. Bocchi, J. Lange, E. Tuosto, N. Yoshida From Communicating Machines to Graphical Choreographies

  17. Background: CFSMs B 0 AB ? orange A 0 AB ? apple İ AB ! apple AB ! orange ... ... B 1 B 2 A 1 A 2 AB ? apple orange orange orange orange orange orange AB ! apple ... ... AB ? drink AB ! drink AB ! orange � B 3 AB ? orange A 3 BA ! orange A B “On Communicating Finite-State Machines”, Brand & Zafiropulo (’83) L. Bocchi, J. Lange, E. Tuosto, N. Yoshida From Communicating Machines to Graphical Choreographies

  18. Global Graphs AB ! bwin A 0 A 1 AC ! cwin B 0 BA ! sig BA ? sig CA ? msg AB ? bwin CB ? blose A 2 A 3 C Ñ D : busy AD ! free B 1 B 2 BC ! close A Ñ C : cwin A Ñ B : bwin CA ? msg BA ? sig Bob Alice A 4 C Ñ B : blose B Ñ C : close AD ? free C 0 BC ? close D 0 D 1 B Ñ A : sig CD ! busy CD ? busy CA ! msg C Ñ A : msg AC ? cwin CB ! blose Dave C 2 C 1 C 3 AC ? cwin CD ! busy A Ñ D : free CD ! busy C 4 C 5 Carol CB ! blose Four Player Game BC ? close L. Bocchi, J. Lange, E. Tuosto, N. Yoshida From Communicating Machines to Graphical Choreographies

  19. Global Graphs AB ! bwin A 0 A 1 AC ! cwin B 0 BA ! sig BA ? sig CA ? msg AB ? bwin CB ? blose A 2 A 3 C Ñ D : busy AD ! free B 1 B 2 BC ! close A Ñ C : cwin A Ñ B : bwin CA ? msg BA ? sig Bob Alice A 4 C Ñ B : blose B Ñ C : close AD ? free C 0 BC ? close D 0 D 1 B Ñ A : sig CD ! busy CD ? busy CA ! msg C Ñ A : msg AC ? cwin CB ! blose Dave C 2 C 1 C 3 AC ? cwin CD ! busy A Ñ D : free CD ! busy C 4 C 5 Carol CB ! blose Four Player Game BC ? close L. Bocchi, J. Lange, E. Tuosto, N. Yoshida From Communicating Machines to Graphical Choreographies

  20. Deni´ elou & Yoshida – ESOP’12 CFSMs AB ! bwin A 0 A 1 AC ! cwin B 0 BA ? sig CA ? msg BA ! sig AB ? bwin CB ? blose A 2 A 3 AD ! free B 1 B 2 C Ñ D : busy BC ! close CA ? msg BA ? sig A Ñ C : cwin A Ñ B : bwin Bob Alice A 4 C Ñ B : blose B Ñ C : close AD ? free C 0 BC ? close D 0 D 1 CD ! busy CD ? busy CA ! msg AC ? cwin CB ! blose Dave C 3 C 2 C 1 AC ? cwin B Ñ A : sig CD ! busy CD ! busy C Ñ A : msg Carol C 4 C 5 CB ! blose BC ? close A Ñ D : free L. Bocchi, J. Lange, E. Tuosto, N. Yoshida From Communicating Machines to Graphical Choreographies

  21. Deni´ elou & Yoshida – ESOP’12 CFSMs AB ! bwin A 0 A 1 AC ! cwin B 0 BA ? sig CA ? msg BA ! sig AB ? bwin CB ? blose A 2 A 3 AD ! free B 1 B 2 C Ñ D : busy BC ! close CA ? msg BA ? sig This work A Ñ C : cwin A Ñ B : bwin Bob Alice A 4 C Ñ B : blose B Ñ C : close AD ? free C 0 BC ? close D 0 D 1 CD ! busy CD ? busy CA ! msg AC ? cwin CB ! blose Dave C 3 C 2 C 1 AC ? cwin B Ñ A : sig CD ! busy CD ! busy C Ñ A : msg Carol C 4 C 5 CB ! blose BC ? close A Ñ D : free This work L. Bocchi, J. Lange, E. Tuosto, N. Yoshida From Communicating Machines to Graphical Choreographies

  22. Objectives Two main objectives: § Sound Condition for Safety: generalised multiparty compatibility If S “ p M 1 ,..., M k q is compatible then S is “safe”, i.e., every sent message is eventually received and no deadlock. § Construction of a Global Graph: If G is the global graph constructed from S , then S “ p M 1 ,..., M k q ” p G ç 1 ,..., G ç k q L. Bocchi, J. Lange, E. Tuosto, N. Yoshida From Communicating Machines to Graphical Choreographies

Recommend


More recommend