Presentation is loading. Please wait.

Presentation is loading. Please wait.

Comparing Two Approaches to Compensable Flow Composition joint work with Michael Butler Carla Ferreira Tony Hoare Hernán Melgratti Ugo Montanari CONCUR.

Similar presentations


Presentation on theme: "Comparing Two Approaches to Compensable Flow Composition joint work with Michael Butler Carla Ferreira Tony Hoare Hernán Melgratti Ugo Montanari CONCUR."— Presentation transcript:

1 Comparing Two Approaches to Compensable Flow Composition joint work with Michael Butler Carla Ferreira Tony Hoare Hernán Melgratti Ugo Montanari CONCUR 2005, San Francisco (CA) USA, 23-26 August 2005 Roberto Bruni - Dipartimento di Informatica, Università di Pisa

2 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition2 Roadmap Introduction Background cCSP Sagas Informal Discussion Sequential Sagas Parallel Sagas Concluding Remarks & Future Work

3 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition3 Roadmap Introduction Background cCSP Sagas Informal Discussion Sequential Sagas Parallel Sagas Concluding Remarks & Future Work

4 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition4 Technological Scenario WS composition is an emerging paradigm for application integration within and across organization boundaries WS is primarily an integration technology and it must bridge the gap between technologists and business people each WS handles a specific task designed and built by technical people like a whole car engine, car frame, transmission tasks are combined by business people to solve business level problems like assembling the engine, the frame and the transmission without having to look at the many pieces within them Business collaborations can require long-running interactions a key issue in business processes languages Design of such business processes calls for graphical presentation rigorous mathematical foundations well-disciplined service composition principles modular implementation

5 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition5 Long-Running Transactions and Compensations When the transaction is long lasting and interactive, familiar automatic techniques of locking, check-pointing and rollback are not always adequate partial agreements can be reached and locally committed by parties to be confirmed on success to be compensated in case of failure to Compensate (Merriam-Webster OnLine) to neutralize the effect of - to supply an equivalent to - to provide with means of counteracting variation - to offset an error, defect, or undesired effect compensation is not rollback

6 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition6 Compensations: Examples A client buys books in an on-line bookstore the bookstore debits client's account as the payment for the order the bookstore later realizes that one of the book in the client's order is out of print. To compensate the client for this problem: the bookstore can credit back the account with the amount wrongfully debited and send an apologise letter Failures on credit checks can cause the abort of parallel activities, e.g. to unpackage the goods to be sent and to cancel the courier booking Late cancelling of hotel reservations can involve fees The most important fact: Compensations have a cost!

7 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition7 Contribution Take two recent formalizations Discover the analogies / differences on their core fragment (hence the current title of the paper) Show that each presentation style can recover the semantics of the other formalization... (hence the original title: Reconciling Two Approaches to Compensable Flow Composition)...but they are not quite the same: From the comparison Four Different Policies for Handling Compensable Concurrent Processes emerged (yet another possible title...) three already formalised + a new one the four semantics form a partial order

8 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition8 Roadmap Introduction Background cCSP Sagas Informal Discussion Sequential Sagas Parallel Sagas Concluding Remarks & Future Work

9 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition9 A Coarse-Grain (Partial) View Graphical Design (Diagram enthusiasts) WS Standards (XML enthusiasts) Interaction Patterns (PC enthusiasts) INFORMAL FORMAL ORCHESTRATION CHOREOGRAPHY cJoin (Pisa)  t (Bologna) web  (Bologna) Compensable Flows (PA enthusiasts) StAC cCSP Sagas Calculus A landscape of languages and techniques has emerged WSFL, BPML, WSCI, XLANG, BPEL4WS, BTP, WS-AT, WS-BP,... continuously enriched with new proposals from different vendor coalitions a babel of ad hoc proposals for standard poorly disciplined provision of "accessory" features informal (textual) description of "behaviour" Formal models are needed to reason rigorously to find specification bugs to run simulations to ease verification Two main approaches Flow Composition or Hierarchical Patterns a process describes the control and data flows among WS a flow engine invokes the services according to the application logic Two main approaches Interaction based Composition or Conversational Patterns services describe the ways they can be engaged in larger processes separately designed services interact to reach their goals

10 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition10 Orchestration & Choreography Orchestration is about describing and executing a single view point model executable framework Choreography is about describing and guiding a global model (control is shared between domains that are responsible for their tasks) abstract discipline The entirely deliberate analogy is with the way in which skilled musicians and dancers co-ordinate their actions while carrying out predetermined instructions But the distinction can blur in many occasions On Demand

11 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition11 too many similar constructs semantics not entirely satisfactory several variants / improvements Focus on Compensable Flows Structured Activity Compensation (StAC) Independently developed Robust formalizations of compensable flow compositions with few key primitives more abstract than StAC and closer to the spirit of Process Algebras Butler, Ferreira, et al. Sagas Calculi (Sagas) Bruni, Melgratti, Montanari inspired by SAGAS Compensating CSP (cCSP) Butler, Ferreira, Hoare inspired by BPEL

12 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition12 Flow Composition A1A1 A2A2 A3A3 A4A4 A5A5 A 1 ; ( (A 2 ; A 3 ) | A 5 ) ; A 4

13 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition13 Transactional Flows A1A1 A2A2 A3A3 A4A4 A5A5 [ A 1 ; ( (A 2 ; A 3 ) | A 5 ) ; A 4 ]

14 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition14 Compensation Pairs A1A1 B1B1 A2A2 B2B2 A3A3 B3B3 A4A4 B4B4 A5A5 B5B5 [ A 1 % B 1 ; ( (A 2 % B 2 ; A 3 % B 3 ) | A 5 % B 5 ) ; A 4 % B 4 ]

15 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition15 Compensation Flow A1A1 B1B1 A2A2 B2B2 A3A3 B3B3 A4A4 B4B4 A5A5 B5B5 Note: compensations are to be executed in reverse order [ A 1 % B 1 ; ( (A 2 % B 2 ; A 3 % B 3 ) | A 5 % B 5 ) ; A 4 % B 4 ] forward flow backward flow

16 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition16 cCSP: Syntax Compensable processes PP,QQ ::= P % Q | PP + QQ | PP ; QQ | PP | QQ | SKIPP | THROWW | YIELDD Standard processes P,Q ::= A | [ PP ] | P + Q | P ; Q | P | Q | SKIP | THROW | YIELD | P  Q (  ) atomic action sequential composition choice parallel composition normal termination throw an interrupt yield to an interrupt interrupt handler transaction blockcompensation pair

17 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition17 A Running Example

18 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition18 A Running Example

19 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition19 PackOrder = | i  Items ( PackItem(i) % UnpackItem(i) ) FulfillOrder = BookCourier % CancelCourier | PackOrder | CreditCheck ; ( SKIPP + THROWW ) cCSP: Running Example OrderTransaction = [ ProcessOrder ] ProcessOrder = (AcceptOrder % RestockOrder) ; FulfillOrder

20 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition20 cCSP: Denotational Trace Semantics each P is assigned a set of traces set of special events    = { , !, ? } (disjoint from  ) traces p,q,... are  -event-terminated sequences of actions in . Three possible shapes:  A,B,...,  trace leading to normal termination  A,B,...,!  trace leading to interrupt throw  A,B,...,?  trace leading to interrupt yield pq denotes concatenation Note: unlike CSP, prefix traces are not considered each PP is assigned a set of trace-pairs (p,q) where p is the forward trace q is the corresponding compensation trace

21 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition21 cCSP Semantics: Basic Processes & Sequential Cmp A = trace {  A,  } performs an atomic event and ends ok SKIP = trace {  } terminates successfully THROW = trace {  !  } raises an interrupt YIELD = trace {  ? ,  } either yields to an interrupt or ends ok P ; Q = trace { p;q | p  P  q  Q } where p  ; q = pq p  ; q = p  if   

22 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition22 cCSP Semantics: Parallel Composition P | Q = trace { r | r  p||q  p  P  q  Q } where p  1  || q  2  = { r  1 &  2  | r  int(p,q) } Processes running in parallel synchronise on joint termination or on joint interruption int(p,  ) = int( ,p) = {p} int(  A  p,  B  q) = {  A  r | r  int(p,  B  q) }  {  B  r | r  int(  A  p,q) } 11 22 1&21&2 ! ! ! ? ?  ! ?  ?   ! ! ! ? ?  joint terminal event

23 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition23 cCSP Semantics: Transaction Block and Compensation Pairs [PP] = trace { p  | (p ,p')  PP }  { pp' | (p  ! ,p')  PP } P % Q = trace { p % q | p  P  q  Q }  { (  ? ,  ) } where p  % q = (p ,q) p  % q = (p ,  ) if    SKIPP = trace SKIP % SKIP THROWW = trace THROW % SKIP YIELDD = trace YIELDD % SKIP

24 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition24 cCSP Semantics: Compensable Sequential and Parallel PP ; QQ = trace { x;y | x  PP  y  QQ } where (p ,p') ; (q,q') = (pq,q';p') (p ,p') ; (q,q') = (p ,p') if    PP | QQ = trace { z | z  x||y  x  PP  y  QQ } where (p,p') || (q,q') = { (r,r') | r  p||q  r'  p'||q' }

25 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition25 cCSP: Core Fragment Compensable processes PP,QQ ::= A % B | PP + QQ | PP ; QQ | PP | QQ | SKIPP | THROWW | YIELDD Standard processes P,Q ::= A | [ PP ] | P + Q | P ; Q | P | Q | SKIP | THROW | YIELD | P  Q atomic action sequential composition choice parallel composition normal termination throw an interrupt yield to an interrupt interrupt handler transaction blockcompensation pair

26 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition26 Sagas: Core Fragment Processes P,Q ::= 0 | A % B | P  Q | P  Q | P ; Q | P | Q | S | try S with P | try S or P | S % P Sagas S,T ::= [ P ] programmable compensation sequential composition internal choice parallel composition interrupt handler transaction block compensation pair discriminator nil forward recovery nesting Any action can succeed or fail THROW and YIELD are not explicit in the language big-step SOS semantics two different compensation policies devised for parallel processes

27 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition27 Naive Sagas: SOS Semantics An activity A either commits (A  ) aborts (A  ) A scenario  = {A 1 ,…, A n  } A saga S in  either commits ( ) aborts ( ) fails ( )  is the observable concurrent flow abort = successfully compensated  S        * A process P in  either commits ( ) aborts ( ) fails ( ) ß, ß’ are installed compensations         *

28 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition28 Revised Sagas: SOS Semantics An activity A either commits (A  ) aborts (A  ) A scenario  = {A 1 ,…, A n  } A saga S in  either commits ( ) aborts ( ) fails ( )  is the observable concurrent flow abort = successfully compensated  S        * A process P in  either commits ( ) aborts ( ) + forced abort fails ( ) + forced fail ß, ß’ are installed compensations         * *

29 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition29 PackOrder = | i  Items ( PackItem(i) % UnpackItem(i) ) FulfillOrder = BookCourier % CancelCourier | PackOrder | CreditCheck ; ( SKIPP + THROWW ) Sagas: Running Example OrderTransaction = [ ProcessOrder ] ProcessOrder = (AcceptOrder % RestockOrder) ; FulfillOrder

30 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition30 (Sequential) Sagas: Semantics (f-cmp) A ,         * (saga)       [P]      0 (zero) A ,    A (s-act)  (s-cmp) A ,         (s-step)    ’’   ;’;’ (a-step’)       (a-step’’)       * * On Demand

31 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition31 Roadmap Introduction Background cCSP Sagas Informal Discussion Sequential Sagas Parallel Sagas Concluding Remarks & Future Work

32 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition32 Sagas vs cCSP I Trace models interleaving in cCSP (centralized flavour) concurrent in Sagas (distributed flavour) Executions of activities always successful in cCSP dependent on the context  in Sagas Failures raised by primitive THROW in cCSP raised by activities that fail in  in Sagas Yielding to interrupt both explicit and implicit in cCSP only implicit in Sagas

33 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition33 Sagas vs cCSP II Abnormal termination successful compensation and abnormal termination of a transaction block are silent to parent processes in cCSP but not in Sagas where e.g. try S or P can be introduced Adequacy results via self-cancelling in cCSP simple and intuitive but imprecise via complex adequacy theorems in Sagas more precise but less intuitive Compensation policy of parallel processes coordinated interruption in cCSP no interruption but distributed compensation in Sagas naive distributed interruption in Sagas revised

34 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition34 Roadmap Introduction Background cCSP Sagas Informal Discussion Sequential Sagas Parallel Sagas Concluding Remarks & Future Work

35 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition35 Encoding cCSP seq and Sagas seq

36 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition36 Correspondence  {P}     

37 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition37 Encoding cCSP seq in Sagas seq On Demand

38 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition38 Encoding Sagas seq in cCSP seq On Demand

39 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition39 Roadmap Introduction Background cCSP Sagas Informal Discussion Sequential Sagas Parallel Sagas Concluding Remarks & Future Work

40 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition40 Expected Encoding

41 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition41 Coordinated Interruption The difference can be nicely illustrated in terms of semantic equivalence [ A % A° | B % B° | THROWW ] = traces 1. (A|B) ; (A°|B°) 2. (A;A°) | (B;B°) 3. SKIP  (A;A°)  (B;B°)  (A|B);(A°|B°) 4. SKIP  (A;A°)  (B;B°)  (A;A°)|(B;B°) cCSP revised Sagas naive Sagas Processes can be stopped when siblings abort, but their compensations is activated only when all are stopped

42 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition42 Parallel Sagas in cCSP A 1 ; B 1 ;…;B j-1 ;B’ j-1 ;…;B’ 1 ;A’ 1 A 1 ; ((B 1 ;…;B j-1 )|C 1 ) ; ((B’ j-1 ;…;B’ 1 )|C’ 1 ) ;A’ 1 … A 1 ; ((B 1 ;…;B j-1 )|(C 1 ;…;C m )) ; ((B’ j-1 ;…;B’ 1 )|(C’ m ;…;C’ 1 )) ;A’ 1 B1B1 BjBj BnBn C1C1 CkCk CmCm A1A1 A2A2 B’ 1 B’ j A’ 1 C’ 1 C’ k C’ m

43 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition43 No Interruption and Distributed Compensation The difference can be nicely illustrated in terms of semantic equivalence [ A % A° | B % B° | THROWW ] = traces 1. (A|B) ; (A°|B°) 2. (A;A°) | (B;B°) 3. SKIP  (A;A°)  (B;B°)  (A|B);(A°|B°) 4. SKIP  (A;A°)  (B;B°)  (A;A°)|(B;B°) cCSP revised Sagas naive Sagas Processes execute until completion, then they can compensate, without waiting for the completion of their siblings

44 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition44 Parallel Sagas: Naïvely B1B1 BjBj BnBn C1C1 CkCk CmCm A1A1 A2A2 B’ 1 B’ j A’ 1 C’ 1 C’ k C’ m A 1 ;(B 1 ;…;B j-1 ;B’ j-1 ;…;B’ 1 | C 1 ;…;C m ;C’ m ;…;C’ 1 );A’ 1

45 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition45 Distributed Interruption The difference can be nicely illustrated in terms of semantic equivalence [ A % A° | B % B° | THROWW ] = traces 1. (A|B) ; (A°|B°) 2. (A;A°) | (B;B°) 3. SKIP  (A;A°)  (B;B°)  (A|B);(A°|B°) 4. SKIP  (A;A°)  (B;B°)  (A;A°)|(B;B°) cCSP revised Sagas naive Sagas Processes can be interrupted and their compensations can be activated without waiting for the completion of their siblings

46 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition46 Parallel Sagas: Revised A 1 ;(B 1 ;…;B j-1 ;B’ j-1 ;…;B’ 1 | 0);A’ 1 A 1 ;(B 1 ;…;B j-1 ;B’ j-1 ;…;B’ 1 | C 1 ;C’ 1 );A’ 1 … A 1 ;(B 1 ;…;B j-1 ;B’ j-1 ;…;B’ 1 | C 1 ;…;C m ;C’ m ;…;C’ 1 );A’ 1 B1B1 BjBj BnBn C1C1 CkCk CmCm A1A1 A2A2 B’ 1 B’ j A’ 1 C’ 1 C’ k C’ m

47 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition47 No Interruption and Centralised Compensation The difference can be nicely illustrated in terms of semantic equivalence [ A % A° | B % B° | THROWW ] = traces 1. (A|B) ; (A°|B°) 2. (A;A°) | (B;B°) 3. SKIP  (A;A°)  (B;B°)  (A|B);(A°|B°) 4. SKIP  (A;A°)  (B;B°)  (A;A°)|(B;B°) cCSP revised Sagas naive Sagas Processes execute until completion, then they are all compensated if some abort NEW!

48 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition48 Relating Emerged Policies cCSP revised Sagas naive Sagas Sagas par1 / cCSP par1 Sagas par2 / cCSP par2 Sagas par3 / cCSP par3 Sagas par4 / cCSP par4    NEW!

49 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition49 cCSP pari, Sagas pari and Correspondence cCSP par1 : no yielding cCSP par2 : only parallel yielding cCSP par4 : also parallel yielding Sagas par1 only three outcomes of Sagas par2 (commit, abort, fail) different set of SOS rules Sagas par3 outcomes of Sagas par1 plus "forced termination" rules of Sagas par1 plus an additional one Correspondence par1: correspondence as for the sequential case par2, par3, par4: slightly rephrased (no unique  ) On Demand

50 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition50 cCSP par1 : No Yielding A % B = trace { p % q | p  A  q  B }  { (  ? ,  ) } = trace { (  A, ,  B,  ) }  { (  ? ,  ) } YIELDD = trace SKIPP = trace { ( ,  ), (  ? ,  ) } THROWW = trace { (  ! ,  ), (  ? ,  ) } p  1  || q  2  = { r  1 &  2  | r  int(p,q)   1,  2  { ,!} } On Demand

51 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition51 cCSP par2 : Only Parallel Yielding A % B = trace { p % q | p  A  q  B }  { (  ? ,  ) } = trace { (  A, ,  B,  ) }  { (  ? ,  ) } YIELDD = trace SKIPP = trace { ( ,  ), (  ? ,  ) } THROWW = trace { (  ! ,  ), (  ? ,  ) } (p ,p')||(q ,q') = { (r  ? ,  ) | r  pp'||qq' }  { (r ,r'  ) | r  int(p,q)  r'  int(p',q') } (p  1 ,p')||(q  2 ,q') = { (r  1 &  2 ,  ) | r  pp'||qq' } (p,p') || (q,q') = { (r,r') | r  p||q  r'  p'||q' } On Demand

52 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition52 cCSP par4 : Also Parallel Yielding (p ,p')||(q ,q') = { (r  ? ,  ) | r  pp'||qq' }  { (r ,r'  ) | r  int(p,q)  r'  int(p',q') } (p  1 ,p')||(q  2 ,q') = { (r  1 &  2 ,  ) | r  pp'||qq' } (p,p') || (q,q') = { (r,r') | r  p||q  r'  p'||q' } On Demand

53 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition53 Roadmap Introduction Background cCSP Sagas Informal Discussion Sequential Sagas Parallel Sagas Concluding Remarks & Future Work

54 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition54 Some Concluding Remarks cCSP and Sagas abstract away from low-level computations can be easily extended independent from the coordination mechanisms that implement the primitives Allow to reason about program properties adequacy process equivalence correctness of implementation Our research has been valuable in deepening our understanding of the phenomenon of compensable parallel transactions and the range of available design options

55 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition55 Implementation Issues: JSaga Design as well-formed flow diagrams or as processes in a suitable language or as corresponding (validated) XML document Automatic generation of coordination wrappers for invoking involved services in a sound way for managing commitments and compensations Java Signal Core Layer (JSCL) Java Transactional Layer (JTL) Java Sagas Layer (JSL) Sagas Markup Language Sagas Testing Environment (STE)

56 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition56 Future Goal: Fully Bridge the Gap between cCSP and Sagas Extend the comparison to advanced features nesting message passing joint transactions action refinement Implementation toolkit

57 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition57 References Theoretical foundations for compensations in flow composition languages R. Bruni, H. Melgratti, U. Montanari (Proc. POPL'05) Models and languages for global computing transactions H. Melgratti (PhD Thesis, Univ. of Pisa, 2005) A trace semantics for long-running transactions M. Butler, C. Ferreira, T. Hoare (Proc. 25 Years of CSP) Executable Semantics for Compensating CSP M. Butler, S. Ripon (Proc. WS-FM 2005) From Theory to Practice in Transactional Composition of Web Services (Proc. WS-FM 2005) R. Bruni, G. Ferrari, H. Melgratti, U. Montanari, D. Strollo, E. Tuosto JSagas Tutorial at WS-FM 2005 D. Strollo, N. Zappone

58 Roberto Bruni @ CONCUR 2005 23-26 Aug. 2005 S. Francisco (CA) USA Comparing Two Approaches to Compensable Flow Composition58


Download ppt "Comparing Two Approaches to Compensable Flow Composition joint work with Michael Butler Carla Ferreira Tony Hoare Hernán Melgratti Ugo Montanari CONCUR."

Similar presentations


Ads by Google