From Theory to Practice in Transactional Composition of Web Services Daniele Strollo Roberto Bruni, Gianluigi Ferrari, Hernàn Melgratti, Ugo Montanari,

Slides:



Advertisements
Similar presentations
1 Ivan Lanese Computer Science Department University of Bologna Italy Managing faults and compensations in SOCK Joint work with Claudio Guidi, Fabrizio.
Advertisements

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.
Background information Formal verification methods based on theorem proving techniques and model­checking –to prove the absence of errors (in the formal.
A university for the world real R © 2009, Chapter 15 The Business Process Execution Language Chun Ouyang Marlon Dumas Petia Wohed.
Dependable Composition of Web Services and Process Calculi Manuel Mazzara Newcastle University.
Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page: Lecture.
1 The SOCK SAGA Ivan Lanese Computer Science Department University of Bologna Italy Joint work with Gianluigi Zavattaro.
CS 290C: Formal Models for Web Software Lecture 10: Language Based Modeling and Analysis of Navigation Errors Instructor: Tevfik Bultan.
IBM WebSphere survey Kristian Bisgaard Lassen. University of AarhusIBM WebSphere survey2 Tools  WebSphere Application Server Portal Studio Business Integration.
1 Formal Models for Distributed Negotiations Description Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias Informaticas.
Comparing Two Approaches to Compensable Flow Composition joint work with Michael Butler Carla Ferreira Tony Hoare Hernán Melgratti Ugo Montanari CONCUR.
1 SOCK and JOLIE from the formal basis to a service oriented programming language Ivan Lanese Computer Science Department University of Bologna Italy Joint.
PROCESS MODELING Transform Description. A model is a representation of reality. Just as a picture is worth a thousand words, most models are pictorial.
1 Ivan Lanese Computer Science Department University of Bologna Italy Evolvable systems: some ideas for modelling With input from Davide Sangiorgi, Fabrizio.
Application architectures
Bridging the gap between Interaction- and Process-Oriented Choreographies Talk by Ivan Lanese Joint work with Claudio Guidi, Fabrizio Montesi and Gianluigi.
1 Static vs dynamic SAGAs Ivan Lanese Computer Science Department University of Bologna/INRIA Italy.
HAS. Patterns The use of patterns is essentially the reuse of well established good ideas. A pattern is a named well understood good solution to a common.
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 Formal Languages for Flow Composition and Compensation: Sagas Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination.
1 Ivan Lanese Computer Science Department University of Bologna Italy On the expressive power of primitives for compensation handling Joint work with Catia.
1 Formal Models for Transactions: BizTalk as ZSN Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and.
Calculi for Committed Choices and Compensations Roberto Bruni - Dipartimento di Informatica, Università di Pisa joint work with Gianluigi Ferrari Hernán.
Lesson-21Process Modeling Define systems modeling and differentiate between logical and physical system models. Define process modeling and explain its.
Course Instructor: Aisha Azeem
Transactional Web Services, WS-Transaction and WS-Coordination Based on “WS Transaction Specs,” by Laleci, Introducing WS-Transaction Part 1 & 2, by Little.
McGill University Proposal Exam School of Computer Science Ph.D. Candidate in the Modelling, Simulation and Design Lab Eugene Syriani.
Advances in Language Design
Chapter 6 – Architectural Design Lecture 2 1Chapter 6 Architectural design.
Chapter 10 Architectural Design
2005/05/25 Unified Modeling Lanauage 1 Introduction to Unified Modeling Language (UML) – Part One Ku-Yaw Chang Assistant Professor.
MVC pattern and implementation in java
Demonstrating WSMX: Least Cost Supply Management.
The Architecture of Secure Systems Jim Alves-Foss Laboratory for Applied Logic Department of Computer Science University of Idaho By, Nagaashwini Katta.
BPEL4WS (Business Process Execution Language for Web Services) Nirmal Mukhi Component Systems Department IBM Research.
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.
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
Workflow Early Start Pattern and Future's Update Strategies in ProActive Environment E. Zimeo, N. Ranaldo, G. Tretola University of Sannio - Italy.
11 CORE Architecture Mauro Bruno, Monica Scannapieco, Carlo Vaccari, Giulia Vaste Antonino Virgillito, Diego Zardetto (Istat)
Conceptual Modelling – Behaviour
Architectural Design Yonsei University 2 nd Semester, 2014 Sanghyun Park.
Advanced Computer Networks Topic 2: Characterization of Distributed Systems.
Modeling Component-based Software Systems with UML 2.0 George T. Edwards Jaiganesh Balasubramanian Arvind S. Krishna Vanderbilt University Nashville, TN.
“This presentation is for informational purposes only and may not be incorporated into a contract or agreement.”
Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/ Input-output conformance testing for channel-based connectors 1.
“Dynamic fault handling mechanisms for service-oriented applications” Fabrizio Montesi, Claudio Guidi, Ivan Lanese and Gianluigi Zavattaro Department of.
DEVS Based Modeling and Simulation of the CORBA POA F. Bernardi, E. de Gentili, Pr. J.F. Santucci {bernardi, gentili, University.
11 CORE Architecture Mauro Bruno, Monica Scannapieco, Carlo Vaccari, Giulia Vaste Antonino Virgillito, Diego Zardetto (Istat)
Dynamic and Selective Combination of Extension in Component-based Applications Eddy Truyen, Bart Vanhaute, Wouter Joosen, Pierre Verbaeten, Bo N. Jørgensen.
Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Decidability Results for Dynamic Installation of Compensation Handlers Joint.
 Copyright 2005 Digital Enterprise Research Institute. All rights reserved. Enabling Components Management and Dynamic Execution Semantic.
Course: COMS-E6125 Professor: Gail E. Kaiser Student: Shanghao Li (sl2967)
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.
Formal Verification. Background Information Formal verification methods based on theorem proving techniques and model­checking –To prove the absence of.
A Theory of Distributed Objects Toward a Foundation for Component Grid Platforms Ludovic HENRIO l A Theory of Distributed Objects l Components l Perspectives.
Application architectures Advisor : Dr. Moneer Al_Mekhlafi By : Ahmed AbdAllah Al_Homaidi.
1 IS 0020 Program Design and Software Tools Unified Modeling Language Lecture 13 April 13, 2005.
Business Process Execution Language (BPEL) Pınar Tekin.
Chapter 9 Architectural Design. Why Architecture? The architecture is not the operational software. Rather, it is a representation that enables a software.
Web Ontology Language for Service (OWL-S)
Logical architecture refinement
Use Cases Based on the paper
Introduction to AppInventor
Chapter 5 Architectural Design.
Managing Process Integrity (Chapter 8)
Presentation transcript:

From Theory to Practice in Transactional Composition of Web Services Daniele Strollo Roberto Bruni, Gianluigi Ferrari, Hernàn Melgratti, Ugo Montanari, Emilio Tuosto University of Pisa

From Theory to Practice in Transactional Composition of Web Services Schedule  Introduction to Sagas  Basic concepts of JTWS  Java Signal Core Layer (JSCL)  Java Transactional Layer (JTL)  Examples

From Theory to Practice in Transactional Composition of Web Services Long Running Transactions  Transactions in e-Business scenario  ACID properties are relaxed:  atomicity (long running)  isolation (concurrency).  LRTs with compensation as solution to failures:  undo  alternatives to restoring of state (e.g. refund money…) Plain Reservation Service Reservation Request Payment Service: bank account (atomicity) credit card (isolation) Request for canceling reservation Payment

From Theory to Practice in Transactional Composition of Web Services Long Running Transactions…  Long-Running Transactions (LRTs):  Independent components loosely coupled  Each component maintains the consistency of its local data  Illusion of Atomicity given by compensations  Ad-hoc activities responsible for undoing the effects of partial executions when the whole computation cannot be completed.  Current proposals lack from formal foundations  Hard to prove properties

From Theory to Practice in Transactional Composition of Web Services Our goal  To provide a formally specified language for defining transactional aggregations at high level of abstraction.  To map high level transactional primitives into concrete coordination patterns.

From Theory to Practice in Transactional Composition of Web Services Saga Calculus (SC): syntax  Atomic activities:   [ {0, THROW}  Ranged over by A, B, …  Processes:  P ::= A ¥ B | P;P | P||P  Sagas:  S ::= A | [P] | S;S | S||S Saga Calculus naturally abstracts away from low level computational details and communication patterns The formal semantics is given by

From Theory to Practice in Transactional Composition of Web Services Basic concepts of SC: compensable process  Compensable process: P = A¥B  P executes the main activity A and installs the compensation activity B  B is not installed if A is not completely executed  A is called forward flow and B the backward flow A ¥ B

From Theory to Practice in Transactional Composition of Web Services Basic concepts of SC: Saga  The process P contained in a Saga S S ::= [P] Encloses the execution of process P in an “atomic context”. The execution of successful backward flow is isolated from the outside. Only in case of unsuccessful compensation action, the event is forwarded to previous stages.

From Theory to Practice in Transactional Composition of Web Services Purchase orders Accept Order Update Credit Prepare Order

From Theory to Practice in Transactional Composition of Web Services Purchase orders without compensations Accept Order Update Credit Prepare Order S = [ AO ; UC | PO ] The possible traces are:  ` S = { } AOUCPO AOUCPO

From Theory to Practice in Transactional Composition of Web Services Purchase orders with compensations Accept Order Refuse Order Update Credit Refund Money Prepare Order Update Stock S = [ AO ¥ RO ; UC ¥ RM | PO ¥ US ] Successful execution:  ` S = { } Failure with successful compensation (not enough money):  ’ ` S = { } Failure and unsuccessful compensation (unable to resemble stock):  ’’ ` S = { }

From Theory to Practice in Transactional Composition of Web Services Schedule  Introduction to Sagas  Basic concepts of JTWS  Java Signal Core Layer (JSCL)  Java Transactional Layer (JTL)  Examples

From Theory to Practice in Transactional Composition of Web Services JTWS Architecture JTL (Transactional Layer) JSCL (Signal Core Layer) JTWS  JSCL defines:  Async/sync signal passing  Signal links  Logical ports  Handler/Emitter  Generic Component  management of flow sessions  JTL defines:  Types of signals useful to represent LRTs  Sequential and Parallel composition of services

From Theory to Practice in Transactional Composition of Web Services Schedule  Introduction to Sagas  Basic concepts of JTWS  Java Signal Core Layer (JSCL)  Java Transactional Layer (JTL)  Examples

From Theory to Practice in Transactional Composition of Web Services JSCL: application building blocks  Signal Links:  unicast  unidirectional  typed Emitter Handler SigType  Agents:  Signal Emitter  Signal Handler Resource Signal Input Ports Signal Output Ports Agent  Signals:  Abstraction of an event  Typed Session Internal Data  Logical Ports  AND / OR / NOT SIG_TRUE SIG_FALSE SIG_TRUE SIG_FALSE

From Theory to Practice in Transactional Composition of Web Services Example Resource AgentB Resource AgentC Resource AgentD Resource AgentA eventType n eventType 1

From Theory to Practice in Transactional Composition of Web Services JSCL in detail connectSignal registerSignal JTWS Component JTWS Component Connecting two components:  The Emitter makes a request to a handler to be connected  The Handler gives the permissions to the Emitter to create the input signal link

From Theory to Practice in Transactional Composition of Web Services JSCL in detail emitSignal handleSignal JTWS Component JTWS Component Queue Connecting two components:  The Emitter makes a request to a handler to be connected  The Handler gives the permissions to the Emitter to create the input signal link Forwarding a signal:  Emitter: emitSignal (signal, async)  Handler: the method handleSignal (signal, async) is invoked automatically. This method “propagates” the signal to all the registered handlers. The asynchronous signals are managed by the handler.

From Theory to Practice in Transactional Composition of Web Services Schedule  Introduction to Sagas  Basic concepts of JTWS  Java Signal Core Layer (JSCL)  Java Transactional Layer (JTL)  Examples

From Theory to Practice in Transactional Composition of Web Services Cmt Rb Exc Inv JTWS: Java Transactional Layer (JTL)  Prefixed set of signals with a precise semantics:  SNG_INVOKE,  SGN_COMMIT,  SGN_ROLLBACK  Structural composition of services:  Sequence and Parallel  Well defined semantics for transactional flows. JTL Component

From Theory to Practice in Transactional Composition of Web Services JTL: AtomicTask  AtomicTask defines the interface that each atomic activity of SC must fit.  We assume that any class which implements AtomicTask cannot throw any exception but AtomicActionException.

From Theory to Practice in Transactional Composition of Web Services JTL: Basic Compensable Process  A SC compensable process is defined in JTL as: Comp (A, B) ´ A ¥ B with A,B AtomicTasks.  The forward flow corresponds to the execution of A.  The backward flow corresponds to the the execution of B.  Exceptions are raised in presence of faults during execution of B. A A B B

From Theory to Practice in Transactional Composition of Web Services JTL: Basic Compensable Process... A A B B Inv Executes main activity A Successful execution of A Inv Unsuccessful execution of A Rb Request for abort. Executes B. Compensation failure Rb Compensation successful executed Exc

From Theory to Practice in Transactional Composition of Web Services JTL: sequence Seq (P, Q) ´ P;Q  JTLSequence.addInternalComponent (JTLComponent) permits to add new components in the sequence. InOut iRb iEx oRb oEx oCt iCt P Q seq.addInternalComponent (Q)

From Theory to Practice in Transactional Composition of Web Services JTL: sequence InOut iRb iEx oRb oEx oCt iCt PQ A A Inv

From Theory to Practice in Transactional Composition of Web Services JTL: sequence InOut iRb iEx oRb oEx oCt iCt PQ A A Inv B B Rb

From Theory to Practice in Transactional Composition of Web Services JTL: sequence InOut iRb iEx oRb oEx oCt iCt PQ Inv B B Rb

From Theory to Practice in Transactional Composition of Web Services JTL: sequence InOut iRb iEx oRb oEx oCt iCt PQ B B Rb

From Theory to Practice in Transactional Composition of Web Services JTL: sequence InOut iRb iEx oRb oEx oCt iCt PQ B B Rb

From Theory to Practice in Transactional Composition of Web Services JTL: sequence InOut iRb iEx oRb oEx oCt iCt PQ Rb

From Theory to Practice in Transactional Composition of Web Services JTL: parallel InOut iRb iEx oRb oEx oCt iCt Collector Dispatcher Inv P Q Status = (-,-) Par (P, Q) ´ P|Q

From Theory to Practice in Transactional Composition of Web Services JTL: parallel InOut iRb iEx oRb oEx oCt iCt Collector Dispatcher P Q A A A A Status = (---,---) Inv

From Theory to Practice in Transactional Composition of Web Services JTL: parallel InOut iRb iEx oRb oEx oCt iCt Collector Dispatcher P Q A A A A Status = (Inv,---) Inv

From Theory to Practice in Transactional Composition of Web Services JTL: parallel InOut iRb iEx oRb oEx oCt iCt Collector Dispatcher P Q A A A A Status = (Inv,Inv) Inv

From Theory to Practice in Transactional Composition of Web Services Saga in JTL  The behavior of a Saga S ::= [P] in JTL is the following:  If P sends an Inv signal:  S propagates internally the Cmt signal  S sends externally the Inv signal  If P sends an Rb signal:  S sends externally the Inv signal  If P sends an Exc signal:  It is ignored since the status is inconsistent

From Theory to Practice in Transactional Composition of Web Services JTL: saga InOut P SignalH Exc and Cmt ignored while Abt is transformed to Inv

From Theory to Practice in Transactional Composition of Web Services Schedule  Introduction to Sagas  Basic concepts of JTWS  Java Signal Core Layer (JSCL)  Java Transactional Layer (JTL)  Examples

From Theory to Practice in Transactional Composition of Web Services Purchase Order in JTL Accept Order Refuse Order Update Credit Refund Money Prepare Order Update Stock S = [ AO ¥ RO ; UC ¥ RM | PO ¥ US ] Seq ( Comp (AO, RO), Par ( Comp (UC, RM), Comp (PO, US)))

From Theory to Practice in Transactional Composition of Web Services Purchase Order in JTL: graphical representation Out iEx UC PO iRb iCt In oEx oRb oCt RM US AO RO Out iEx iRb iCt In oEx oRb oCt

From Theory to Practice in Transactional Composition of Web Services JTWS: advantages  JSCL  Basic framework for programming coordination.  Abstraction for communication details.  Logical ports permit a simple design of the flow diagrams.  The connections can be modified at run-time.  Distributed flow execution.  Primitives for authorizing access to signals.  JTL  Based on a robust theory  Simple to program  Extendible to other transactional logics

From Theory to Practice in Transactional Composition of Web Services Concluding remarks  From a formal specification of naïve sagas we have presented JTWS.  Contribution is a setting for designing business process transactions  Visual/graphical representation of parallel sagas  Process calculus description in bijective correspondence with sagas diagrams  Executable, distributed translation of symbolic processes  Future works  GUI to develop JTL and JSCL components  Debugger environment to test the behavior of the involved components  Support for advanced features like nesting, speculative choice (N. Zappone).

From Theory to Practice in Transactional Composition of Web Services oOOo ?

From Theory to Practice in Transactional Composition of Web Services Semantics of Saga Calculus. COMPOSITION OF STANDARD TRACES int(p,q) represents all the possible interleaving of the observable flows p,q.

From Theory to Practice in Transactional Composition of Web Services Semantics of Saga Calculus.. TRACES OF Naive Sagas

From Theory to Practice in Transactional Composition of Web Services Semantics of Saga Calculus... COMPOSITION OF COMPENSABLE TRACES

From Theory to Practice in Transactional Composition of Web Services Semantics of Saga Calculus…. TRACES OF COMPENSABLE PROCESSES

From Theory to Practice in Transactional Composition of Web Services JSCL in detail connectSignal / emitSignal registerSignal / handleSignal JTWS Component JTWS Component Queue Connecting two components:  The Emitter makes a request to a handler to be connected  The Handler gives the permissions to the Emitter to create the input signal link Forwarding a signal:  Emitter: emitSignal (signal, async)  Handler: the method handleSignal (signal, async) is invoked automatically. This method “propagates” the signal to all the registered handlers. The asynchronous signals are managed by the handler.