1 Joint work with Claudio Antares Mezzina and Jean-Bernard Stefani Controlled Reversibility and Compensations Ivan Lanese Focus research group Computer.

Slides:



Advertisements
Similar presentations
1 Verification by Model Checking. 2 Part 1 : Motivation.
Advertisements

1 Ivan Lanese Computer Science Department University of Bologna Italy Managing faults and compensations in SOCK Joint work with Claudio Guidi, Fabrizio.
Transactions and Recovery Checkpointing Souhad Daraghma.
Lock-Based Concurrency Control
1 Reversibility for Recoverability Ivan Lanese Computer Science Department FOCUS research group University of Bologna/INRIA Bologna, Italy.
Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Fault in the Future Joint work with Gianluigi Zavattaro and Einar Broch Johnsen.
1 Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Fault Model Design Space for Cooperative Concurrency Joint work with Michael.
Chapter 19 Database Recovery Techniques
1 Ivan Lanese Computer Science Department University of Bologna Italy On the Interplay between Fault Handling and Request-response Service Invocations.
Recovery 10/18/05. Implementing atomicity Note, when a transaction commits, the portion of the system implementing durability ensures the transaction’s.
1 Ivan Lanese Computer Science Department University of Bologna Italy Exploiting user-definable synchronizations in graph transformation.
1 The SOCK SAGA Ivan Lanese Computer Science Department University of Bologna Italy Joint work with Gianluigi Zavattaro.
Ivan Lanese Computer Science Department University of Bologna/INRIA Italy On the Expressive Power of Primitives for Compensation Handling Joint work with.
1 Ivan Lanese Computer Science Department University of Bologna Roberto Bruni Computer Science Department University of Pisa A mobile calculus with parametric.
Spring 2004 ECE569 Lecture ECE 569 Database System Engineering Spring 2004 Transaction Models Yanyong Zhang
1 SOCK and JOLIE from the formal basis to a service oriented programming language Ivan Lanese Computer Science Department University of Bologna Italy Joint.
CS-550 (M.Soneru): Recovery [SaS] 1 Recovery. CS-550 (M.Soneru): Recovery [SaS] 2 Recovery Computer system recovery: –Restore the system to a normal operational.
1 Building with Assurance CSSE 490 Computer Security Mark Ardis, Rose-Hulman Institute May 10, 2004.
Transaction Processing IS698 Min Song. 2 What is a Transaction?  When an event in the real world changes the state of the enterprise, a transaction is.
1 Ivan Lanese Computer Science Department University of Bologna Italy Evolvable systems: some ideas for modelling With input from Davide Sangiorgi, Fabrizio.
Chapter 19 Database Recovery Techniques. Slide Chapter 19 Outline Databases Recovery 1. Purpose of Database Recovery 2. Types of Failure 3. Transaction.
1 Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Error Handling: From Theory to Practice Joint work with Fabrizio Montesi italianaSoftware.
1 Static vs dynamic SAGAs Ivan Lanese Computer Science Department University of Bologna/INRIA Italy.
1 Joint work with Claudio Antares Mezzina (INRIA), Jean-Bernard Stefani (INRIA) and Alan Schmitt (INRIA) Controlling Reversibility in Rhopi Ivan Lanese.
1 Ivan Lanese Computer Science Department University of Bologna Italy Concurrent and located synchronizations in π-calculus.
Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Fault in the Future Joint work with Gianluigi Zavattaro and Einar Broch Johnsen.
1 Programming SAGAs in SOCK Ivan Lanese Computer Science Department University of Bologna Italy Joint work with Gianluigi Zavattaro The SOCK saga.
1 Ivan Lanese Computer Science Department University of Bologna Italy On the expressive power of primitives for compensation handling Joint work with Catia.
1 Ivan Lanese Computer Science Department University of Bologna Italy Towards a Unifying Theory for Web Services Composition Manuel Mazzara Faculty of.
1 Joint work with Antonio Bucchiarone (Fondazione Bruno Kessler - IRST, Trento) and Fabrizio Montesi (University of Bologna/INRIA, Bologna) A Framework.
Backup and Recovery Part 1.
Academic Year 2014 Spring. MODULE CC3005NI: Advanced Database Systems “DATABASE RECOVERY” (PART – 1) Academic Year 2014 Spring.
Transactional Web Services, WS-Transaction and WS-Coordination Based on “WS Transaction Specs,” by Laleci, Introducing WS-Transaction Part 1 & 2, by Little.
1 Rollback-Recovery Protocols II Mahmoud ElGammal.
1 Reversibility for Concurrent Interacting Systems Ivan Lanese Focus research group Computer Science and Engineering Department University of Bologna/INRIA.
1 Joint work with Michael Lienhardt (PPS), Claudio Antares Mezzina (Trento), Jean-Bernard Stefani (INRIA) and Alan Schmitt (INRIA) Reversibility in Concurrency.
1 Database Systems CS204 Lecture 21 Transaction Processing I Asma Ahmad FAST-NU April 7, 2011.
Granularity of Locks and Degrees of Consistency in a Shared Database J.N. Gray, R.A. Lorie, G.R. Putzolu, I.L. Traiger 1977 (Presentation by Randy Ellis)
Dynamic Choreographies Safe Runtime Updates of Distributed Applications Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Joint.
Chapter 19 Recovery and Fault Tolerance Copyright © 2008.
Switch off your Mobiles Phones or Change Profile to Silent Mode.
Transaction Processing Concepts. 1. Introduction To transaction Processing 1.1 Single User VS Multi User Systems One criteria to classify Database is.
Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Amending Choreographies Joint work with Fabrizio Montesi and Gianluigi Zavattaro.
1 Causal-Consistent Reversible Debugging Ivan Lanese Focus research group Computer Science and Engineering Department University of Bologna/INRIA Bologna,
Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Causal-Consistent Reversibility in a Tuple-Based Language Joint work with Elena.
Chapter 15 Recovery. Topics in this Chapter Transactions Transaction Recovery System Recovery Media Recovery Two-Phase Commit SQL Facilities.
Optimistic Design 1. Guarded Methods Do something based on the fact that one or more objects have particular states  Make a set of purchases assuming.
Lyra – A service-oriented and component-based method for the development of communicating systems (by Sari Leppänen, Nokia/NRC) Traditionally, the design,
“Dynamic fault handling mechanisms for service-oriented applications” Fabrizio Montesi, Claudio Guidi, Ivan Lanese and Gianluigi Zavattaro Department of.
Computer Science and Engineering Computer System Security CSE 5339/7339 Session 21 November 2, 2004.
Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Decidability Results for Dynamic Installation of Compensation Handlers Joint.
Database Systems Recovery & Concurrency Lecture # 20 1 st April, 2011.
Chapter 10 Recovery System. ACID Properties  Atomicity. Either all operations of the transaction are properly reflected in the database or none are.
1 Reversible Debugging Ivan Lanese Focus research group Computer Science and Engineering Department University of Bologna/INRIA Bologna, Italy Joint work.
Academic Year 2014 Spring. MODULE CC3005NI: Advanced Database Systems “DATABASE RECOVERY” (PART – 2) Academic Year 2014 Spring.
Transactions.
Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks.
Movement-Based Check-pointing and Logging for Recovery in Mobile Computing Systems Sapna E. George, Ing-Ray Chen, Ying Jin Dept. of Computer Science Virginia.
Francesco Tiezzi IMT Advanced Studies Lucca Causal-Consistent Reversibility in a Tuple-Based Distributed Language Joint work with Elena Giachino, Ivan.
Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Adaptive Choreographies Joint work with Mila Dalla Preda, Jacopo Mauro and Maurizio.
Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Causal-Consistent Reversibility in a Tuple-Based Distributed Language Joint work.
Week#3 Software Quality Engineering.
Database Recovery Techniques
Database Recovery Techniques
CS 632 Lecture 6 Recovery Principles of Transaction-Oriented Database Recovery Theo Haerder, Andreas Reuter, 1983 ARIES: A Transaction Recovery Method.
Internet of Things A Process Calculus Approach
open problems Claudio Antares Mezzina
Database Recovery 1 Purpose of Database Recovery
EEC 688/788 Secure and Dependable Computing
Abstractions for Fault Tolerance
Presentation transcript:

1 Joint work with Claudio Antares Mezzina and Jean-Bernard Stefani Controlled Reversibility and Compensations Ivan Lanese Focus research group Computer Science Department University of Bologna/INRIA Italy

Roadmap l Reversibility and concurrency l Controlling reversibility l Compensations l Conclusions

Roadmap l Reversibility and concurrency l Controlling reversibility l Compensations l Conclusions

Why we are interested in reversibility? l We want programming abstractions for dependable distributed systems l Different proposals in the literature –Exception handling, checkpointing, transactions, … l Unrelated proposals, difficult to combine and compose l Is there a unifying concept? l … most of them include some form of undo

What if we could undo every action? l Very low-level mechanism l Can we build suitable abstractions on top of it? l Can we recover and better understand traditional error recovery schemes? l Can we find new schemes or combine old ones?

Reversing concurrent systems l What does it mean to go back one step for a concurrent system? l First approach in Reversible Communicating Systems. CONCUR 2004 by V. Danos and J. Krivine

Reversible Communicating Systems l Presents the RCCS calculus –A reversible version of CCS l Causal consistent reversibility –Transitions should be rollbacked in any order compatible with causal dependencies

Causal consistent reversibility a a b b

Many reversible calculi l Reversible variants of many calculi have been studied –CCS-like calculi: Phillips & Ulidowski [FoSSaCS 2006, JLAP 2007] –HOπ: Lanese, Mezzina & Stefani [CONCUR 2010] –μOz: Lienhardt, Lanese, Mezzina & Stefani [FMOODS&FORTE 2012] l All causally consistent l All allowing to reverse each single step l All providing perfect reversibility

End of the story? l These calculi specify how to reverse computations, but not when l If programs choose nondeterministically whether to go back or to go forward we get useless programs –Always diverge –If I get a result I cannot make it persistent

Roadmap l Reversibility and concurrency l Controlling reversibility l Compensations l Conclusions

Controlling reversibility l We want techniques to decide when to go back and when to go forward –Avoiding the drawbacks described before l The technique depends on the aim of reversibility l For error recovery –Normal computation is forward –In case of error, go back to reach a consistent state »Requires to undo many steps at the time l Go back n steps is not meaningful –In a concurrent setting it is not clear which the last steps are

Who should control reversibility? l Different possibilities l We propose a taxonomy –Internal control: reversibility is controlled by the programmer –External control: reversibility is controlled by the environment –Semantic control: reversibility control is embedded in the semantics of the language

Internal control l Some approaches in the literature –Irreversible actions (Danos&Krivine [CONCUR 2005]) »Cannot be executed backward »Allow to make a result persistent »Allow to model a form of (non nested) transaction »Still most programs are divergent –Roll operator (Lanese, Mezzina, Schmitt & Stefani [CONCUR 2011]) »Allows to undo a past action and all its consequences »If no roll points back past an action then the effect of the action is persistent »Allow to model checkpointing »Still most programs are divergent

External control l Not much studied yet in a concurrent setting l Seems interesting in some scenarios l Hierarchical component-based systems –The father component controls the direction of execution of its child –It needs information on the state of the child »E.g., the child should notify errors l Concurrent reversible debugger –The user controls whether the program under test should execute backward or forward –Backward execution in form of “undo this past action”

Semantic control l Reversibility policy embedded in the language l E.g., count how many times actions have been done and undone and always try new possibilities –Good for research in a state space –Different euristics may improve the efficiency l Bacci, Danos & Kammar [CALCO 2011] –Steps are taken subject to some probability –Rate depends on some energy parameters –There is a lower bound on energy allowing to commit a forward computation in finite average time

How to avoid divergence? l With internal control perfect reversibility leads to divergence –When I go back to a past state I can always go forward again along the same path l I want reversibility but not perfect reversibility –I go back, but I change something in the state –To remember past tries and learn from them –We advocate the use of compensations »From database and business process management –Compensation: ad hoc piece of code executed in case of error to go back to a consistent state

Roadmap l Reversibility and concurrency l Controlling reversibility l Compensations l Conclusions

Compensations and reversibility l Perfect reversibility –A;P : do A, then do P –If P contains a rollback of A we go back to A;P –We may redo the same error again, possibly forever l I add compensations to actions –A%B;P: do A (with compensation B), then do P –If P contains a rollback of A we go to B;P –Different state than before, hopefully no error now

Different kinds of compensations l Consider we want to compensate a failed booking of an airplane l Standard compensation: get back the money paid –Done automatically in a reversible setting l Replacing compensation: try again, with a different approach –Try to book using a different airline l Tracing compensation: remember the experience and learn from it –Remember that the tried airline is not good

Not only a matter of flavor l Consider nested transactions l E.g., airline booking part of travel booking l In case of travel failure –replacing compensations should be eliminated –tracing compensations should be preserved l Difference related to their interaction with the causality structure of the computation

Roadmap l Reversibility and concurrency l Controlling reversibility l Compensations l Conclusions

Summary l A classification of possible ways of controlling reversibility l A description of how to combine reversibility and compensations l A classification of different flavors of compensations

Future work l Many threads of research outlined here, still to be completed l Making real concurrent languages reversible –Concurrent ML? Erlang? Java? l Fully explore the design space of controlled reversibility –External control –Other primitives for internal control »Combining irreversible actions and rollback –Euristics for semantic control l Studying a language with rollback and compensations –Semantics –Behavioral theory –Applying it to recover existing error recovery frameworks

Finally