Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Ivan Lanese Computer Science Department University of Bologna Italy Types for deadlock avoidance in SSCC.

Similar presentations


Presentation on theme: "1 Ivan Lanese Computer Science Department University of Bologna Italy Types for deadlock avoidance in SSCC."— Presentation transcript:

1 1 Ivan Lanese Computer Science Department University of Bologna Italy Types for deadlock avoidance in SSCC

2 What is SSCC? l SCC (Service Centered Calculus) is a Sensoria calculus for modelling web services and their interactions [see Rosario’s talk] l SSCC (Stream-based SCC) is a variation of SCC –For improving usability –Has a stream construct for coordination among different services –Developed with en eye on typability

3 SSCC syntax s t ream P as f i n Q f ee d v : P f ( x ) : P 9 = ; C oor d i na t i on P :: = P j Q ( ºa ) P 0 rec X : P X 9 > > > > = > > > > ; S t an d ar d opera t ors a ) P a ( P ¾ S erv i ces v : P ( x ) P ¾ C onversa t i ons

4 An idea about the semantics l Service definitions and invocations interact creating sessions l Values can be exchanged between corresponding sessions l Streams can be used to make different systems interact ( ºr )( r B v : P j r C ( x ) Q ) ! ( ºr )( r B P j r C Q [ v = x ]) a ) P j a ( Q ! ( ºr )( r B P j r C Q ) s t ream f ee d v : P as f = hi i n f ( x ) : Q s t ream P as f = h v i i n f ( x ) : Q s t ream P as f = hi i n Q [ v = x ]

5 Fast example l Invoke services a and b and use the results to invoke c s t ream ( a ( ( x ) f ee d x ) j ( b ( ( y ) f ee d y ) as f = hi i n f ( z ) : f ( w ) : c ( z : w : ( t ) f ee d t

6 Deadlock avoidance in SSCC l Many possible causes of deadlock in the system –Invoked service not available –Client and server protocols not compatible –Read stream empty –Cyclic dependencies between the above things

7 Invoked service not available l Difficult to avoid in general –Services can be created and removed dynamically –Service names can be communicated l There are some simple to treat cases –Only persistent services at top level (always available) –Linear services (just one definition and one invocation) »Types for linearity in π-calculus can be adapted

8 Client and server protocols not compatible l Can be solved using session types l Useful (and meaningful) to force sequentiality in protocols l Protocols –?T.UInput –!T.UOutput –endEnd of protocol l Client and server protocols should be complementary

9 Read stream empty l Streams are static l Easy to ensure that the number of feeds to a stream is greater than the number of reads from the stream l Attach to the stream a type that includes the number of values it will contain

10 Cyclic dependencies l The most difficult problem ( ºa ) s t ream ( a ( ( x ) f ee d x ) as f = hi i n f ( z ) : a ) 5

11 How to solve it? l Operators in the program should be stratified according to some priority –An operator can depend only on operators with higher priority –Corresponding operators (e.g., definition and invocation of a service) should have the same priority l Priorities should be added to: –Services –Streams –Steps in service protocols l Operators with maximal priority are enabled

12 And finally… l If the system satisfies all these conditions… l … then it is deadlock-free

13 What we have done? l Written a type system ensuring –Protocol compatibility –Stream values available –No cyclic dependencies l If services are available then the system is deadlock-free l Now writing and checking the proofs

14 End of talk


Download ppt "1 Ivan Lanese Computer Science Department University of Bologna Italy Types for deadlock avoidance in SSCC."

Similar presentations


Ads by Google