Dynamic Choreographies Safe Runtime Updates of Distributed Applications Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Joint.

Slides:



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

1 Ivan Lanese Computer Science Department University of Bologna Italy Managing faults and compensations in SOCK Joint work with Claudio Guidi, Fabrizio.
Towards Adaptive Web-Based Learning Systems Katerina Georgouli, MSc, PhD Associate Professor T.E.I. of Athens Dept. of Informatics Tempus.
1 Reversibility for Recoverability Ivan Lanese Computer Science Department FOCUS research group University of Bologna/INRIA Bologna, Italy.
KAIST CS780 Topics in Interactive Computer Graphics : Crowd Simulation A Task Definition Language for Virtual Agents WSCG’03 Spyros Vosinakis, Themis Panayiotopoulos.
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.
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.
1 SOCK and JOLIE from the formal basis to a service oriented programming language Ivan Lanese Computer Science Department University of Bologna Italy Joint.
1 Ivan Lanese Computer Science Department University of Bologna Italy Behavioural Theory for SSCC Joint work with Luis Cruz-Filipe, Francisco Martins,
1 Ivan Lanese Computer Science Department University of Bologna Italy Evolvable systems: some ideas for modelling With input from Davide Sangiorgi, Fabrizio.
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 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 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.
1 Ivan Lanese Computer Science Department University of Bologna Italy Streaming Services in SSCC Joint work with Francisco Martins, Vasco Vasconcelos and.
1 FM Overview of Adaptation. 2 FM RAPIDware: Component-Based Design of Adaptive and Dependable Middleware Project Investigators: Philip McKinley, Kurt.
Sharif University of Technology Session # 7.  Contents  Systems Analysis and Design  Planning the approach  Asking questions and collecting data 
1 Joint work with Antonio Bucchiarone (Fondazione Bruno Kessler - IRST, Trento) and Fabrizio Montesi (University of Bologna/INRIA, Bologna) A Framework.
Principles of Programming Chapter 1: Introduction  In this chapter you will learn about:  Overview of Computer Component  Overview of Programming 
Tsinghua University Service-Oriented Enterprise Coordination Prof. Dr. Yushun Fan Department of Automation, Tsinghua University,
Introduction to the Enterprise Library. Sounds familiar? Writing a component to encapsulate data access Building a component that allows you to log errors.
THE NEXT STEP IN WEB SERVICES By Francisco Curbera,… Memtimin MAHMUT 2012.
Design patterns. What is a design pattern? Christopher Alexander: «The pattern describes a problem which again and again occurs in the work, as well as.
Aspect Oriented Programming Razieh Asadi University of Science & Technology Mazandran Babol Aspect Component Based Software Engineering (ACBSE)
Supporting Heterogeneous Users in Collaborative Virtual Environments using AOP CoopIS 2001 September 5-7, Trento, Italy M. Pinto, M. Amor, L. Fuentes,
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
Formalizing the Asynchronous Evolution of Architecture Patterns Workshop on Self-Organizing Software Architectures (SOAR’09) September 14 th 2009 – Cambrige.
Composing Adaptive Software Authors Philip K. McKinley, Seyed Masoud Sadjadi, Eric P. Kasten, Betty H.C. Cheng Presented by Ana Rodriguez June 21, 2006.
Towards Global and Local Types for Adaptation Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Joint work with Mario Bravetti,
Patterns and Reuse. Patterns Reuse of Analysis and Design.
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.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Design Model Lecture p6 T120B pavasario sem.
Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Decidability Results for Dynamic Installation of Compensation Handlers Joint.
CSE 332: Design Patterns Review: Design Pattern Structure A design pattern has a name –So when someone says “Adapter” you know what they mean –So you can.
CSE:141 Introduction to Programming Faculty of Computer Science, IBA BS-I (Spring 2010) Lecture 2.
Architecture View Models A model is a complete, simplified description of a system from a particular perspective or viewpoint. There is no single view.
1 Joint work with Claudio Antares Mezzina and Jean-Bernard Stefani Controlled Reversibility and Compensations Ivan Lanese Focus research group Computer.
How to Program? -- Part 1 Part 1: Problem Solving –Analyze a problem –Decide what steps need to be taken to solve it. –Take into consideration any special.
Dr. Rebhi S. Baraka Advanced Topics in Information Technology (SICT 4310) Department of Computer Science Faculty of Information Technology.
Review of Parnas’ Criteria for Decomposing Systems into Modules Zheng Wang, Yuan Zhang Michigan State University 04/19/2002.
Concepts and Realization of a Diagram Editor Generator Based on Hypergraph Transformation Author: Mark Minas Presenter: Song Gu.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
From Use Cases to Implementation 1. Structural and Behavioral Aspects of Collaborations  Two aspects of Collaborations Structural – specifies the static.
Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Adaptive Choreographies Joint work with Mila Dalla Preda, Jacopo Mauro and Maurizio.
From Use Cases to Implementation 1. Mapping Requirements Directly to Design and Code  For many, if not most, of our requirements it is relatively easy.
Software, IEE Proceedings, Vol.152, Num.3, June 2005,Page(s): Prasanthi.S March, Java-based component framework for dynamic reconfiguration.
1 M206 Chapter 31: An Overview of Software Development 1.Defining the problem 2.Analyzing the requirement – constructing initial structural model 3.Analyzing.
Fundamentals of Fault-Tolerant Distributed Computing In Asynchronous Environments Paper by Felix C. Gartner Graeme Coakley COEN 317 November 23, 2003.
Adding Concurrency to a Programming Language Peter A. Buhr and Glen Ditchfield USENIX C++ Technical Conference, Portland, Oregon, U. S. A., August 1992.
Names and Attributes Names are a key programming language feature
Dronely: A Visual Block Programming Language for the Control of Drones
Deadlock Freedom by Construction
Choreographies: the idea
Internet of Things A Process Calculus Approach
Chapter 20 Object-Oriented Analysis and Design
Chapter 5 Architectural Design.
Chapter 5 Architectural Design.
From Use Cases to Implementation
Presentation transcript:

Dynamic Choreographies Safe Runtime Updates of Distributed Applications Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Joint work with Mila Dalla Preda, Maurizio Gabbrielli, Saverio Giallorenzo and Jacopo Mauro

Map of the talk l Choreographic programming l Dynamic updates l Results l Conclusion

Map of the talk l Choreographic programming l Dynamic updates l Results l Conclusion

Choreographic programming: aim l Distributed applications are normally programmed using send and receive primitives –Difficult and error-prone –Deadlocks, races,... l Choreographic programming aims at solving these problems by raising the level of abstraction

Choreographic programming: basics l The basic building block is an interaction, i.e. a communication between two participants –Not a send or a receive l Interactions can be composed using standard constructs: sequences, conditionals, cycles,... l One choreographic program describes a whole distributed application –Not a single participant

Choreographic syntax

A sample choreographic program

Advantages of choreographic programming l Clear view of the global behavior l No deadlocks and races since send and receive are paired into interactions

How to execute choreographic programs? l Most constructs involve many participants l What each participant should do? l We want to compile the choreographic program into a local code for each participant l We define a projection function to this end l When executed, the derived participants should interact as specified in the choreographic program –Correctness of the compilation –No deadlocks and no races

The target language

Projection: basic idea

Projection: problems and solutions

Map of the talk l Choreographic programming l Dynamic updates l Results l Conclusion

Dynamic updates l We want to change the code of running applications, by integrating new pieces of code coming from outside l Those pieces of code are called updates l The set of updates –is not known when the application is designed, programmed or even started –may change at any moment and without notice l Many possible uses –Deal with emergency behavior –Deal with changing business rules or environment conditions –Specialise the application to user preferences

Our approach, syntactically

Our approach, semantically

Our approach, graphically

proj

Our approach, graphically proj

A sample update

Making the choreographic program updatable

Dynamic updates: challenges l All the participants should agree on –whether to update a scope or not –in case, which update to apply l All the participants need to retrieve (their part of) the update –Not easy, since updates may disappear l No participant should start executing a scope that needs to be updated

Dynamic updates: our approach l For each scope a single participant coordinates its execution –Decides whether to update it or not, and which update to apply –Gets the update, and sends to the other participants their part l The other participants wait for the decision before executing the scope l We add scopes (and higher-order communications) to the target language, with the semantics above

Compositionality issue l Applying an update at the choreographic level results in a new choreographic program, composed by –The unchanged part of the old choreographic program –The update l Even if the two parts are connected, the result may not be connected l Auxiliary communications are added to ensure connectedness

Map of the talk l Choreographic programming l Dynamic updates l Results l Conclusion

Results l A choreographic program and its projection behave the same –They have the same set of traces (up to auxiliary actions) –Under all possible, dynamically changing, sets of updates l The projected application is deadlock free and race free by construction l These results are strong given that we are considering an application which is –distributed –updatable

Implementation l Our result is quite abstract, and can be instantiated in different ways l AIOCJ is one such way [SLE 2014] l A framework for safe rule-based adaptation of distributed applications l Updates are embedded into adaptation rules specifying when and where to apply them l Scopes include some more information driving the application of adaptation rules l Projection produces service-oriented code l

Map of the talk l Choreographic programming l Dynamic updates l Results l Conclusion

Conclusion l A choreographic approach to dynamic updates l The derived distributed application follows the behavior defined by the choreographic program l We ensures deadlock freedom and race freedom in a challenging setting l We instantiated the theoretical framework to adaptable service-oriented applications

Future work l Extend the approach to asynchronous communication l How to cope with multiple interleaved sessions? l How to improve the performance? –Drop redundant auxiliary communications l Can we instantiate our approach on existing frameworks for adaptation? –E.g., dynamic aspect-oriented programming –To inject correctness guarentees

End of talk