1 / 131

joint work with Gianluigi Ferrari Hern á n Melgratti Ugo Montanari Daniele Strollo Emilio Tuosto

Santa Cruz (CA) USA, 18 January 2005. Calculi for Committed Choices and Compensations Roberto Bruni - Dipartimento di Informatica, Università di Pisa. joint work with Gianluigi Ferrari Hern á n Melgratti Ugo Montanari Daniele Strollo Emilio Tuosto Dip. Informatica, Univ. Pisa.

pattiv
Télécharger la présentation

joint work with Gianluigi Ferrari Hern á n Melgratti Ugo Montanari Daniele Strollo Emilio Tuosto

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. Santa Cruz (CA) USA, 18 January 2005 Calculi for Committed Choices and CompensationsRoberto Bruni - Dipartimento di Informatica, Università di Pisa joint work with Gianluigi Ferrari Hernán Melgratti Ugo Montanari Daniele Strollo Emilio Tuosto Dip. Informatica, Univ. Pisa

  2. Motivations • Design of business processes • rigorous mathematical foundations • clean semantics • “expressiveness” • well-disciplined service composition • modular implementation • Web Service Composition • defining complex services as aggregations of simpler services Calculi for Committed Choices and Compensations

  3. Motivations • In long lasting negotiations partial agreements can be reached and locally committed by parties • To be compensated in case of failure • To be published / confirmed on success • Formal models are needed • To discover specification bugs • To reason rigorously • To run simulations • To ease verification Calculi for Committed Choices and Compensations

  4. Compensations • 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 • The most important fact: • Compensations have a cost Calculi for Committed Choices and Compensations

  5. Compensations: Examples • Late cancelling of hotel reservations can involve payment of fees • Failures on credit checks can cause the abort of parallel activities (which can be partially completed) e.g. • to unpackage the goods to be sent • to cancel the courier booking • Statements of politicians typically require an unbounded number of nested compensations Calculi for Committed Choices and Compensations

  6. Approaches • Flow Composition or Hierarchical Patterns • Similar to workflow systems: a process describes the flow of both control and data among WS • Interaction based Composition, Conversational Patterns or Global Model • Services describe the ways they can be engaged in a larger process Calculi for Committed Choices and Compensations

  7. Flow Composition A2 A3 A1 A4 A5 Calculi for Committed Choices and Compensations

  8. Transactional Flows A2 A3 A1 A4 A5 Calculi for Committed Choices and Compensations

  9. Compensation A2 A3 B2 B3 A1 A4 B1 B4 A5 B5 Calculi for Committed Choices and Compensations

  10. A2 A3 B2 B3 A1 A4 B1 B4 A5 B5 Compensation Flow Calculi for Committed Choices and Compensations

  11. Nested Flow Diagrams A2 A3 B2 B3 A1 A4 B1 B4 P Calculi for Committed Choices and Compensations

  12. Interaction and Agreements • In commercial applications, separately designed and implemented components must interact • avoiding ad-hoc proprietary solutions • offering alternatives to centralized transaction managers • hiding the coordination layer (separation of concerns) Calculi for Committed Choices and Compensations

  13. Interacting Transactions {} P2 P1 {} P3 {} Calculi for Committed Choices and Compensations

  14. Interacting Transactions {} P2 P1 {} P3 {} Calculi for Committed Choices and Compensations

  15. Interacting Transactions {P3} P2 P1 {P2} P3 {} Calculi for Committed Choices and Compensations

  16. Interacting Transactions {P3} P2 P1 {P2} P3 {} Calculi for Committed Choices and Compensations

  17. Interacting Transactions {P1,P3} P2 P1 {P2} P3 {P2} Calculi for Committed Choices and Compensations

  18. Outline of the talk • Part I • Transactional Flows with Compensations • Part II • A Process Calculus for Distributed Transactions • Part III • Prototype Implementations Calculi for Committed Choices and Compensations

  19. Outline of the talk • Part I • Transactional Flows with Compensations • Part II • A Process Calculus for Distributed Transactions • Part III • Prototype Implementations Calculi for Committed Choices and Compensations

  20. Part I - Flows • Sequential Sagas • Graphical representation • Syntax • Big Step Semantics • Adequacy results • Parallel Sagas • Nested Sagas • Additional features Calculi for Committed Choices and Compensations

  21. Flow Diagrams and PDLs • Many PDL proposals to describe business processes unambiguously • XML-based • WSFL, XLANG, BPEL4WS, … • Extensions of known calculi • committed Join (cJOIN), t-calculus, web-calculus • Flow-based • Structured Activity Compensation (StAC) • now evolving to compensating CSP • core flow language (FL) for sagas [BMM:POPL2005] Calculi for Committed Choices and Compensations

  22. Sequential Sagas: Graphically Accept Order Update Credit Prepare Order Refuse Order Refund Money Update Stock Calculi for Committed Choices and Compensations

  23. Sequential Sagas: Syntax Accept Order Update Credit Prepare Order Refuse Order Refund Money Update Stock (Step) X ::= 0 | A | A%B (Process) P ::= X | P;P (Saga) S ::= { P } Calculi for Committed Choices and Compensations

  24. Sequential Sagas: Syntax Accept Order Update Credit Prepare Order Refuse Order Refund Money Update Stock S = { AO%RO; UC%RM ; PO%US} (Step) X ::= 0 | A | A%B (Process) P ::= X | P;P (Saga) S ::= { P } Calculi for Committed Choices and Compensations

  25. Sequential Sagas: Semantics • An activity A either • commits (A ) • aborts (A ) •  = {A1  ,…, An  } Calculi for Committed Choices and Compensations

  26. Sequential Sagas: Semantics • A saga S = { P }under either • commits ( ) • aborts ( ) • fails ( ) • is the observable flow   S     S     S   * Calculi for Committed Choices and Compensations

  27. Sequential Sagas: Semantics • A processPunder either • commits ( ) • aborts ( ) • fails ( ) • aborts = successfully compensated • ß, ß’ are the installed compensations   <P,ß>  < ,ß’>    <P,ß>  < , 0>    <P,ß>  < , 0>  * Calculi for Committed Choices and Compensations

  28. Sequential Sagas: Semantics   <P,0>  < , ß>  (saga)   {P}   Calculi for Committed Choices and Compensations

  29. Sequential Sagas: Semantics   <P,0>  < , ß>  (saga)   {P}   0 (zero)  <0,ß>  < , ß>  Calculi for Committed Choices and Compensations

  30. Sequential Sagas: Semantics   <P,0>  < , ß>  (saga)   {P}   0 (zero)  <0,ß>  < , ß>  A (s-act) A  ,  <A%B, ß>  < , B;ß>  Calculi for Committed Choices and Compensations

  31. Sequential Sagas: Semantics   <P,0>  < , ß>  (saga)   {P}   0 (zero)  <0,ß>  < , ß>  A (s-act) A  ,  <A%B, ß>  < , B;ß>    <ß,0>  < , 0>  (s-cmp)  A  ,  <A%B,ß>  < , 0>    <ß,0>  < , 0>  (f-cmp)  A  ,  <A%B,ß>  < , 0>  * Calculi for Committed Choices and Compensations

  32. Sequential Sagas: Semantics ’   <P,ß>  < ,ß’’>  <Q,ß’’>  < ,ß’>   (s-step) ;’  <P;Q, ß>  < ,ß’>    <P,ß>  < , 0>  (a-step’)   <P;Q,ß>  < ,0>    <P,ß>  < , 0>  * (a-step’’)   <P;Q,ß>  < ,0>  * Calculi for Committed Choices and Compensations

  33. Sequential Sagas: Adequacy  and = A1;…;An  S   Ak A1 Aj An Calculi for Committed Choices and Compensations

  34. Sequential Sagas: Adequacy  and = A1;…;An  S   Ak A1 Aj An  and = A1;…;Ak-1;Bk-1;…;B1  S   Ak A1 Aj An B1 Bj Calculi for Committed Choices and Compensations

  35. Sequential Sagas: Adequacy  and = A1;…;An  S   Ak A1 Aj An  and = A1;…;Ak-1;Bk-1;…;B1  S   Ak A1 Aj An B1 Bj  and = A1;…;Ak-1;Bk-1;…;Bj+1  S   * Ak A1 Aj An B1 Bj Calculi for Committed Choices and Compensations

  36. Parallel Sagas: Syntax Update Credit Refund Money Accept Order Refuse Order Prepare Order Update Stock Calculi for Committed Choices and Compensations

  37. Parallel Sagas: Syntax Update Credit Refund Money Accept Order Refuse Order Prepare Order Update Stock (Step) X ::= 0 | A | A%B (Process) P ::= X | P;P | P|P (Saga) S ::= { P } Calculi for Committed Choices and Compensations

  38. Parallel Sagas: Syntax Update Credit Refund Money Accept Order Refuse Order Prepare Order Update Stock S = { AO%RO; UC%RM | PO%US } (Step) X ::= 0 | A | A%B (Process) P ::= X | P;P | P|P (Saga) S ::= { P } Calculi for Committed Choices and Compensations

  39. Parallel Sagas: Naïvely B1 Bj Bn B’1 B’j A1 A2 A’1 C1 Ck Cm C’1 C’k C’m A1;(B1;…;Bj-1;B’j-1;…;B’1 | C1;…Cm;C’m;…;C’1);A’1 Calculi for Committed Choices and Compensations

  40. Parallel Sagas: Revised B1 Bj Bn B’1 B’j A1 A2 A’1 C1 Ck Cm C’1 C’k C’m A1;(B1;…;Bj-1;B’j-1;…;B’1 | 0);A’1 A1;(B1;…;Bj-1;B’j-1;…;B’1 | C1;C’1);A’1 … A1;(B1;…;Bj-1;B’j-1;…;B’1 | C1;…Cm;C’m;…;C’1);A’1 Calculi for Committed Choices and Compensations

  41. * Parallel Sagas: Semantics • A process P under  either • commits ( ) • aborts ( ) • fails ( ) • is forced to abort ( ) • is forced to fail ( ) •  is the observableconcurrentflow   <P,ß>  < ,ß’>    <P,ß>  < , 0>    <P,ß>  < , 0>  *   <P,ß>  < , 0>    <P,ß>  < , 0>  Calculi for Committed Choices and Compensations

  42. * Parallel Sagas: Semantics   <P,0>  <, ß>   { , , }  (saga) *   {P}       <ß, 0>  < , 0> (forced-abt’)   <P,ß>  < ,0>     <ß, 0>  < , 0> (forced-abt’’)   <P,ß>  < ,0>  Calculi for Committed Choices and Compensations

  43. Parallel Sagas: Semantics ’   <P,0>  < ,ß’>  <Q,0>  < ,ß’’>   (s-par) |’  <P|Q, ß>  < ,ß’|ß’’; ß>  Calculi for Committed Choices and Compensations

  44. * * * * Parallel Sagas: Semantics (c-par’) 1, 2  { , }   ’  <P,0>  <1,0>  <Q,0>  <2,0>  <ß,0>  < ,0>    |’;   <P|Q, ß>  < 1 2 , 0>  * * * * * * * Calculi for Committed Choices and Compensations

  45. * * * * * Parallel Sagas: Semantics (c-par’’) 1, 2  { , }   ’  <P,0>  <1,0>  <Q,0>  <2,0>  <ß,0>  < ,0>    |’;   <P|Q, ß>  < 1 2 , 0>  * * * * * * * Calculi for Committed Choices and Compensations

  46. * * * * * * Parallel Sagas: Semantics (f-par) 1  { , }  ’ *  <P,0>  <1,0>  <Q,0>  <2 ,0>   2  { , , , } * |’  <P|Q, ß>  < 1 2, 0>  * * * * * * * Calculi for Committed Choices and Compensations

  47. Parallel Sagas: Adequacy Completion Calculi for Committed Choices and Compensations

  48. Parallel Sagas: Adequacy Successful Compensation Calculi for Committed Choices and Compensations

  49. Parallel Sagas: Adequacy Failed Compensation Calculi for Committed Choices and Compensations

  50. Nested Sagas: Graphically Update Credit Refund Money Accept Order Refuse Order Prepare Order Update Stock Add Points Subtract Points Calculi for Committed Choices and Compensations

More Related