Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Decidability Results for Dynamic Installation of Compensation Handlers Joint.

Similar presentations


Presentation on theme: "Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Decidability Results for Dynamic Installation of Compensation Handlers Joint."— Presentation transcript:

1 Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Decidability Results for Dynamic Installation of Compensation Handlers Joint work with Gianluigi Zavattaro

2 Map of the talk l Long-running transactions l Compensation installation l Gap in the expressive power l Conclusions

3 Map of the talk l Long-running transactions l Compensation installation l Gap in the expressive power l Conclusions

4 Handling unexpected events l Current applications run in environments such as the Internet or smartphones l Possible sources of errors –Communication partners may disconnect –Message loss –Received data may not have the expected format –Changes in the environment –... l Unexpected events should be managed so to ensure correct behavior even in unreliable environments

5 Compensation handling l In service-oriented computing the concept of a long running transaction has been proposed –Computation that either succeeds or it aborts and is compensated l The compensation needs to take back the system to a correct state –Undoing cannot always be perfect –Approximate rollback l Programming compensations is a delicate task

6 Different primitives in the literature l Long-running transactions used in practice –WS-BPEL, Jolie l A flurry of proposals in the literature –Sagas, StAC, cjoin, SOCK, dcπ, webπ, … l Are the proposed primitives equivalent? l Which are the best ones?

7 A difficult problem l Approaches to compensation handling can differ according to many features –Flat vs nested transactions –Automatic vs programmed abort of subtransactions –Static vs dynamic definition of compensations l Approaches applied to different underlying languages –Differences between the languages may hide differences between the primitives

8 Our approach l Taking the simplest possible calculus (π-calculus) l Adding different primitives to it l Comparing their expressive power l Too many possible differences l We concentrate on static vs dynamic definition of compensations l Decidability of termination (all computations terminate) allows to discriminate them –In a π-calculus without restriction

9 Map of the talk l Long-running transactions l Compensation installation l Gap in the expressive power l Conclusions

10 Static compensations l The compensation code is fixed –Java try P catch e Q –Q is the compensation for the already executed part of P –Q does not depend on when P has been interrupted l First approach that has been proposed l Still the most used in practice (WS-BPEL) l Not flexible enough

11 Dynamic compensations l The compensation can be updated during the computation –To take into account the changes in what has been done l A primitive to define a new compensation is needed –The new compensation may possibly extend the old one

12 Syntax of the calculus

13 Simple examples

14 Simple examples: compensation update

15 Classes of calculi l Dynamic compensations l Nested compensations l Parallel compensations l Replacing compensations l Static compensations

16 Classes of calculi

17

18

19

20 l Dynamic compensations l Nested compensations l Parallel compensations l Replacing compensations l Static compensations –Compensation updates are never used

21 A partial order Dynamic Replacing Nested Parallel Static Are the inclusions strict?

22 A partial order Dynamic Replacing Nested Parallel Static [ESOP2010] Relying on complex conditions on allowed encodings and operators [Here] Decidability of termination

23 Map of the talk l Long-running transactions l Compensation installation l Gap in the expressive power l Conclusions

24 Undecidability for nested compensations l We prove that they can code RAMs l RAMs are a Turing powerful model –Termination is undecidable l A RAM includes –A set of registers containing non negative integers –A set of indexed instructions l Two possible instructions –Inc(r j ): increment r j and go to next instruction –DecJump(r j,s): if r j is 0 go to instruction s, otherwise decrement r j and go to next instruction, l A RAM terminates if an undefined instruction is reached

25 Encoding idea

26 Decidability for parallel/replacing compensations l We exploit the theory of Well-Structured Transition Systems (WSTS) l Termination is known to be decidable for WSTS l We just have to prove that for each process P its derivatives form a WSTS

27 Well Quasi Ordering (wqo) l A reflexive and transitive relation (S,≤) is a wqo if given an infinite sequence s 1,s 2,… of elements in S, there exist i<j such that s i ≤s j

28 Well-Structured Transition System (S,→,≤) is a WSTS if –(S,→) is a finitely branching transition system –(S,≤) is a wqo –Compatibility: for every s 1 →s 2 and s 1 ≤t 1 there exists t 1 →t 2 such that s 2 ≤t 2 s1s1 t2t2 s2s2 t1t1 ≤ ≤

29 Idea of the proof l Given a process P with parallel or replacing compensations in its derivatives –No new names are generated –The set of sequential subprocesses never increases l This is not the case for nested compensations, since they allow to create infinitely many sequential processes l The order in the next slide is a wqo thanks to Higman’s lemma l Compatibility holds l Decidability follows from the theory of WSTS

30 Wqo on processes

31 Map of the talk l Long-running transactions l Compensation installation l Gap in the expressive power l Conclusions

32 Summary l We distinguished different forms of compensation installation l We showed that decidability of termination allows to highlight a gap between –Dynamic and nested compensations on one side –Static, parallel and replacing compensations on the other side l The result is robust –Different ways of managing subtransactions –The same holds for CCS with similar primitives l Absence of restriction is fundamental

33 Future work l Can we give termination preserving encodings of –Dynamic into nested compensations? –Parallel/replacing into static compensations? l The full picture of the expressive power of primitives for long running transactions is still far –Other dimensions –Which is the impact of the underlying calculus?

34 End of talk


Download ppt "Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Decidability Results for Dynamic Installation of Compensation Handlers Joint."

Similar presentations


Ads by Google