Francesco Tiezzi IMT Advanced Studies Lucca Causal-Consistent Reversibility in a Tuple-Based Distributed Language Joint work with Elena Giachino, Ivan.

Slides:



Advertisements
Similar presentations
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Transaction Management Overview Chapter 16.
Advertisements

1 Reversibility for Recoverability Ivan Lanese Computer Science Department FOCUS research group University of Bologna/INRIA Bologna, Italy.
CMPT 401 Summer 2007 Dr. Alexandra Fedorova Lecture X: Transactions.
Query Evaluation. An SQL query and its RA equiv. Employees (sin INT, ename VARCHAR(20), rating INT, age REAL) Maintenances (sin INT, planeId INT, day.
Transactions A process that reads or modifies the DB is called a transaction. It is a unit of execution of database operations. Basic JDBC transaction.
Recovery from Crashes. Transactions A process that reads or modifies the DB is called a transaction. It is a unit of execution of database operations.
CMPT Dr. Alexandra Fedorova Lecture X: Transactions.
Recovery from Crashes. ACID A transaction is atomic -- all or none property. If it executes partly, an invalid state is likely to result. A transaction,
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.
A denotational framework for comparing models of computation Daniele Gasperini.
1 Synchronization strategies for global computing models Ivan Lanese Computer Science Department University of Bologna.
1 Ivan Lanese Computer Science Department University of Bologna Roberto Bruni Computer Science Department University of Pisa A mobile calculus with parametric.
Quick Review of May 1 material Concurrent Execution and Serializability –inconsistent concurrent schedules –transaction conflicts serializable == conflict.
1 Transaction Management Overview Yanlei Diao UMass Amherst March 15, 2007 Slides Courtesy of R. Ramakrishnan and J. Gehrke.
1 Ivan Lanese Computer Science Department University of Bologna Italy Behavioural Theory for SSCC Joint work with Luis Cruz-Filipe, Francisco Martins,
Bridging the gap between Interaction- and Process-Oriented Choreographies Talk by Ivan Lanese Joint work with Claudio Guidi, Fabrizio Montesi and Gianluigi.
Bridging the gap between Interaction- and Process-Oriented Choreographies Talk by Ivan Lanese Joint work with Claudio Guidi, Fabrizio.
Bridging the gap between Interaction- and Process-Oriented Choreographies Talk by Ivan Lanese Joint work with Claudio Guidi, Fabrizio Montesi and Gianluigi.
1 Formal Models for Transactions: Zero Safe Nets Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and.
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.
Operational Semantics Semantics with Applications Chapter 2 H. Nielson and F. Nielson
A Klaim specification of the Handover protocol: logic-based and type-based analysis Michele Loreti and Daniele Gorla Dipartimento di Sistemi e Informatica.
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 Behavioural Theory at Work: Program Transformations in a Service-centred Calculus.
An algebra of Connectors for modeling CommUnity with Tiles joint work with Roberto Bruni Ugo Montanari Dipartimento di Informatica Università di Pisa Ivan.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 10 Transaction Management and Concurrency Control.
Transactions and Recovery
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 Transaction Management Overview Chapter Transactions  Concurrent execution of user programs is essential for good DBMS performance.  Because.
Database Management Systems, 2 nd Edition. R. Ramakrishnan and J. Gehrke1 Transaction Management Overview Chapter 18.
Dynamic Choreographies Safe Runtime Updates of Distributed Applications Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Joint.
Formalizing the Asynchronous Evolution of Architecture Patterns Workshop on Self-Organizing Software Architectures (SOAR’09) September 14 th 2009 – Cambrige.
Workflow Early Start Pattern and Future's Update Strategies in ProActive Environment E. Zimeo, N. Ranaldo, G. Tretola University of Sannio - Italy.
Database Management Systems, 2 nd Edition. R. Ramakrishnan and J. Gehrke1 Transaction Management Overview Lecture 21 Ramakrishnan - Chapter 18.
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.
On Reducing the Global State Graph for Verification of Distributed Computations Vijay K. Garg, Arindam Chakraborty Parallel and Distributed Systems Laboratory.
CMPT 454, Simon Fraser University, Fall 2009, Martin Ester 294 Database Systems II Coping With System Failures.
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.
1 Reversible Debugging Ivan Lanese Focus research group Computer Science and Engineering Department University of Bologna/INRIA Bologna, Italy Joint work.
1 Joint work with Claudio Antares Mezzina and Jean-Bernard Stefani Controlled Reversibility and Compensations Ivan Lanese Focus research group Computer.
Transaction Management and Recovery, 2 nd Edition. R. Ramakrishnan and J. Gehrke1 Transaction Management Overview Chapter 18.
MA/CSSE 474 Theory of Computation How many regular/non-regular languages are there? Closure properties of Regular Languages (if there is time) Pumping.
Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Causal-Consistent Reversibility in a Tuple-Based Distributed Language Joint work.
SYSTEMS IMPLEMENTATION TECHNIQUES TRANSACTION PROCESSING DATABASE RECOVERY DATABASE SECURITY CONCURRENCY CONTROL.
Chapter 8: Concurrency Control on Relational Databases
Transaction Management and Concurrency Control
Transaction Management Overview
Operating System Reliability
Operating System Reliability
Transaction Management Overview
Transaction Management Overview
Operating System Reliability
Internet of Things A Process Calculus Approach
Operating System Reliability
open problems Claudio Antares Mezzina
Instructor: Aaron Roth
Operating System Reliability
Transaction Management Overview
Transaction Management Overview
Operating System Reliability
Operating System Reliability
Presentation transcript:

Francesco Tiezzi IMT Advanced Studies Lucca Causal-Consistent Reversibility in a Tuple-Based Distributed Language Joint work with Elena Giachino, Ivan Lanese and Claudio Mezzina CINA 2nd Gen. Meeting 19 February 2014 Bologna

Map of the talk l Reversibility l Klaim l Uncontrolled reversibility in Klaim l Controlling reversibility: roll operator l Conclusions

What is reversibility? Reversibility everywhere –chemistry/biology –quantum computing –state space exploration –… The possibility of executing a computation both in the standard, forward direction, and in the backward direction, going back to a past state

Our aim l We want to exploit reversibility for programming reliable concurrent/distributed systems –To make a system reliable we want to avoid “bad” states –If a bad state is reached, reversibility allows to go back to some past state l Understanding reversibility is the key to –Understand existing patterns for programming reliable systems, e.g. checkpointing, rollback-recovery, transactions, … –Combine and improve them –Develop new patterns

Reverse execution of a sequential program l Recursively undo the last step –Computations are undone in reverse order –To reverse A;B reverse B, then reverse A l We want the Loop Lemma to hold –From state S, doing A and then undoing A should lead back to S –From state S, undoing A (if A is in the past) and then redoing A should lead back to S

Different approaches to reversibility l Undoing computational steps, not necessarily easy –Computation steps may cause loss of information –X=5 causes the loss of the past value of X l Considering languages which are reversible –Featuring only actions that cause no loss of information l Taking a language which is not reversible and make it reversible –One should save information on the past configurations –X=5 becomes reversible by recording the old value of X

Reversibility and concurrency l In a sequential setting, recursively undo the last action l Which is the last action in a concurrent setting? –Many possibilities –For sure, if an action A caused an action B, A could not be the last one l Causal-consistent reversibility: recursively undo any action whose consequences (if any) have already been undone

Causal-consistent reversibility

Reversibility and concurrency l Causal-consistent reversibility allows one to distinguish non-determinism from concurrency l Two sequential actions whose order is chosen nondeterminstically should be reversed in reverse order l Two concurrent actions can be reversed in any order –Choosing an interleaving for them is an arbitrary choice –It should have no impact on the possible reverse behaviors

Map of the talk l Reversibility l Klaim l Uncontrolled reversibility in Klaim l Controlling reversibility: roll operator l Conclusions

Klaim l Coordination language based on distributed tuple spaces –Linda operations for creating and accessing tuples –Tuples accessed via pattern-matching l Klaim nets composed by distributed nodes containing processes and data (tuples) l We consider a subset of Klaim called μKlaim

μKlaim syntax

μKlaim semantics

Evaluation-closed relation A relation is evaluation closed if it is closed under active contexts N1 N1′ implies N1 || N2 N1′ || N2 and (νl) N1 (νl)N1′ and under structural congruence N≡M M′ ≡N′ implies N N′ μKlaim semantics The μKlaim reduction relation is the smallest evaluation- closed relation satisfying the rules in previous slide

Example

Map of the talk l Reversibility l Klaim l Uncontrolled reversibility in Klaim l Controlling reversibility: roll operator l Conclusions

Making μKlaim reversible l We define RμKlaim, an extension of μKlaim allowing: - forward actions, modeling μKlaim actions - backward actions, undoing them l Some new problems arise l Read dependencies –Two reads on the same tuple should not create dependences –If the out creating the tuple is undone then reads on the tuple should be undone too l Localities –Localities are now resources and establish dependences –To undo a newloc one has to undo all the operations on the created locality

RμKlaim syntax

RμKlaim semantics – tuple operators

RμKlaim semantics – distribution operators

Example

execute in in l 2 execute out in l 2 execute in in l 3 execute out in l 3

Example execute in in l 2 execute out in l 2 execute in in l 3 execute out in l 3 it needs to perform a backward step

Properties l The forward semantics of RμKlaim follows the semantics of μKlaim l The Loop Lemma holds –i.e., each reduction in RμKlaim has an inverse l RμKlaim is causally consistent –same approach of previous works –different technicalities (due to more complex causality structure)

Concurrency in RμKlaim l Two transitions are concurrent unless ‒ They use the same resource ‒ At least one transition does not use it in read-only modality l Resources defined by function λ on memories l Read uses the tuple in read-only modality l All primitives but newloc use the locality name in read- only modality

Causal consistency l Causal equivalence identifies traces that differ only for ‒ swaps of concurrent transitions ‒ simplifications of inverse transitions l Casual consistency: there is a unique way to go from one state to another one up to causal equivalence –causal equivalent traces can be reversed in the same ways –traces which are not causal equivalent lead to distinct nets

Map of the talk l Reversibility l Klaim l Uncontrolled reversibility in Klaim l Controlling reversibility: roll operator l Conclusions

Controlling reversibility l Uncontrolled reversibility is not suitable for programming l We use reversibility to define a roll operator –To undo a given past action –And all its consequences l We call CRμKlaim the extension of μKlaim with roll

CRμKlaim syntax

l From l We get l When we undo the out we need to restore the in Example

CRμKlaim semantics l M is complete and depends on k l N t : if the undone action is an in, we should release the tuple l N l : we should not consume the roll locality, unless created by the undone computation l N : resources consumed by the computation should be released

Results l CRμKlaim is a controlled version of RμKlaim l It inherits all its properties

Map of the talk l Reversibility l Klaim l Uncontrolled reversibility in Klaim l Controlling reversibility: roll operator l Conclusions

Summary l We defined uncontrolled and controlled causal-consistent reversibility for μKlaim l Two main features taken into account –Read dependences –Localities

Future work l Part of HOπ theory not yet transported to μKlaim –Encoding of the reversible language in the basic one »Would allow to exploit Klaim implementations –Low-level controlled semantics –Alternatives l The killer application may be in the field of STM

Thanks! Questions?

5th International Workshop on Modeling and Simulation of Peer-to-Peer and Autonomic Systems (MOSPAS 2014) July 21-25, Bologna, Italy Submission Deadline: March 11, 2014