Hernán Melgratti joint work with Roberto Bruni and Ugo Montanari Dipartimento di Informatica - Università di Pisa Flat Committed Join in Join.

Slides:



Advertisements
Similar presentations
©2003, Karl Aberer, EPFL, School of Computer and Communication Sciences Some Requirements for Semantic Web Serivce from CROSSFLOW and OPELIX Karl Aberer.
Advertisements

CommUnity, Tiles and Connectors joint work with Roberto Bruni José Luiz Fiadeiro Antónia Lopes Ugo Montanari Ivan Lanese Dipartimento di Informatica Università.
Connectors and Concurrency joint work with Ugo Montanari Roberto Bruni Dipartimento di Informatica Università di Pisa Dagstuhl Seminar #04241, September.
1 Ivan Lanese Computer Science Department University of Bologna Italy Managing faults and compensations in SOCK Joint work with Claudio Guidi, Fabrizio.
CS 603 Handling Failure in Commit February 20, 2002.
Chapter 12: Coordination Frameworks for Web Services Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns,
Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Fault in the Future Joint work with Gianluigi Zavattaro and Einar Broch Johnsen.
Distributed databases
1 Formal Models for Distributed Negotiations The 2PC in an Extended Pi-Calculus Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela.
Adding Organizations and Roles as Primitives to the JADE Framework NORMAS’08 Normative Multi Agent Systems, Matteo Baldoni 1, Valerio Genovese 1, Roberto.
Dynamic Graph Transformation Systems Hernán Melgratti IMT Lucca Institute for Advance Studies Joint Work with Roberto Bruni Dipartimento di Informatica,
10. Petri Nets Prof. O. Nierstrasz. Roadmap  Definition: —places, transitions, inputs, outputs —firing enabled transitions  Modelling: —concurrency.
1 Nominal Calculi for Transactions: CJOIN Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and Orchestration.
1 The SOCK SAGA Ivan Lanese Computer Science Department University of Bologna Italy Joint work with Gianluigi Zavattaro.
Computer Science Lecture 12, page 1 CS677: Distributed OS Last Class Distributed Snapshots –Termination detection Election algorithms –Bully –Ring.
Systems of Distributed Systems Module 2 -Distributed algorithms Teaching unit 3 – Advanced algorithms Ernesto Damiani University of Bozen Lesson 6 – Two.
1 Nominal Calculi for Transactions: JOIN Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and Orchestration.
1 Formal Models for Distributed Negotiations Description Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias Informaticas.
1 Formal Models for Distributed Negotiations Zero-Safe Nets Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias Informaticas.
Non-blocking Atomic Commitment Aaron Kaminsky Presenting Chapter 6 of Distributed Systems, 2nd edition, 1993, ed. Mullender.
Synchronization Algebras with Mobility for Graph Transformations joint work with Ugo Montanari Dipartimento di Informatica Università di Pisa Ivan Lanese.
CP — Concurrent Programming 12. Petri Nets Prof. O. Nierstrasz Wintersemester 2005 / 2006.
1 SOCK and JOLIE from the formal basis to a service oriented programming language Ivan Lanese Computer Science Department University of Bologna Italy Joint.
Atomic TransactionsCS-4513 D-term Atomic Transactions in Distributed Systems CS-4513 Distributed Computing Systems (Slides include materials from.
Atomic TransactionsCS-502 Fall Atomic Transactions in Distributed Systems CS-502, Operating Systems Fall 2007 (Slides include materials from Operating.
1 Formal Models for Distributed Negotiations Workflows, BizTalk and ZSN Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias.
1 Ugo Montanari Dipartimento di Informatica Università di Pisa Roberto Bruni, GianLuigi Ferrari, Hernan Melgratti, Emilio Tuosto (Pisa) Cosimo Laneve (Bologna)
1 Formal Models for Distributed Negotiations Committed Join Calculus Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias.
1 Formal Models for Distributed Negotiations Exercises Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias Informaticas.
1 Static vs dynamic SAGAs Ivan Lanese Computer Science Department University of Bologna/INRIA Italy.
1 Formal Models for Transactions: Zero Safe Nets Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and.
1 CoMeta, final workshop, /12/2003 Ivan Lanese Dipartimento di Informatica Università di Pisa Ugo Montanari A graphical Fusion Calculus Joint work.
1 Formal Models for Distributed Negotiations From Petri Nets to Join Calculus Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela.
Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Fault in the Future Joint work with Gianluigi Zavattaro and Einar Broch Johnsen.
1 More on Distributed Coordination. 2 Who’s in charge? Let’s have an Election. Many algorithms require a coordinator. What happens when the coordinator.
Modeling Community with Tiles joint work with Ivan Lanese Ugo Montanari Dipartimento di Informatica Università di Pisa Roberto Bruni Dipartimento di Informatica.
1 Programming SAGAs in SOCK Ivan Lanese Computer Science Department University of Bologna Italy Joint work with Gianluigi Zavattaro The SOCK saga.
1 Ivan Lanese Computer Science Department University of Bologna Italy On the expressive power of primitives for compensation handling Joint work with Catia.
An algebra of Connectors for modeling CommUnity with Tiles joint work with Roberto Bruni Ugo Montanari Dipartimento di Informatica Università di Pisa Ivan.
1 Formal Models for Transactions: BizTalk as ZSN Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and.
1 ICS 214B: Transaction Processing and Distributed Data Management Distributed Database Systems.
Calculi for Committed Choices and Compensations Roberto Bruni - Dipartimento di Informatica, Università di Pisa joint work with Gianluigi Ferrari Hernán.
Dipartimento di Informatica Università di Pisa Nested Commits for Mobile Calculi: Extending Join Roberto Bruni, Hernán Melgratti and Ugo Montanari.
1 Formal Models for Distributed Negotiations Introduction Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias Informaticas.
Computer Science Lecture 12, page 1 CS677: Distributed OS Last Class Vector timestamps Global state –Distributed Snapshot Election algorithms.
1 Formal Models for Distributed Negotiations Commit Protocols Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias Informaticas.
Commit Protocols. CS5204 – Operating Systems2 Fault Tolerance Causes of failure: process failure machine failure network failure Goals : transparent:
THE NEXT STEP IN WEB SERVICES By Francisco Curbera,… Memtimin MAHMUT 2012.
Chapter 19 Recovery and Fault Tolerance Copyright © 2008.
The CeNTIE project is supported by the Australian Government through the Advanced Networks Program of the Department of Communications, Information Technology.
Distributed Transactions Chapter 13
Computer Science Lecture 12, page 1 CS677: Distributed OS Last Class Vector timestamps Global state –Distributed Snapshot Election algorithms –Bully algorithm.
PAVANI REDDY KATHURI TRANSACTION COMMUNICATION. OUTLINE 0 P ART I : I NTRODUCTION 0 P ART II : C URRENT R ESEARCH 0 P ART III : F UTURE P OTENTIAL 0 R.
Operating Systems Distributed Coordination. Topics –Event Ordering –Mutual Exclusion –Atomicity –Concurrency Control Topics –Event Ordering –Mutual Exclusion.
Fault Tolerance CSCI 4780/6780. Distributed Commit Commit – Making an operation permanent Transactions in databases One phase commit does not work !!!
Dipartimento di Informatica Università di Pisa Alberto Baragatti, Roberto Bruni, Hernán Melgratti, Ugo Montanari and Giorgio Spagnolo Prototype Platforms.
Lecture 13 Advanced Transaction Models. 2 Protocols considered so far are suitable for types of transactions that arise in traditional business applications,
Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Decidability Results for Dynamic Installation of Compensation Handlers Joint.
Commit Algorithms Hamid Al-Hamadi CS 5204 November 17, 2009.
Distributed Transactions Chapter – Vidya Satyanarayanan.
Modeling a Service and Session Calculus with Hierarchical Graph Transformation Joint work with Roberto Bruni and Andrea Corradini, second part Ugo Montanari.
Mark Stanovich Operating Systems COP Primitives to Build Distributed Applications send and receive Used to synchronize cooperating processes running.
Introduction to Distributed Databases Yiwei Wu. Introduction A distributed database is a database in which portions of the database are stored on multiple.
A client transaction becomes distributed if it invokes operations in several different Servers There are two different ways that distributed transactions.
Atomic Transactions in Distributed Systems
Commit Protocols CS60002: Distributed Systems
Outline Announcements Fault Tolerance.
Assignment 5 - Solution Problem 1
UNIVERSITAS GUNADARMA
Transactions in Distributed Systems
Presentation transcript:

Hernán Melgratti joint work with Roberto Bruni and Ugo Montanari Dipartimento di Informatica - Università di Pisa Flat Committed Join in Join

Workshop Finale Cometa – Dec, 2003 Committed Join (cJoin) Join + primitives for negotiations Syntax: P,Q ::= 0 | x  ŷ  | def D in P | P|Q D,E ::= J  P | D  E J,K ::= x  ŷ  | J|K Processes Definitions Patterns

Workshop Finale Cometa – Dec, 2003 Committed Join (cJoin) Join + primitives for negotiations Syntax: M,N ::= 0 | x  ŷ  | M|N P,Q ::= 0 | x  ŷ  | def D in P | P|Q D,E ::= J  P | D  E J,K ::= x  ŷ  | J|K Processes Definitions Patterns Messages

Workshop Finale Cometa – Dec, 2003 Committed Join (cJoin) Join + primitives for negotiations Syntax: M,N ::= 0 | x  ŷ  | M|N P,Q ::= M | def D in P | P|Q D,E ::= J  P | D  E J,K ::= x  ŷ  | J|K Processes Definitions Patterns Messages

Workshop Finale Cometa – Dec, 2003 Committed Join (cJoin) Join + primitives for negotiations Syntax: M,N ::= 0 | x  ŷ  | M|N P,Q ::= M | def D in P | P|Q | abort | [P:Q] D,E ::= J  P | D  E | J  P J,K ::= x  ŷ  | J|K Processes Definitions Patterns Programmable abort Negotiation Compensation Merge definition Messages

Workshop Finale Cometa – Dec, 2003 Committed Join (cJoin) Operational Semantics (CHAM Style): 0  P|Q  P,Q DEDE  D,E def D in P  D  dn(D), P  dn(D) range(  ) fresh J  P, J   J  P, P  heating and cooling reaction

Workshop Finale Cometa – Dec, 2003 Committed Join (cJoin) Operational Semantics (CHAM Style): 0  P|Q  P,Q DEDE  D,E def D in P  D  dn(D), P  dn(D) range(  ) fresh J  P, J   J  P, P  [P:Q]  {[ P,   Q  ]} Contract P evolves in isolation Compensation Q is kept frozen

Workshop Finale Cometa – Dec, 2003 Committed Join (cJoin) Operational Semantics (CHAM Style): 0  P|Q  P,Q DEDE  D,E def D in P  D  dn(D), P  dn(D) range(  ) fresh J  P, J   J  P, P  [P:Q]  {[ P,   Q  ]} {[ M|def D in 0,   Q  ]}  M Global Resources Commit

Workshop Finale Cometa – Dec, 2003 Committed Join (cJoin) Operational Semantics (CHAM Style): 0  P|Q  P,Q DEDE  D,E def D in P  D  dn(D), P  dn(D) range(  ) fresh J  P, J   J  P, P  [P:Q]  {[ P,   Q  ]} {[ M|def D in 0,   Q  ]}  M {[ abort |P,   Q  ]}  Q Compensation on Abort

Workshop Finale Cometa – Dec, 2003 Committed Join (cJoin) Operational Semantics (CHAM Style): 0  P|Q  P,Q DEDE  D,E def D in P  D  dn(D), P  dn(D) range(  ) fresh J  P, J   J  P, P  [P:Q]  {[ P,   Q  ]} {[ M|def D in 0,   Q  ]}  M {[ abort |P,   Q  ]}  Q J 1 |…|J n  P,  i {[ J i , S i,   Q i  ]}  J 1 |…|J n  P, {[  i S i, P ,   i Q i  ]} Merge n ongoing contracts

Workshop Finale Cometa – Dec, 2003 Example: Mailing List ML  MailingList  k   MLDef

Workshop Finale Cometa – Dec, 2003 Example: Mailing List ML  MailingList  k   MLDef MLDef  def …  in k  add, tell, close  | lst  nil 

Workshop Finale Cometa – Dec, 2003 Example: Mailing List ML  MailingList  k   MLDef MLDef  def …  lst  y  | add  x   …  lst  y  | tell  v   …  lst  y  | close    … in k  add, tell, close  | lst  nil 

Workshop Finale Cometa – Dec, 2003 Example: Mailing List ML  MailingList  k   MLDef MLDef  def …  lst  y  | add  x   def z  v,w   x  v  | y  v,w  in lst  z   lst  y  | tell  v   …  lst  y  | close    … in k  add, tell, close  | lst  nil 

Workshop Finale Cometa – Dec, 2003 Example: Mailing List ML  MailingList  k   MLDef MLDef  def …  lst  y  | add  x   def z  v,w   x  v  | y  v,w  in lst  z   lst  y  | tell  v   [def w   0 in y  v,w  | lst  y  : lst  y  ]  lst  y  | close    … in k  add, tell, close  | lst  nil 

Workshop Finale Cometa – Dec, 2003 Example: Mailing List ML  MailingList  k   MLDef MLDef  def nil  v, w   0  lst  y  | add  x   def z  v,w   x  v  | y  v,w  in lst  z   lst  y  | tell  v   [def w   0 in y  v,w  | lst  y  : lst  y  ]  lst  y  | close    … in k  add, tell, close  | lst  nil 

Workshop Finale Cometa – Dec, 2003 Example: Mailing List ML  MailingList  k   MLDef MLDef  def nil  v, w   0  lst  y  | add  x   def z  v,w   x  v  | y  v,w  in lst  z   lst  y  | tell  v   [def w   0 in y  v,w  | lst  y  : lst  y  ]  lst  y  | close    0 in k  add, tell, close  | lst  nil 

Workshop Finale Cometa – Dec, 2003 Implementing flat cJoin Goal To implement cJoin in Join Key Points Distributed commit of interacting negotiations as a global decision Participants can join dynamically (participants statically unknown) First step Consider flat negotiations Use canonical form of processes Encode canonical flat cJoin processes as Join processes

Workshop Finale Cometa – Dec, 2003 Flat cJoin Negotiations cannot be nested Type system for cJoin Processes: P: 0, P does not contain [_:_] at all P: 1, P may contain [_:_] in the definitions P: 2, P may have and generate flat negotiations Join Processes have type 0 Subject Reduction holds for 0 and 2 Flat cJoin: The sub-calculus of all P: 2

Workshop Finale Cometa – Dec, 2003 Canonical Flat cJoin Inspired by the basic shapes of ZS nets Few elementary definition patterns Any flat process can be written in canonical form Open xŷ Pxŷ P & P: 2 & count(P) = 1 Ord-Mov xŷ Pxŷ P & P: 1 & count(P)  2 Merge-Mov xŷ  Pxŷ  P & P: 0 & count(P)  2 Ord-Join x  ŷ 1  | x  ŷ 2   P & P: 1 & count(P) = 1 Merge-Join x  ŷ 1  |…|x  ŷ n   P & P: 0 & count(P) = 1

Workshop Finale Cometa – Dec, 2003 Has type 2 Has count = 2 Canonical Form: Example def nil  v, w   0  lst  y  | add  x   def z  v,w   x  v  | y  v,w  in lst  z   lst  y  | tell  v   [def w   0 in y  v,w  | lst  y  : lst  y  ]  lst  y  | close    0 in k  add, tell, close  | lst  nil   lst  y  | tell  x   a  y,x   a  y,x   [def w   0 in y  v,w  | lst  y  : lst  y  ]  a  y,x   [def w   0 in def b  v,w,l,y   y  v,w  | l  y  in b  v,w,lst,y  : lst  y  ]

Workshop Finale Cometa – Dec, 2003 Encoding: Main Idea Any message in a negotiation runs in a thread, which is managed by a coordinator Coordinators perform a D2PC protocol [BLM2002]. A variant of the decentralized 2PC with a finite but unknown number of participants When a participant P is ready to commit it has only a partial knowledge of the whole set of participants Only those who directly cooperated with P To commit P must contact all its neighbors and learn the identity of other participants from them

Workshop Finale Cometa – Dec, 2003 Encoding: D2PC Every participant P acts as coordinator During the transaction P builds its own synchronization set L P of cooperating agents When P is ready to commit, P asks readiness to processes in L P (if empty P was isolated and can commit) In doing so, P sends them the set L P Other participants will send to P either a successful reply with their own synchronization sets or a failure message (in this case, failure is then propagated) Successful replies are added to L P The protocol terminates when L P is transitively closed

Workshop Finale Cometa – Dec, 2003 Encoding a negotiation [def z   0 in z  : 0]

Workshop Finale Cometa – Dec, 2003 Encoding a negotiation [def z   0 in z  : 0] A negotiation with one thread

Workshop Finale Cometa – Dec, 2003 Encoding a negotiation [def z   0 in z  : 0] def D A negotiation with one thread A coordinator D to manage z  put : to notify thread completion abt: to notify thread abortion lock: to receive partners’ confirmations state: to set the initial compensation

Workshop Finale Cometa – Dec, 2003 Encoding a negotiation [def z   0 in z  : 0] def D put : to notify thread completion abt: to notify thread abortion lock: to receive partners’ confirmations state: to set the initial compensation Compensation

Workshop Finale Cometa – Dec, 2003 Encoding a negotiation [def z   0 in z  : 0] def D  cmp   0 in state  {cmp}  put : to notify thread completion abt: to notify thread abortion lock: to receive partners’ confirmations state: to set the initial compensation Compensation Set initial compensation

Workshop Finale Cometa – Dec, 2003 Encoding a negotiation [def z   0 in z  : 0] def D  cmp   0 in state  {cmp}  put : to notify thread completion abt: to notify thread abortion lock: to receive partners’ confirmations state: to set the initial compensation z runs in a managed thread

Workshop Finale Cometa – Dec, 2003 Encoding a negotiation [def z   0 in z  : 0] def D  cmp   0 in state  {cmp}  | | def … p  l, ,  in z  put, abt, {lock}  put : to notify thread completion abt: to notify thread abortion lock: to receive partners’ confirmations state: to set the initial compensation z carries the ports of its coordinator z runs in a managed thread

Workshop Finale Cometa – Dec, 2003 Encoding a negotiation [def z   0 in z  : 0] def D  cmp   0 in state  {cmp}  | | def … in z  put, abt, {lock}  put : to notify thread completion abt: to notify thread abortion lock: to receive partners’ confirmations state: to set the initial compensation It consumes managed msgs

Workshop Finale Cometa – Dec, 2003 Encoding a negotiation [def z   0 in z  : 0] def D  cmp   0 in state  {cmp}  | | def z  p, a, l   … in z  put, abt, {lock}  put : to notify thread completion abt: to notify thread abortion lock: to receive partners’ confirmations state: to set the initial compensation It consumes managed msgs z carries the ports of its coordinator

Workshop Finale Cometa – Dec, 2003 Encoding a negotiation [def z   0 in z  : 0] def D  cmp   0 in state  {cmp}  | | def z  p, a, l   … in z  put, abt, {lock}  put : to notify thread completion abt: to notify thread abortion lock: to receive partners’ confirmations state: to set the initial compensation The thread ends

Workshop Finale Cometa – Dec, 2003 Encoding a negotiation [def z   0 in z  : 0] def D  cmp   0 in state  {cmp}  | | def z  p, a, l   p  l, ,  in z  put, abt, {lock}  put : to notify thread completion abt: to notify thread abortion lock: to receive partners’ confirmations state: to set the initial compensation The thread ends D can commit

Workshop Finale Cometa – Dec, 2003 Encoding an abort [def z   abort in z  : 0] def D  cmp   0 in state  {cmp}  | | def z  p, a, l   … in z  put, abt, {lock}  put : to notify thread completion abt: to notify thread abortion lock: to receive partners’ confirmations state: to set the initial compensation The thread aborts

Workshop Finale Cometa – Dec, 2003 Encoding an abort [def z   abort in z  : 0] def D  cmp   0 in state  {cmp}  | | def z  p, a, l   a  in z  put, abt, {lock}  put : to notify thread completion abt: to notify thread abortion lock: to receive partners’ confirmations state: to set the initial compensation The thread aborts D aborts

Workshop Finale Cometa – Dec, 2003 Encoding: Fork and Join x   y  |z 

Workshop Finale Cometa – Dec, 2003 Encoding: Fork and Join x  p,a,l   def D 1  D 2 x   y  |z 

Workshop Finale Cometa – Dec, 2003 Encoding: Fork and Join x  p,a,l   def D 1  D 2 in y  put 1, abt 1, l  {lock 1,lock 2 }  | z  put 2, abt 2, l  {lock 1,lock 2 }  x   y  |z 

Workshop Finale Cometa – Dec, 2003 Encoding: Fork and Join x  p,a,l   def D 1  D 2 in y  put 1, abt 1, l  {lock 1,lock 2 }  | z  put 2, abt 2, l  {lock 1,lock 2 }  | p  l  {lock 1,lock 2 }, {abt 1,abt 2 },  x   y  |z 

Workshop Finale Cometa – Dec, 2003 Encoding: Fork and Join x  p,a,l   def D 1  D 2 in y  put 1, abt 1, l  {lock 1,lock 2 }  | z  put 2, abt 2, l  {lock 1,lock 2 }  | p  l  {lock 1,lock 2 }, {abt 1,abt 2 },  | state 1  {a,abt 2 }  | state 2  {a,abt 1 }  x   y  |z 

Workshop Finale Cometa – Dec, 2003 Encoding: Fork and Join x  p,a,l   def D 1  D 2 in y  put 1, abt 1, l  {lock 1,lock 2 }  | z  put 2, abt 2, l  {lock 1,lock 2 }  | p  l  {lock 1,lock 2 }, {abt 1,abt 2 },  | state 1  {a,abt 2 }  | state 2  {a,abt 1 }  x   y  |z  x  |y   z 

Workshop Finale Cometa – Dec, 2003 Encoding: Fork and Join x  p,a,l   def D 1  D 2 in y  put 1, abt 1, l  {lock 1,lock 2 }  | z  put 2, abt 2, l  {lock 1,lock 2 }  | p  l  {lock 1,lock 2 }, {abt 1,abt 2 },  | state 1  {a,abt 2 }  | state 2  {a,abt 1 }  x   y  |z  y  p 2,a 2,l 2   def D x  |y   z  x  p 1,a 1,l 1  |

Workshop Finale Cometa – Dec, 2003 Encoding: Fork and Join x  p,a,l   def D 1  D 2 in y  put 1, abt 1, l  {lock 1,lock 2 }  | z  put 2, abt 2, l  {lock 1,lock 2 }  | p  l  {lock 1,lock 2 }, {abt 1,abt 2 },  | state 1  {a,abt 2 }  | state 2  {a,abt 1 }  x   y  |z  y  p 2,a 2,l 2   def D in z  put, abt 1, l 1  l 2  {lock}  x  |y   z  x  p 1,a 1,l 1  |

Workshop Finale Cometa – Dec, 2003 Encoding: Fork and Join x  p,a,l   def D 1  D 2 in y  put 1, abt 1, l  {lock 1,lock 2 }  | z  put 2, abt 2, l  {lock 1,lock 2 }  | p  l  {lock 1,lock 2 }, {abt 1,abt 2 },  | state 1  {a,abt 2 }  | state 2  {a,abt 1 }  x   y  |z  y  p 2,a 2,l 2   def D in z  put, abt 1, l 1  l 2  {lock}  | p 1  l 1  l 2  {lock}, {abt,a 2 },  | p 2  l 1  l 2  {lock}, {abt,a 1 },  x  |y   z  x  p 1,a 1,l 1  |

Workshop Finale Cometa – Dec, 2003 Encoding: Fork and Join x  p,a,l   def D 1  D 2 in y  put 1, abt 1, l  {lock 1,lock 2 }  | z  put 2, abt 2, l  {lock 1,lock 2 }  | p  l  {lock 1,lock 2 }, {abt 1,abt 2 },  | state 1  {a,abt 2 }  | state 2  {a,abt 1 }  x   y  |z  y  p 2,a 2,l 2   def D in z  put, abt 1, l 1  l 2  {lock}  | p 1  l 1  l 2  {lock}, {abt,a 2 },  | p 2  l 1  l 2  {lock}, {abt,a 1 },  | state  {a 1,a 2 }  x  |y   z  x  p 1,a 1,l 1  |

Workshop Finale Cometa – Dec, 2003 Encoding: Names [def z  x   x  x  in z  y  : 0]

Workshop Finale Cometa – Dec, 2003 Encoding: Names [def z  x   x  x  in z  y  : 0][def z  x   x  x  in y  y  : 0] 

Workshop Finale Cometa – Dec, 2003 Encoding: Names [def z  x   x  x  in z  y  : 0][def z  x   x  x  in y  y  : 0] **  [y  y  | def z  x   x  x  in 0: 0]

Workshop Finale Cometa – Dec, 2003 Encoding: Names [def z  x   x  x  in z  y  : 0][def z  x   x  x  in y  y  : 0] **  [y  y  | def z  x   x  x  in 0: 0]  yyyy

Workshop Finale Cometa – Dec, 2003 Encoding: Names [def z  x   x  x  in z  y  : 0][def z  x   x  x  in y  y  : 0] **  [y  y  | def z  x   x  x  in 0: 0]  yyyy [def z  x   x  x  in z  z  : 0]

Workshop Finale Cometa – Dec, 2003 Encoding: Names [def z  x   x  x  in z  y  : 0][def z  x   x  x  in y  y  : 0] **  [y  y  | def z  x   x  x  in 0: 0]  yyyy [def z  x   x  x  in z  z  : 0] 

Workshop Finale Cometa – Dec, 2003 Encoding: Names [def z  x   x  x  in z  y  : 0][def z  x   x  x  in y  y  : 0] **  [y  y  | def z  x   x  x  in 0: 0]  yyyy [def z  x   x  x  in z  z  : 0]    …

Workshop Finale Cometa – Dec, 2003 Encoding: Names [def z  x   x  x  in z  y  : 0][def z  x   x  x  in y  y  : 0] **  [y  y  | def z  x   x  x  in 0: 0]  yyyy Definitions have different behaviours depending on received names [def z  x   x  x  in z  z  : 0]    …

Workshop Finale Cometa – Dec, 2003 Encoding: Names A definition is encoded as several definitions: z  x   x  x  z s  x, p, a,l   p  l, , {x  x  }  z z  x, p, a,l   x  x, p, a, l 

Workshop Finale Cometa – Dec, 2003 Encoding: Names A definition is encoded as several definitions: The encoding function takes into account the scope of names: [[ _ ]] S,B z  x   x  x  z s  x, p, a,l   p  l, , {x  x  }  z z  x, p, a,l   x  x, p, a, l 

Workshop Finale Cometa – Dec, 2003 Encoding: Merge Names def b   … in [b  : 0] has two different behaviors: It can commit It can compute with the global reaction rule for b  Merge definitions are encoded with two rules One encoding the commit of the thread The other, the application of the rule inside a negotiation Moreover, the commit behavior is allowed only when parameters are global names

Workshop Finale Cometa – Dec, 2003 Correctness and Completeness Correctness P: 1 and canonical. If P  cJ * P’ with P: 1, then  Q s.t. [[P]] fn(P),   j * Q, and norm(Q)  [[P’]] fn(P’),  Completeness P: 1 and canonical. If [[P]] fn(P),   j * Q and norm(Q) is well-defined, then  P’ s.t. P  cJ P’, and norm(Q)  [[P’]] fn(P’), 

Workshop Finale Cometa – Dec, 2003 Concluding remarks Flat cJoin can be implemented in Join Commit is fully distributed This suggest that full cJoin can be modeled back in Join At commit, a sub-negotiation can generate its parent: new threads, and messages to be delivered at commit On abort, sub-negotiations should finish but not compensate Extension of running implementations of join (Jocaml, Comega, Join-Java)