Transparent First-class Futures and Distributed Components Introduction: components, futures, and challenges Statically Representing Futures An Example.

Slides:



Advertisements
Similar presentations
PROTOCOL VERIFICATION & PROTOCOL VALIDATION. Protocol Verification Communication Protocols should be checked for correctness, robustness and performance,
Advertisements

Concurrency Important and difficult (Ada slides copied from Ed Schonberg)
1 Temporal Claims A temporal claim is defined in Promela by the syntax: never { … body … } never is a keyword, like proctype. The body is the same as for.
Denis Caromel1 Joint work with Ludovic Henrio – Eric Madelaine et. OASIS members OASIS Team INRIA -- CNRS - I3S – Univ. of Nice Sophia-Antipolis, IUF.
Fabrice Huet Mobility of Active Objects Fabrice Huet INRIA-I3S-CNRS.
Eric MADELAINE1 E. Madelaine, Antonio Cansado, Emil Salageanu OASIS Team, INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis OSCAR meeting, Valparaiso,
Communication in Distributed Systems –Part 2
System-Level Types for Component-Based Design Paper by: Edward A. Lee and Yuhong Xiong Presentation by: Dan Patterson.
.NET Mobile Application Development Remote Procedure Call.
Optimisation of behaviour of component-based distributed systems INRIA - I3S - CNRS – University of Nice Sophia-Antipolis EPC SCALE Galyna Zholtkevych.
Asynchronous Components Asynchronous communications: from calculi to distributed components.
Safe composition of distributed adaptable components A distributed component model Behavioural specification and verification Ludovic Henrio and Eric Madelaine.
Formal Models for Programming and Composing Correct Distributed Systems Jury : Gordon BlairFabienne BoyerEric Madelaine Pascal PoizatMichel RiveillDavide.
Oct Multi-threaded Active Objects Ludovic Henrio, Fabrice Huet, Zsolt Istvàn June 2013 –
Oct Active objects: programming and composing safely large-scale distributed applications Ludovic Henrio SCALE team, CNRS – Sophia Antipolis July.
Dynamic Choreographies Safe Runtime Updates of Distributed Applications Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Joint.
The Grid Component Model and its Implementation in ProActive CoreGrid Network of Excellence, Institute on Programming Models D.PM02 “Proposal for a Grid.
Programming and Verifying Distributed and Adaptable Autonomous Components with GCM/ProActive Ludovic Henrio SCALE Team INRIA – UNS – I3S – CNRS Sophia.
1 Update Strategies for First Class Futures Khan Muhammad, Ludovic Henrio INRIA, Univ. Nice Sophia Antipolis,CNRS.
Formalism and Platform for Autonomous Distributed Components Bio-inspired Networks and Services A Distributed Component Model Formalisation in Isabelle.
Workflow Early Start Pattern and Future's Update Strategies in ProActive Environment E. Zimeo, N. Ranaldo, G. Tretola University of Sannio - Italy.
Eric Madelaine FORTE ’04 -- Madrid sept /25 Parameterized Models for Distributed Java Objects Eric Madelaine work with Tomás Barros, Rabéa Boulifa.
Eric MadelaineOSMOSE -- WP2 -- Prague June 2004 Models for the Verification of Distributed Java Objects Eric Madelaine work with Tomás Barros, Rabéa Boulifa,
New features for CORBA 3.0 by Steve Vinoski Presented by Ajay Tandon.
Denis Caromel1 Troisieme partie Cours EJC 2003, AUSSOIS, Denis Caromel OASIS Team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis.
A Locally Nameless Theory of Objects 1.Introduction:  -calculus and De Bruijn notation 2.locally nameless technique 3.formalization in Isabelle and proofs.
Advanced Computer Networks Topic 2: Characterization of Distributed Systems.
ABSTRACT The real world is concurrent. Several things may happen at the same time. Computer systems must increasingly contend with concurrent applications.
An Ontological Framework for Web Service Processes By Claus Pahl and Ronan Barrett.
Eric MADELAINE1 T. Barros, L. Henrio, E. Madelaine OASIS Team, INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis (FACS’05), Fractal workshop, Grenoble.
Asynchronous Components with Futures: Semantics, Specification, and Proofs in a Theorem Prover Components (Distributed) Futures Formalisations (and proofs)
1 Qualitative Reasoning of Distributed Object Design Nima Kaveh & Wolfgang Emmerich Software Systems Engineering Dept. Computer Science University College.
Behavioural Verification of Distributed Components Ludovic Henrio and Eric Madelaine ICE Florence 1.
Behavioural Verification of Distributed Components Ludovic Henrio and Eric Madelaine ICE
Grid programming with components: an advanced COMPonent platform for an effective invisible grid © GridCOMP Grids Programming with components.
Grid programming with components: an advanced COMPonent platform for an effective invisible grid © 2006 GridCOMP Grids Programming with components. An.
1. 2 Objects to Distributed Components (1) Typed Group Java or Active Object ComponentIdentity Cpt = newActiveComponent (params); A a = Cpt ….getFcInterface.
Middleware Services. Functions of Middleware Encapsulation Protection Concurrent processing Communication Scheduling.
A Component Platform for Experimenting with Autonomic Composition A component framework for supporting composition of autonomic services and bio-inspired.
Chapter 5: Distributed objects and remote invocation Introduction Remote procedure call Events and notifications.
ASPfun: A Distributed Object Calculus and its Formalization in Isabelle Work realized in collaboration with Florian Kammüller and Henry Sudhof (Technische.
Mastère RSD - TC4 2005/20061 Distributed Components –ProActive-Fractal : main concepts –Behaviour models for components –Deployment, management, transformations.
Eric MadelaineOSCAR Workshop -- Santiago Nov Verification of Distributed Applications Eric Madelaine work with Isabelle Attali, Tomás Barros, Rabéa.
A visualisation and debugging tool for multi-active objects Ludovic Henrio, Justine Rochas LAMHA, Nov 2015.
Eric MADELAINE ---- OASIS1 E. Madelaine Oasis team INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis RESECO ’08 Santiago – Nov. 24, 2008 Specification.
Lecture 4 Introduction to Promela. Promela and Spin Promela - process meta language G. Holzmann, Bell Labs (Lucent) C-like language + concurrency dyamic.
Eric MADELAINE1 A. Cansado, L. Henrio, E. Madelaine OASIS Team, INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis Fractal workshop, Nantes, 3 july.
RESECO - Montevideo - 22 nov 2007Reseco, Montevideo, 22 nov 2007 Eric Madelaine - OASIS Team1 Specifying and Generating Safe GCM Components INRIA – Sophia.
VERIFYING THE CORRECT COMPOSITION OF DISTRIBUTED COMPONENTS: FORMALISATION AND TOOL Ludovic Henrio 1, Oleksandra Kulankhina 1,2, Dongqian Liu 3, Eric Madelaine.
G.v. Bochmann, revised Jan Comm Systems Arch 1 Different system architectures Object-oriented architecture (only objects, no particular structure)
Specifying Fractal and GCM Components With UML Solange Ahumada, Ludovic Apvrille, Tomás Barros, Antonio Cansado, Eric Madelaine and Emil Salageanu SCCC.
Tomás BarrosMonday, April 18, 2005FIACRE Toulouse p. 1 Behavioural Models for Hierarchical Components Tomás Barros, Ludovic Henrio and Eric Madelaine.
Distributed Components and Futures: Models and Challenges A Distributed Component Model Distributed Reconfiguration Calculi for Components and Futures.
A Theory of Distributed Objects Toward a Foundation for Component Grid Platforms Ludovic HENRIO l A Theory of Distributed Objects l Components l Perspectives.
Eric MADELAINE1 T. Barros, L. Henrio, E. Madelaine OASIS Team, INRIA -- CNRS - I3S -- Univ. of Nice Sophia-Antipolis DCC, University.
Process Algebra (2IF45) Abstraction Parallel composition (short intro) Suzana Andova.
Mastère RSD - TC4 2005/20061 Distributed JAVA Aims and Principles The ProActive library Models of behaviours Generation of finite (parameterized) models.
GCM/ProActive: a distributed component model, its implementation, and its formalisation Ludovic Henrio OASIS Team INRIA – UNS – I3S – CNRS Sophia Antipolis.
2. CALCULUS: A S P. A Theory of Distributed Objects D. Caromel, L. Henrio, Springer 2005, Monograph A Calculus: ASP: Asynchronous Sequential Processes.
Model Generation for Distributed Java Programs Rabéa Boulifa Eric Madelaine Oasis Team INRIA, Sophia-Antipolis France, I3S, UNSA Luxembourg, November 28,
Distributed Computing & Embedded Systems Chapter 4: Remote Method Invocation Dr. Umair Ali Khan.
ASYNCHRONOUS AND DETERMINISTIC OBJECTS ASP: Asynchronous Sequential Processes l Distributed objects l Asynchronous method calls l Futures and Wait-by-necessity.
Topic 4: Distributed Objects Dr. Ayman Srour Faculty of Applied Engineering and Urban Planning University of Palestine.
Asynchronous Distributed Components: Concurrency and Determinacy I. Context: Distributed Components and Active Objects II. Asynchronous Distributed Components.
Behavioural Models for Distributed Hierarchical Components
Distributed Components and Futures: Models and Challenges
Programming Models for Distributed Application
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
The Grid Component Model and its Implementation in ProActive
Presentation transcript:

Transparent First-class Futures and Distributed Components Introduction: components, futures, and challenges Statically Representing Futures An Example Extension and Conclusion Antonio Cansado, Ludovic Henrio, Eric Madelaine

INTRODUCTION: COMPONENTS, FUTURES, AND CHALLENGES

GCM Components CI.foo(p) Primitive components communicating by asynchronous remote method invocations on interfaces (requests)  Components abstract away distribution and Concurrency in ProActive components are mono-threaded  simplifies concurrency but can create deadlocks

Composition requests

Futures for Components f=CI.foo(p) CI.foo(f)

First-class Futures f=CI.foo(p) ……………… CI.foo(f) Only strict operations are blocking (access to a future) Communicating a future is not a strict operation

First-class Futures f=CI.foo(p) ……………… CI.foo(f) Only strict operations are blocking (access to a future) Communicating a future is not a strict operation

Future Update Strategies In ASP / ProActive, the result is insensitive to the order of replies

Challenges Related to Component and Futures Objective: build a behavioural model for components using transparent first-class futures.  Detect dead-locks, reachability, … Requirements/Challenges: A static representation for futures A static approximation of the flow of futures

What is a Blocked Component? A race condition: A future f is non-blocking iff, under fairness hypothesis: each time the action waitFor(f) is performed, the action getValue(f,val) is eventually reached. A component is non-blocking if all its futures are non-blocking

Components and Futures Components abstract distribution  Future creation points But future flow still to be inferred  component specification language (e.g. JDC) Futures create transparent channels that do not directly follow bindings Components provide interface definition which can be complemented with future flow information

A STATIC REPRESENTATION FOR FUTURES

An Abstract Domain for Futures fut(a) represent an abstract value that can be a future, Lattice of abstract values: if a ≺ b, then a ≺ ′ b, a ≺ ′ fut(b), and fut(a) ≺ ′ fut(b) f=itf.foo(); // creation of a future if (bool) f.bar1(); // wait-by-necessity if bool is true  f.bar2(); // wait-by-necessity if bool is false

A Basic Future Proxy ?call ?response(val) !getValue(val) Caller component (local) Remote component (invoked) This proxy is not sufficient: The caller could be used to transmit future values BUT this would create an additional synchronisation and dead-locks (non First-class futures)

To Forward Futures as Request Parameters f=CI1.foo(p) CI2.foo(f) void foo(Object p) { … CI.bar(p)

To Forward Futures as Request Parameters ?call ?response(val) !getValue(val) !forward(val) ?forward(val) !forward(val) ?forward(val) Add a !forward on the sender side, before !getValue Create a receiver proxy on the receiver side with ?forward instead of ?call and ?response The potential future flow must be known

To Forward a Future as Request Result f’=CI.foo(p); void foo(Object p) { f=CI.bar(p) return f;

To Forward a Future as Request Result ?call ?response(val) !f’.getValue(val) !forward(val) ?forward(val) Replace !getValue by !forward on the sender side Create a receiver proxy somehow f=f’ The future flow must be known f’ f’.forward(val) f.response(val)

Future Update Strategies and Behavioural Specification Our behavioural proxy implements a forward-based strategy responses follow the flow of future references, Like in ProActive, We proved that all strategies are equivalent, Behaviour is compositional, provided the future flow is given. What kind of proxy to use? Sometimes use several proxies and choose when composing behaviours.

An Alternative: Global Futures ?call ?response(val) !getValue(val) ?call ?response(val) !getValue(val) !response(val) Equivalent semantics (ASP), Optimised, i.e. less interleaving, But non compositional

AN EXAMPLE

Component Architecture

Behavioural Model

Details of Components B+C In CADP toolbox: 12 labels, 575 states and 1451 transitions; when minimised using branching bisimulation 52 states and 83 transitions

Properties The system is deadlock free All the futures are updated: System deadlocks if the composite does not support first-class futures System deadlocks if itfB.foo() is synchronous

EXTENSION AND CONCLUSION

Extending the Interface Definitions To be safe, the behavioural model must consider as a future every variable that may be a future Even more complex for objects and fields Extend interface definition with strictness annotations: strict parameters do not need a proxy for future To be ensured by the middleware at serialization: before sending the value check that it is not a future interface DB { Data query(Query q); void insert(Table Data d); }

Conclusion A generic model for futures o New lattice of abstract values o Proxy for future, with modifications for forwarding futures as request/response o Applied to GCM components, but could be applied to other models (cf AmbientTalk, Creol, λfut) o A strategy that guarantees that all futures are updated To specify behaviours and prove properties, particularly deadlocks (cycle of wait-by-necessity on futures in GCM/ProActive) Suggest an extension of interface definition language