bridging the gap between interaction- and process-oriented choreographies

Post on 12-Jan-2016

42 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

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 - PowerPoint PPT Presentation

TRANSCRIPT

www.sensoria-ist.eu

Bridging the gap between Interaction-

and Process-Oriented Choreographies

Talk by Ivan LaneseJoint work with Claudio Guidi,

Fabrizio Montesi and Gianluigi ZavattaroUniversity of Bologna, Bologna, Italy

www.sensoria-ist.euRoadmap

IOCs and POCs

Different interpretations for IOC

Connectedness conditions

Bisimilarity results

Conclusions

2

www.sensoria-ist.euRoadmap

IOCs and POCs

Different interpretations for IOC

Connectedness conditions

Bisimilarity results

Conclusions

3

www.sensoria-ist.euChoreography

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

a o¡! b

www.sensoria-ist.euFrom 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

www.sensoria-ist.eu

6

www.sensoria-ist.euInteraction-oriented Choreography

Allows to describe interactions from a global point of view

7

I ::= a o¡! bj 1 j 0 j I ; I 0 j I k I 0 j I + I 0

(Int er act ion)

a o¡! b ao¡! b¡¡ ¡! 1

(End)

1p

¡! 0

(Sequence)

I ¾¡! I 0 ¾6=p

I ; J ¾¡! I 0; J(Par al l el )

I ¾¡! I 0 ¾6=p

I k J ¾¡! I 0k J

(Choice)

I ¾¡! I 0

I + J ¾¡! I 0

(Seq-end)

Ip

¡! I 0 J ¾¡! J 0

I ; J ¾¡! J 0

(Par -end)

Ip

¡! I 0 Jp

¡! J 0

I k Jp

¡! I 0k J 0

www.sensoria-ist.euProcess-oriented Choreography

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

P ::= o j o j 1 j 0 j P ;P 0 j P j P 0 j P +P 0

S ::= (P )a j S k S0

www.sensoria-ist.euAsynchronous behaviours

9

(In)

o o¡! 1(Out )

o o¡! 1

(Async-Out )

hoihoi¡¡! 1

(One)

1p

¡! 0(Sequence)

P °¡! P 0 ° 6=p

P ;Q °¡! P 0;Q

(Inner Par al l el )

P °¡! P 0 ° 6=p

P j Q °¡! P 0 j Q(Choice)

P °¡! P 0

P +Q °¡! P 0

(Seq-end)

Pp

¡! P 0 Q °¡! Q0

P ;Q °¡! Q0

(Inner Par -end)

Pp

¡! P 0 Qp

¡! Q0

P j Qp

¡! P 0 j Q0

www.sensoria-ist.euComposing behaviours

10

(Inner )

P °¡! P 0 ° 6= o;p

(P )a° :a¡¡! (P 0)a

(Msg)

P o¡! P 0

(P )ao:a¡¡! (P 0 j hoi)a

(Synchr o)

S hoi :a¡¡ ¡! S0 S00 o:b¡¡! S000

S kS00 ao¡! b¡¡ ¡! S0k S000

(Ext Par al l el )

S °¡! S0

S kS00 °¡! S0kS00

In the synchronous semantics the output is immediately propagated and matched with the input

www.sensoria-ist.euRoadmap

IOCs and POCs

Different interpretations for IOC

Connectedness conditions

Bisimilarity results

Conclusions

11

www.sensoria-ist.euOur aim

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

proj(a o¡! b;a) = o

proj(a o¡! b;c) = 1proj(a o¡! b;b) = o

www.sensoria-ist.euWhat ; means?

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

a o1¡! b;c o2¡! d

www.sensoria-ist.euA partial order

14

Disjoint

Sender Receiver

Sender - receiver

Synchronous

Strincter constraints on IOC

Stronger relation on behaviors

www.sensoria-ist.euRoadmap

IOCs and POCs

Different interpretations for IOC

Connectedness conditions

Bisimilarity results

Conclusions

15

www.sensoria-ist.euConnectedness for sequence

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

a o1¡! b;c o2¡! d

I ; J

www.sensoria-ist.euExample

Consider:

The projection is:

The POC behaves well for synchronous and sender semantics

The POC is not connected for receiver or disjoint semantics

17

a o1¡! b;a o2¡! d

(o1;o2)a;(o1)b;(o2)d

www.sensoria-ist.euPoints of choice

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

I + J

www.sensoria-ist.euPoints of choice: example

If we drop the condition on roles:

In the projection

Interaction on O3 is enabled

19

(a o1¡! b+a o2¡! c);b o3¡! c

((o1+o2);1)a k ((o1+1);o3)b k ((o2+1);o3)c

www.sensoria-ist.euCausality-safety

Using many times the same operation may cause problems

For instance a may interact with d

20

a o¡! bk c o¡! d

(o)a k (o)b k (o)c k (o)d

www.sensoria-ist.euCausality-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

www.sensoria-ist.euRoadmap

IOCs and POCs

Different interpretations for IOC

Connectedness conditions

Bisimilarity results

Conclusions

22

www.sensoria-ist.euBisimilarity

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

www.sensoria-ist.euMain 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

www.sensoria-ist.euReceive bisimulation example

25

a o1¡! b;c o2¡! b

(o1;1)a k (o1;o2)b k (1;o2)c

(1;1jho1i )a k (o1;o2)b k (1;o2)c

(o1;1)a k (o1;o2)b k (1jho2i )c

(1;1jho1i )a k (o1;o2)b k (1jho2i )c

a o1¡! b

www.sensoria-ist.euReceive bisimulation example

26

1;c o2¡! b

(1;1j1)a k (1;o2)b k (1jho2i )c

(1;1j1)a k (1;o2)b k (1;o2)c

c o2¡! b 1

c o2¡! b(1;1j1)a k (1)b k (1j1)c

www.sensoria-ist.euRoadmap

IOCs and POCs

Different interpretations for IOC

Connectedness conditions

Bisimilarity results

Conclusions

27

www.sensoria-ist.euExtensions

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

www.sensoria-ist.euBisimulation

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

www.sensoria-ist.euConclusion

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

www.sensoria-ist.euRelated 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

www.sensoria-ist.euFuture 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

www.sensoria-ist.eu

33

top related