1 Formal Models for Distributed Negotiations Committed Join Calculus Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias.

Slides:



Advertisements
Similar presentations
Intalio, The Business Process Management CompanyCopyright © 2003 Intalio, Inc. Causality models for WS Choreography
Advertisements

Connectors and Concurrency joint work with Ugo Montanari Roberto Bruni Dipartimento di Informatica Università di Pisa Dagstuhl Seminar #04241, September.
Web Services Transaction Management (WS-TXM) Michael Felderer Digital Enterprise Research Institute
FIPA Interaction Protocol. Request Interaction Protocol Summary –Request Interaction Protocol allows one agent to request another to perform some action.
Models of Concurrency Manna, Pnueli.
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
Methods of Proof Chapter 7, Part II. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound) generation.
ISBN Chapter 3 Describing Syntax and Semantics.
1 Formal Models for Distributed Negotiations The 2PC in an Extended Pi-Calculus Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela.
An Associative Broadcast Based Coordination Model for Distributed Processes James C. Browne Kevin Kane Hongxia Tian Department of Computer Sciences The.
1 Flexible Subtyping Relations for Component- Oriented Formalisms and their Verification David Hurzeler PhD Examination, 9/11/2004.
Adding Organizations and Roles as Primitives to the JADE Framework NORMAS’08 Normative Multi Agent Systems, Matteo Baldoni 1, Valerio Genovese 1, Roberto.
Proof methods Proof methods divide into (roughly) two kinds: –Application of inference rules Legitimate (sound) generation of new sentences from old Proof.
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.
Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Outline Introduction Background Distributed DBMS Architecture Distributed Database.
1 Ivan Lanese Computer Science Department University of Bologna Roberto Bruni Computer Science Department University of Pisa A mobile calculus with parametric.
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.
CP — Concurrent Programming 12. Petri Nets Prof. O. Nierstrasz Wintersemester 2005 / 2006.
A DAPT IST Initial Work on Transactional Composite Web Services and Visual Composition tool Ricardo Jiménez-Peris, Marta Patiño-Martínez Alberto.
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)
Chapter 13: Process Specifications Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley, 2005.
1 Formal Models for Distributed Negotiations Transactions in Linda Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias.
1 Formal Models for Distributed Negotiations Concurrent Languages Translation Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela.
Bridging the gap between Interaction- and Process-Oriented Choreographies Talk by Ivan Lanese Joint work with Claudio Guidi, Fabrizio Montesi and Gianluigi.
Hernán Melgratti joint work with Roberto Bruni and Ugo Montanari Dipartimento di Informatica - Università di Pisa Flat Committed Join in Join.
1 Formal Models for Distributed Negotiations Exercises Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias Informaticas.
1 Ivan Lanese Dipartimento di Informatica Università di Pisa Ugo Montanari From Graph Rewriting to Logic Programming joint work with.
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 Ivan Lanese Computer Science Department University of Pisa Prof. Ugo Montanari Synchronization strategies for global computing Relator: Thesis Progress.
1 Ivan Lanese Computer Science Department University of Bologna Italy Concurrent and located synchronizations in π-calculus.
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.
A Klaim specification of the Handover protocol: logic-based and type-based analysis Michele Loreti and Daniele Gorla Dipartimento di Sistemi e Informatica.
1 Programming SAGAs in SOCK Ivan Lanese Computer Science Department University of Bologna Italy Joint work with Gianluigi Zavattaro The SOCK saga.
1 The Big Picture of Databases We are particularly interested in relational databases Data is stored in tables.
1 Ivan Lanese Computer Science Department University of Bologna Italy On the expressive power of primitives for compensation handling Joint work with Catia.
Describing Syntax and Semantics
Advanced Behavioral Modeling
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.
Business Process Modeling Workflow Patterns Ang Chen July 8, 2005.
490dp Prelude I: Group Membership Prelude II: Team Presentations Tuples Robert Grimm.
1 Formal Models for Distributed Negotiations A Calculus of Compensations Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias.
Calculi for Committed Choices and Compensations Roberto Bruni - Dipartimento di Informatica, Università di Pisa joint work with Gianluigi Ferrari Hernán.
1 Ivan Lanese Computer Science Department University of Bologna Italy Towards a Unifying Theory for Web Services Composition Manuel Mazzara Faculty of.
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.
Chapter 13: Process Specifications Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley, 2005.
An Ontological Framework for Web Service Processes By Claus Pahl and Ronan Barrett.
The GOOD the BAD the UGLY WS-CDL: the GOOD the BAD the UGLY.
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.
KR A Principled Framework for Modular Web Rule Bases and its Semantics Anastasia Analyti Institute of Computer Science, FORTH-ICS, Greece Grigoris.
16/11/ Web Services Choreography Requirements Presenter: Emilia Cimpian, NUIG-DERI, 07April W3C Working Draft.
Course: COMS-E6125 Professor: Gail E. Kaiser Student: Shanghao Li (sl2967)
1 Propositional Logic Limits The expressive power of propositional logic is limited. The assumption is that everything can be expressed by simple facts.
2000 Research Overview Dr. Kim Mens Programming Technology Lab Vrije Universiteit Brussel.
Proof Methods for Propositional Logic CIS 391 – Intro to Artificial Intelligence.
Constraints for Service Contracts Ugo Montanari Università di Pisa, Italy Marzia Buscemi formerly IMT Lucca, Italy Mario Coppo Università di Torino, Italy.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
Rewriting Nested Graphs, through Term Graphs Roberto Bruni, Andrea Corradini, Fabio Gadducci Alberto Lluch Lafuente and Ugo Montanari Dipartimento di Informatica,
Databases We are particularly interested in relational databases
Outline Introduction Background Distributed DBMS Architecture
Presentation transcript:

1 Formal Models for Distributed Negotiations Committed Join Calculus Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias Informaticas (ECI 2003), Buenos Aires, July

Formal Models for Distributed Negotiations2 Our Focus In commercial applications, separately designed and implemented components must interact commit (intermediate) results of long-running activities upon (partial) agreements e.g. e-commerce, on-line auction systems Formal models should avoid ad-hoc proprietary solutions offer alternatives to centralized transaction managers hide the coordination layer (separation of concerns)

Formal Models for Distributed Negotiations3 Distributed Agreements Negotiations / Contracts commit, abort, compensation hierarchical decisions dynamic membership fully distributed control Process cooperation coordination / orchestration / choreography different platforms and policies Data integration unstructured documents in different formats

Formal Models for Distributed Negotiations4 Prerequisites for Modeling Contracts Local and global resources Local sub-contracts and decisions Global results posted upon commit Abort of ongoing contracts All participants must be informed Compensations can be activated Either abort or commit (no divergence) Dynamic joining of participants Contracts can be merged Nested structure of contracts

Formal Models for Distributed Negotiations5 Commitment We have seen different concepts in different areas DataBase transactions Transactional Workflows Transition synchronization PDLs with commit primitives Committed choice languages

Formal Models for Distributed Negotiations6 PDLs with commit Transactions in JavaSpaces and Linda create(x) and commit(x) prefixes event notification TraLinda typed messages (L / H) and atomic prefixing Long running transactions M INI -XLANG asynchronous  -calculus with transactional context context(P,Pf,Pc)

Formal Models for Distributed Negotiations7 Committed Choice Languages Logic programming Non determinism means exhaustive search of successful computations don’t know non-determinism results are produced at the end Concurrent logic / constraint languages limit backtracking to improve efficiency don’t care non-determinism (indeterminism) partial outputs during computation

Formal Models for Distributed Negotiations8 Guarded Horn Clauses Head  Guard | Body Reduce Head to Body if Guard succeeds don’t know when evaluating guards don’t care when selecting clauses whose guards are true Flat guards conjunction of primitive predicates Deep guards (e.g. AKL) both primitive and programmed predicates

Formal Models for Distributed Negotiations9 Our Proposal committed JOIN PDL presentation Non ACID Multiway Open Nesting Flexible Split / Join Programmable commit / abort / compensation Concurrency and distribution Distributed 2PC Different levels of abstraction

Formal Models for Distributed Negotiations10 Why an extension of JOIN Well-known asynchronous calculus Distributed implementations Jocaml Polyphonic C# Analogous to dynamic coloured Petri nets Running D2PC implementation CHAM semantics molecules form solutions enclosed in membranes nesting is free (via membranes) Typed serializability Ongoing Work!

Formal Models for Distributed Negotiations11 Committed JOIN 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 messages programmable abort compensation contract boundaries merge definitions (boards): defined boards must be disjoint from ordinary defined names

Formal Models for Distributed Negotiations12 Committed JOIN Semantics 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 

Formal Models for Distributed Negotiations13 Committed JOIN Semantics 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  ]} compensation is kept frozen contract P can evolve in isolation

Formal Models for Distributed Negotiations14 Committed JOIN Semantics 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 commit global resources

Formal Models for Distributed Negotiations15 Committed JOIN Semantics 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

Formal Models for Distributed Negotiations16 Committed JOIN Semantics 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

Formal Models for Distributed Negotiations17 JOIN vs cJOIN PROPOSITION cJOIN is a conservative extension of JOIN: P  J Q iff P  cJ Q (for P and Q JOIN processes)

Formal Models for Distributed Negotiations18 A Multi-Way Contract …,J  [P:Q],J   …,J  [P:Q],[P  :Q  ] …,J’  [P’:Q’],J’   …,J’  [P’:Q’],[P’  :Q’  ] … …,J 1 |J 2  M, [J 1  :Q  ],[J 2  :Q’  ]  …,J 1 |J 2  M,[M  :Q  |Q’  ] …,[M  :Q  |Q’  ]  …,M 

Formal Models for Distributed Negotiations19 Multi-Level Nesting …,J  [[P 1 :Q 1 ]|[P 2 :Q 2 ]:Q],J   …,J  [[P 1 :Q 1 ]|[P 2 :Q 2 ]:Q], [ [P 1  :Q 1  ] | [P 2  :Q 2  ] : Q  ] … …,[[M 1  :Q 1  ]|[P 2  :Q 2  ]:Q  ]  …,[ M 1  | [P 2  :Q 2  ] : Q  ] … …,[ M 1  | [M 2  :Q 2  ] : Q  ]  …,[ M 1  | M 2  : Q  ]  …,M 1 ,M 2 

Formal Models for Distributed Negotiations20 Nested Abort …,J  [[P 1 :Q 1 ]|[P 2 :Q 2 ]:Q],J   …,J  [[P 1 :Q 1 ]|[P 2 :Q 2 ]:Q], [ [P 1  :Q 1  ] | [P 2  :Q 2  ] : Q  ] … …,[ [abort :Q 1  ] | [P 2  :Q 2  ] : Q  ]  …,[ Q 1  | [P 2  :Q 2  ] : Q  ] … …,[ M 1  | [M 2  :Q 2  ] : Q  ]  …,[ M 1  | M 2  : Q  ]  …,M 1 ,M 2 

Formal Models for Distributed Negotiations21 Nested Abort II …,J  [[P 1 :Q 1 ]|P 2 :Q],J   …,J  [[P 1 :Q 1 ]|P 2 :Q], [ [P 1  :Q 1  ] | P 2  : Q  ] … …,[[P 1  :Q 1  ]|abort :Q  ]  QQ

Formal Models for Distributed Negotiations22 Hotel Booking H  def WaitBooking  [ def request  o   o  $  | price  $   price  $  | confirm  v   BookedRoom  v   price  $   abort in offeringRoom  request,confirm  : Q ]  BookedRoom  v   … in WaitBooking | …

Formal Models for Distributed Negotiations23 Hotel Booking H  def WaitBooking  [ def request  o   o  $  | price  $   price  $  | confirm  v   BookedRoom  v   price  $   abort in offeringRoom  request,confirm  : Q ]  BookedRoom  v   … in WaitBooking | … C  def BookingHotel  [def hotelMsg  r,c   def offer  $   c  visa  | HotelFound  offer  $   abort in r  offer  in searchRoom  hotelMsg  : Q’ ] in BookingHotel | …

Formal Models for Distributed Negotiations24 Hotel Booking H  def WaitBooking  [ def request  o   o  $  | price  $   price  $  | confirm  v   BookedRoom  v   price  $   abort in offeringRoom  request,confirm  : Q ]  BookedRoom  v   … in WaitBooking | … C  def BookingHotel  [def hotelMsg  r,c   def offer  $   c  visa  | HotelFound  offer  $   abort in r  offer  in searchRoom  hotelMsg  : Q’ ] in BookingHotel | … HB  def searchRoom  hm  | offeringRoom  r,c   hm  r,c  in H | C

Formal Models for Distributed Negotiations25 Hotel Booking …, WaitBooking, BookingHotel   …, […, offeringRoom  request,confirm  : Q ], […, searchRoom  hotelMsg  : Q’]  …, […, hotelMsg  request,confirm  : Q | Q’]  …, […, request  offer  : Q | Q’]  …, […, offer  $ , price  $  : Q | Q’]  …, […, confirm  visa , HotelFound, price  $  : Q | Q’]  …, […, BookedRoom  visa , HotelFound : Q | Q’]  …, BookedRoom  visa , HotelFound

Formal Models for Distributed Negotiations26 Trip Booking I H as before F  def WaitBooking  [ def request  o   o  $  | price  $   price  $  | confirm  v   BookedFlight  v   price  $   abort in offeringFlight  request,confirm  : Q ]  BookedFlight  v   … in WaitBooking | … local name, different from homonym name in H

Formal Models for Distributed Negotiations27 Trip Booking II C  def hotelOK  fc  | flightOK  hc   fc | hc  BookingHotel  [def hotelMsg  r,c   def offer  $   c  visa  | hotelOK  flightConf   offer  $   abort  flightConf  HotelFound in r  offer  in searchRoom  hotelMsg  : Q’ ]  BookingFlight  [def flightlMsg  r,c   def offer  $   c  visa  | flightOK  hotelConf   offer  $   abort  hotelConf  FlightFound in r  offer  in searchFlight  flightMsg  : Q’’ ] in BookingHotel | BookingFlight | … TB  def searchRoom  hm  | offeringRoom  r,c   hm  r,c   searchFlight  fm  | offeringFlight  r,c   fm  r,c  in H | F | C both needed to commit

Formal Models for Distributed Negotiations28 Matching the Prerequisites Local and global resources Local sub-contracts and decisions Global results posted upon commit Abort of ongoing contracts All participants must be informed Compensations can be activated Either abort or commit (no divergence) Dynamic joining of participants Contracts can be merged Nested structure of contracts membranes and scoping rules nesting commit reaction several variants of abort would limit the expressiveness merge definitions (boards) multi-level

Formal Models for Distributed Negotiations29 ZS nets, JOIN and cJOIN ZS nets can be encoded in JOIN by attaching the dynamic creation of a local DTC to transitions Implementation of D2PC (transparent to users) Tokens must carry several channel names Each firing must undergo local DTCs approval cJOIN primitives allow a straightforward encoding No further protocol is needed Tokens carry just one contract identifier Firings directly correspond to reactions

Formal Models for Distributed Negotiations30 ZS nets in JOIN We encode basic nets, which are expressive enough: fork open join close compute [[ E open e ]] = E  def D in e(put, { lock }) | state({ E }) [[ e calc e’ ]] = e(p, L)  e’(p, L) [[ e fork e’, e’’ ]] = e(p, L)  def D in e’(p, L  { lock }) | e’’(put, L  { lock }) | state(  ) [[ e’, e’’ join e ]] = e’(p’, L’) | e’’(p’’, L’’)  e(p’, L’  L’’) | p’’(L’’  L’,  ) [[ e close E ]] = e(p, L)  p(L, { E }) given a net (T,S) we define an agent def [[ T ]] in [[S]], where default compensation

Formal Models for Distributed Negotiations31 DTC in JOIN the definition D is the following state(H) | put(L, F)  commit(L \ { lock }, L, { lock }, F, H ) state(H)  failed() | release(H) commit({ l }  L, L’, L’’, F, H)  commit(L, L’, L’’, F, H) | l(L’, lock, fail ) commit(L, L’, L’’, F, H) | lock(L’’’, l, f )  commit(L  (L’’’ \ L’), L’  L’’’, L’’  { l }, F, H ) commit( , L, L, F, H)  release(F) commit(L, L’, L’’, F, H) | fail()  failed() | release(H) failed() | put(L, F)  failed() failed() | lock(L, l, f)  failed() | f() failed() | fail()  failed()

Formal Models for Distributed Negotiations32 ZS nets in cJOIN We encode basic nets, which are expressive enough: fork open join close compute [[ E open e ]] = E  [ def z  0 in e  z  : E ] [[ e calc e’ ]] = e  z   e’  z  [[ e fork e’, e’’ ]] = e  z   e’  z  | e’’  z  [[ e’, e’’ join e ]] = e’  z’  | e’’  z’’   e  z’  [[ e close E ]] = e  z   E given a net (T,S) we define an agent def [[ T ]] in [[S]], where dummy definition (JOIN way of declaring a local id) z’ and z’’ have now identical scope and meaning

Formal Models for Distributed Negotiations33 Committed Join Features Negotiations can be defined in terms of concurrent sub-negotiations Cooperation between contracts are given by merging definitions Global resources produced inside a negotiation are made available at commit time Commit means termination Explicit abort and compensation

Formal Models for Distributed Negotiations34 Some results on cJoin cJoin is a conservative extension of Join P  J Q iff P  cJ Q. (P and Q Join processes) Zero-safe nets can be encoded as cJoin processes N=(T,S) a ZS net. (S,  )  * (S’,  ) iff def [T] in [S]  * def [T] in [S]

Formal Models for Distributed Negotiations35 cJOIN and Logic Languages Commit primitives of cJoin can be used to implement committed choices of AKL explicit encoding of search strategies and unification via continuation passing and compensation

Formal Models for Distributed Negotiations36 Serializability A simple type system that guarantees serializability Shallow processes the start of a sub-negotiation can be postponed until all the cooperating sub-negotiations needed to commit can be generated inside its parent negotiation Proof via correspondence w.r.t. big step semantics

Formal Models for Distributed Negotiations37 Encoding of cJOIN in JOIN Aim: Define an implementation of cJOIN in JOIN Associate to every cJOIN process a JOIN process that simulate its behavior Ideas: Identification of basic forms for definitions Definition of a type system to single out canonical processes Reuse controllers of the D2PC protocol

Formal Models for Distributed Negotiations38 Abstract Semantics Expected Result Define the abstract representative of a cJOIN process a JOIN process describing all the stable behaviors of the original process def a  x  |b  y   [def c  z   b  z  in a  y  | c  x  : a  x  |b  y  ] in a  1  |b  2  def a  x  | b  y   a  y  | b  x  in a  1  |b  2 

Formal Models for Distributed Negotiations39 Comparatives studies Comparison with other approaches for modeling long-running activities Transactional context of M INI -XLANG distinguish two kinds of compensations Goals Find limitations / restrictions Show the encoding of other common constructors (such as those in WMS)

Formal Models for Distributed Negotiations40 References Committed actions for mobile calculi (PhD Thesis Proposal, Manuscript, 2003) H. Melgratti Nested commits for mobile calculi: extending Join (Manuscript) R. Bruni, H. Melgratti, U. Montanari