1 / 33

Bridging the gap between Interaction- and Process-Oriented Choreographies

Bridging the gap between Interaction- and Process-Oriented Choreographies. Talk by Ivan Lanese Joint work with Claudio Guidi, Fabrizio Montesi and Gianluigi Zavattaro University of Bologna, Bologna, Italy. Roadmap. IOCs and POCs Different interpretations for IOC Connectedness conditions

dwayne
Download Presentation

Bridging the gap between Interaction- and Process-Oriented Choreographies

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. Bridging the gap between Interaction- and Process-Oriented Choreographies Talk by Ivan Lanese Joint work with Claudio Guidi, Fabrizio Montesi and Gianluigi Zavattaro University of Bologna, Bologna, Italy

  2. Roadmap IOCs and POCs Different interpretations for IOC Connectedness conditions Bisimilarity results Conclusions

  3. Roadmap IOCs and POCs Different interpretations for IOC Connectedness conditions Bisimilarity results Conclusions 3

  4. Choreography o b ¡ a ! • Choreography aims at describing the interactions among many participants • Interaction-Oriented Choreography (IOC): obtained by composing basic interactions using composition operators • WS-CDL • Process-Oriented Choreography (POC): obtained as the parallel composition of the behavior of different roles • BPEL4CHOR, natural extension of orchestration language BPEL 4

  5. From design to implementation • IOCs are more easy to understand and to write • Good tool for design • POCs are more easily implementable • We want to translate automatically a IOC into a POC • We project the IOC on the different roles 5

  6. Which is the behavioral relation between a IOC and the projected POC? 6

  7. Interaction-oriented Choreography ( ) S e q u e n c e ( ) I ( ) E n t e r a c t i o n n d ¾ 0 p 6 I I ¡ ¾ ! = o p o 0 0 0 ¡ j j j j k j b b I I I I I I I 1 0 ! ¡ + o a 1 0 b : : a ; ¡ 1 = ! ¡ ¡ ¡ ¡ ! a ! ! ¾ 0 I J I J ¡ ; ; ! ( ) P ( ) C a r a l l e l h o i c e ¾ ¾ 0 p 6 I I 0 I I ¡ ¡ ¾ ! = ! ¾ ¾ k 0 k I J I J 0 I J I ¡ + ¡ ! ! ( ) P a r e n d ( ) - S e q e n d - p p p 0 0 ¾ I I J J ¡ ¡ 0 0 I I J J ¡ ¡ ! ! ! ! p ¾ 0 I J J 0 0 k k ¡ I J I J ¡ ; ! ! Allows to describe interactions from a global point of view 7

  8. Process-oriented Choreography 0 0 0 j j j j j j j P P P P P P P 1 0 + : : o o ; = 0 ( ) j k S P S S : : = a Allows to compose the behaviours of different roles Behaviours are based on input/output on operations We give two semantics to POCs: a synchronous and an asynchronous one 8

  9. Asynchronous behaviours ( ) ( ) A O O ( ) O ( ) s y n c u t n e I - u t n h i p o o o 1 h i ¡ 1 ¡ 1 1 0 o ¡ ¡ ¡ ! o ! o ! ! ( ) ( ) I P S n n e r a r a l l e l e q u e n c e ° ° 0 p 0 p 6 P P 6 P P ¡ ¡ ° ° ! = ! = ° ° j 0 j 0 P Q P Q P Q P Q ¡ ¡ ; ; ! ! ( ) S ( ) e q e n d C - h o i c e p ° ° 0 P P 0 0 ¡ P P Q Q ¡ ¡ ! ! ! ° ° 0 P Q P 0 + ¡ P Q Q ¡ ! ; ! ( ) I P n n e r a r e n d - p p 0 0 P P Q Q ¡ ¡ ! ! p j 0 j 0 P Q P Q ¡ ! 9

  10. Composing behaviours ( ) M ( ) I s g n n e r ° o 0 p 0 6 P P P P ¡ ¡ ° o ! = ! ; ° : a ( ) ( 0 ) o : a P P ( ) ( 0 j h i ) ¡ ¡ P P ¡ ¡ ! o ! a a a a ( ) S y n c h r o ( ) E P x t a r a l l e l h i b o : a o : ° 0 0 0 0 0 0 S S S S 0 ¡ ¡ ¡ ¡ ¡ S S ¡ ! ! ! o ° ¡ 0 0 0 0 0 k k b S S S S ¡ ! a k 0 0 0 k 0 0 0 ! S S S S ¡ ¡ ¡ ! • In the synchronous semantics the output is immediately propagated and matched with the input 10

  11. Roadmap IOCs and POCs Different interpretations for IOC Connectedness conditions Bisimilarity results Conclusions 11

  12. Our aim o ( ) o b j o 1 ( ) ¡ b ( ) j b b j ¡ p r o a c ! ¡ = p r o a a o ! = p r o a o ! = ; ; ; Given a IOC we want to project it onto roles to get a POC exhibiting the corresponding behaviors The projection is an homomorphism but for: We look for connectedness conditions ensuring that such a projection behaves well The conditions and the meaning of “behaves well” depend on the interpretation of the IOC 12

  13. What ; means? o o 1 2 b d ¡ ¡ a ; c ! ! • Consider the simple IOC • In the synchronous case the (atomic) interaction between a and b should occur before the (atomic) interaction between c and d • In the asynchronous case there are different alternatives: • Sender: the sending at a should occur before the sending at c • Receive: the receive at b should occur before the receive at d • Sender-receive: both of the above • Disjoint: both the sending at a and the receive at b should occur before both the sending at c and the receive at d 13

  14. A partial order Disjoint Sender Receiver Strincter constraints on IOC Sender - receiver Stronger relation on behaviors Synchronous 14

  15. Roadmap IOCs and POCs Different interpretations for IOC Connectedness conditions Bisimilarity results Conclusions 15

  16. Connectedness for sequence I J ; o o 1 2 b d ¡ ¡ a ; c ! ! Ensures the correctness of sequential composition Synchronous: {a,b} ∩ {c,d} ≠ Ø Sender: a=c or b=c Receiver: b=c or b=d Disjoint: b=c The conditions can be generalized to ensure the connectedness of 16

  17. Example o o 1 2 ( ) ( ) ( ) b d ¡ ¡ a o ; o ; a ; o ; o ! ! b d 1 2 1 2 a Consider: The projection is: The POC behaves well for synchronous and sender semantics The POC is not connected for receiver or disjoint semantics 17

  18. Points of choice I J + ? • Ensures the correctness of choice • Synchronous: • The same role should occur in each initial transitions • The roles in the two components should be the same • Asynchronous: • The sender should be the same • The roles in the two components should be the same 18

  19. Points of choice: example o o o 1 2 3 ( ( ( ) ) k ( ) ( ) ) k ( ( ) ) b b 1 1 1 ¡ + + ¡ ¡ + + a o o ; a c ; o c ; o o ; o ! ! ! b 1 2 1 3 2 3 a c If we drop the condition on roles: In the projection Interaction on O3 is enabled 19

  20. Causality-safety o o ( ) k ( k ) k ( ) k ( ) b d ¡ ¡ a o o c o o ! ! b d a c Using many times the same operation may cause problems For instance a may interact with d 20

  21. Causality-safety • We define a causality relation between events of the projected POC • e1 < e2 if e2 becomes enabled after e1 has been performed • the exact definition depends on whether the semantics is synchronous or asynchronous • We require causality dependencies between events on the same operation • At most one of them can be enabled at the time • No interference 21

  22. Roadmap IOCs and POCs Different interpretations for IOC Connectedness conditions Bisimilarity results Conclusions 22

  23. Bisimilarity • We characterize the behavioral relation between a IOC and the projected POC using bisimilarity • Synchronous bisimilarity: IOC transitions are matched by synchronous POC transitions • Sender bisimilarity: IOC transitions are matched by POC sends, POC receives are abstracted away • weak w.r.t. POC receive transitions • Receiver bisimilarity: IOC transitions are matched by POC receives, POC sends are abstracted away • weak w.r.t. POC send transitions • Disjoint bisimilarity: a IOC transition is matched by subsequent send and receive POC transitions 23

  24. Main result If a IOC satisfies all the connectedness conditions for the synchronous/sender/receiver/disjoint semantics then it is synchronous/sender/receiver/disjoint bisimilar to its projection 24

  25. Receive bisimulation example o o o 1 1 2 ( ( ( ( j j h h ) ) k k i i ) ) ( ( k k ( ( ) ) k k ) ) ( ( k k j h ( ( ) i j h ) ) i ) b b b 1 1 1 1 1 1 1 1 1 1 ¡ ¡ ¡ a a o o ; ; ; ; o o ; c o o ; ; o o o o ; ; o o ; o o ; o o ! ! ! b b b b 1 1 1 1 1 1 2 2 1 1 2 2 2 2 2 2 a a a a c c c c 25

  26. Receive bisimulation example o o o 2 2 2 ( ( ( j j j ) ) ) k k k ( ( ( ) k ) ) ( k k j ( ( ) j h ) i ) b b b 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ¡ ¡ ¡ c c ; ; ; ; c ; ; o o ; o o ! ! ! b b b 2 2 2 2 a a a c c c 26

  27. Roadmap IOCs and POCs Different interpretations for IOC Connectedness conditions Bisimilarity results Conclusions 27

  28. Extensions • Internal located actions, recursion and hiding can be added to the language • Value passing can be added • A role should own the value to be sent • Values can be used to transform nondetermistic choice into deterministic 28

  29. Bisimulation • Bisimulations and simulations can be defined both for IOCs and for POCs • IOC-POC bisimulation is compatible with those (bi)simulations • The projections of two (bi)similar IOCs are bisimilar • One can refine a IOC (e.g., adding auxiliary interactions) and derive a refined POC • Refinement can solve connectedness problems • Hiding is necessary to have more powerful refinements 29

  30. Conclusion • We started from the basic question: which is the meaning of a IOC? • We derived different possible interpretations according to the choice of synchronous/asynchronous semantics and to the observable events • For each possibility: • We found suitable syntactic conditions ensuring a correct projection • We characterize the behavioral relation between IOC and POC as a suitable bisimulation relation 30

  31. Related work Carbone, Honda, Yoshida, “Structured communication-centred programming for web services”, ESOP ’07 Honda, Yoshida, Carbone, “Multiparty asynchronous session types”, POPL ’08 Bravetti, Zavattaro, “Towards a unifying theory for choreography conformance and contract compliance”, SC ’07 Busi et al., “Choreography and orchestration conformance for system design”, COORDINATION ’06 Li, Zhu, Pu, “Conformance validation between choreography and orchestration”, TASE ‘07 31

  32. Future work • Complete the analysis on a more complex language • Recursion/iteration • Data • Hiding • Exceptions • Looking at more complex projection functions • Should allow to relax the connectedness conditions • Study the possibility of refinement 32

  33. Thanks! Questions? 33

More Related