1 Ivan Lanese Computer Science Department University of Bologna Italy On the Interplay between Fault Handling and Request-response Service Invocations.

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

Pontus Boström and Marina Waldén Åbo Akademi University/ TUCS Development of Fault Tolerant Grid Applications Using Distributed B.
1 Transactions and Web Services. 2 Web Environment Web Service activities form a unit of work, but ACID properties are not always appropriate since Web.
1 Reversibility for Recoverability Ivan Lanese Computer Science Department FOCUS research group University of Bologna/INRIA Bologna, Italy.
Exceptions and Exception Handling Carl Alphonce CSE116.
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.
Exception Handling Introduction Exception handling is a mechanism to handle exceptions. Exceptions are error like situations. It is difficult to decide.
Dependable Composition of Web Services and Process Calculi Manuel Mazzara Newcastle University.
Transparent Robustness in Service Aggregates Onyeka Ezenwoye School of Computing and Information Sciences Florida International University May 2006.
1 Ivan Lanese Computer Science Department University of Bologna Italy Towards a Unifying Theory for Web Services Composition Manuel Mazzara Faculty of.
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.
CS 290C: Formal Models for Web Software Lecture 10: Language Based Modeling and Analysis of Navigation Errors Instructor: Tevfik Bultan.
Ivan Lanese Computer Science Department University of Bologna/INRIA Italy On the Expressive Power of Primitives for Compensation Handling Joint work with.
IBM WebSphere survey Kristian Bisgaard Lassen. University of AarhusIBM WebSphere survey2 Tools  WebSphere Application Server Portal Studio Business Integration.
1 Ivan Lanese Computer Science Department University of Bologna Roberto Bruni Computer Science Department University of Pisa A mobile calculus with parametric.
1 Ivan Lanese Computer Science Department University of Bologna Italy Error Handling in Service Oriented Computing Joint work with Claudio Guidi, Fabrizio.
Business Process Orchestration
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.
BPEL (Business Process Execution Language)
SOCK and JOLIE from the formal basis to a service oriented programming language Part II Claudio Guidi and Fabrizio Montesi.
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 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 Behavioural Theory at Work: Program Transformations in a Service-centred Calculus.
16: Distributed Systems1 DISTRIBUTED SYSTEM STRUCTURES NETWORK OPERATING SYSTEMS The users are aware of the physical structure of the network. Each site.
Session II Part I – BPMN, BPEL and WS*
1 Ivan Lanese Computer Science Department University of Bologna Italy Streaming Services in SSCC Joint work with Francisco Martins, Vasco Vasconcelos and.
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.
1 Exception and Event Handling (Based on:Concepts of Programming Languages, 8 th edition, by Robert W. Sebesta, 2007)
THE NEXT STEP IN WEB SERVICES By Francisco Curbera,… Memtimin MAHMUT 2012.
Demonstrating WSMX: Least Cost Supply Management.
1 Joint work with Michael Lienhardt (PPS), Claudio Antares Mezzina (Trento), Jean-Bernard Stefani (INRIA) and Alan Schmitt (INRIA) Reversibility in Concurrency.
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.
Towards Global and Local Types for Adaptation Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Joint work with Mario Bravetti,
Foundational Study and Practical Experimentation of Service Orchestration with SOCK/JOLIE Ivan Lanese, Fabrizio Montesi, Claudio Guidi, and Gianluigi Zavattaro.
Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Amending Choreographies Joint work with Fabrizio Montesi and Gianluigi Zavattaro.
95-843: Service Oriented Architecture 1 Master of Information System Management Service Oriented Architecture Lecture 7: BPEL Some notes selected from.
“This presentation is for informational purposes only and may not be incorporated into a contract or agreement.”
1 Qualitative Reasoning of Distributed Object Design Nima Kaveh & Wolfgang Emmerich Software Systems Engineering Dept. Computer Science University College.
“Dynamic fault handling mechanisms for service-oriented applications” Fabrizio Montesi, Claudio Guidi, Ivan Lanese and Gianluigi Zavattaro Department of.
A Service Oriented Architecture for the Finance Case Study
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture.
Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Decidability Results for Dynamic Installation of Compensation Handlers Joint.
Testing OO software. State Based Testing State machine: implementation-independent specification (model) of the dynamic behaviour of the system State:
1 Joint work with Claudio Antares Mezzina and Jean-Bernard Stefani Controlled Reversibility and Compensations Ivan Lanese Focus research group Computer.
Course: COMS-E6125 Professor: Gail E. Kaiser Student: Shanghao Li (sl2967)
95-843: Service Oriented Architecture 1 Master of Information System Management Service Oriented Architecture Lecture 8: More BPEL Notes selected from.
SENG521 (Fall SENG 521 Software Reliability & Testing Fault Tolerant Software Systems: Techniques (Part 4a) Department of Electrical.
Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Adaptive Choreographies Joint work with Mila Dalla Preda, Jacopo Mauro and Maurizio.
SE 548 Process Modelling WEB SERVICE ORCHESTRATION AND COMPOSITION ÖZLEM BİLGİÇ.
1 SOA Seminar Service Oriented Architecture Lecture 8: More BPEL Notes selected from the paper “Formal Semantics and Analysis of control flow in WS-BPEL.
A service Oriented Architecture & Web Service Technology.
1 Seminar on SOA Seminar on Service Oriented Architecture BPEL Some notes selected from “Business Process Execution Language for Web Services” by Matjaz.
Manohar1 Fault Handling Activities covered: 1.Scope 2.Throw 3.Catch 4.Sensor.
Business Process Execution Language (BPEL) Pınar Tekin.
Service-centric Software Engineering
Internet of Things A Process Calculus Approach
Presentation transcript:

1 Ivan Lanese Computer Science Department University of Bologna Italy On the Interplay between Fault Handling and Request-response Service Invocations Joint work with Claudio Guidi, Fabrizio Montesi and Gianluigi Zavattaro

Roadmap l Idea of the work l Our approach to error handling –Extending SOCK –Dynamic installation of handlers –Interplay with request-response l The automotive case study l Conclusive remarks

Roadmap l Idea of the work l Our approach to error handling –Extending SOCK –Dynamic installation of handlers –Interplay with request-response l The automotive case study l Conclusive remarks

Service Oriented Computing (SOC) l SOC is a paradigm to program distributed applications –Based on the composition of dynamically discovered, loosely- coupled services –Services interact using the notification and request-response patterns l Allows integration of services from different companies –Great code reusability l Has to deal with interoperability, dynamicity, security, Quality of Service, reconfiguration… l Based on standards for data (XML), communication (SOAP), discovery (WSDL and UDDI) and orchestration (BPEL)

Error handling l Safe composition of services requires to deal with faults –Scarce guarentees on components’ behaviour because of loose coupling –Unexpected events can happen l A fault is an abnormal situation that forbids the continuation of an activity –An activity that generates a fault is terminated l Faults should be managed so that the whole system can reach a consistent state l BPEL offers various mechanisms for error handling

Fault handling mechanisms l Based on the idea of long running transactions –ACID transactions impossible to obtain –Compensations are used to reach a consistent state l Faults terminate the current activity and trigger recovery activities specified by suitable handlers l Fault handler: executed as answer to a fault l Termination handler: executed to smoothly terminate a parallel activity l Compensation handler: executed to undo the effect of an already completed activity

What we propose? l A formal model for faults and compensations in SOC –Based on the process calculus SOCK –Rigorous LTS semantics 1. Expressive high-level primitives –Mimicking BPEL ones –Allowing for easy management of different kinds of faults 2. Dynamic installation of handlers –The fault handling code is always up-to-date 3. Faults do not spoil request-response communications –Automatic notification in case of server fault –The client always waits the reply from the server –Possible to recover from remote errors

Why process calculi? l Formal methods are necessary to master the complexity of SOC –Different implementations of BPEL have different behaviours –Standards are only informally defined –Difficult to understand the interplay between different features l Process calculi allow to unequivocally specify the behaviour of the different mechanisms… –Clarify their semantics and their interactions –Drive the implementations l … and prove properties of the resulting system –Good behaviour guarenteed

The underlying language l SOCK (Service Oriented Computing Kernel) is a process calculus for SOC l Explores service interactions –Based on notification and request-response primitives –Composed using standard operators from imperative languages (while, …) and process calculi (parallel composition, …) l Strongly related to current technologies –WSDL, BPEL l But with full formal semantics l Driving the implementation of the language JOLIE

Roadmap l Idea of the work l Our approach to error handling –Extending SOCK –Dynamic installation of handlers –Interplay with request-response l The automotive case study l Conclusive remarks

Extending SOCK with faults and compensations l Code boxed into scopes {P} q –Provide a hierarchical structure –Define the boundaries of error handling activities l Primitives for: –Throwing faults: throw(f) –Installing handlers: inst(u,P) –Invoking compensations: comp(q) l A few other things

The scope hierarchy P H q P H q P H q P H q P H q At runtime the scopes contain handlers H

Throwing a fault q1q1 q2q2 (f,Q) Throw (f) (q 2,T 2 ) (q 1,T 1 )

Throwing a fault q1q1 q2q2 (f,Q) (q 2,T 2 ) (q 1,T 1 ) f Faults kill activities while propagating

Throwing a fault T1T1 q1q1 T2T2 q2q2 (f,Q) f Termination handlers of parallel activities are executed

Throwing a fault T1T1 q1q1 T2T2 q2q2 Q f When found, the fault handler is executed

More on fault propagation l Recovery activities cannot be killed by other faults –Error recovery activities are always completed l But termination overrides fault handling –Global errors more important than internal ones l After having been killed a scope smoothly terminates –Ongoing communications are terminated –No more faults can be thrown

Compensation handlers l Allow to undo the effect of an already completed activity –The fault handler of a purchase activity could ask to annul a previously done payment l Has to be explicitly programmed and invoked –Primitive comp(q) –Available only inside handlers –Only child activities can be compensated

Roadmap l Idea of the work l Our approach to error handling –Extending SOCK –Dynamic installation of handlers –Interplay with request-response l The automotive case study l Conclusive remarks

Dynamic fault handling l In all the languages we are aware of handlers are statically installed while programming –Java throw … catch … –BPEL handlers l Not always easy to write the desired compensation

Example l { throw(f) | while (i <100) if i%2=0 then P else Q, H} q l We want to compensate each completed execution of P and Q in the reverse order of execution l We need auxiliary variables to track the executions of P and Q –Complex and error-prone l Atomicity problem –Suppose P has been executed but the auxiliary variables have not been updated yet –If a fault occurs then the last execution of P is not compensated

Our solution l { throw(f) | while (i <100) if i%2=0 then P ; inst(f,P’;cH) else Q ; inst(f,Q’;cH), H 0 } q l P’ compensates P, Q’ compensates Q l The handlers are dynamically installed l cH (for current handler) allows to recover the previous handler for updating l inst is a special primitive that has higher priority than fault execution –No atomicity problem

Installing an handler Inst (f,Q) As soon as inst is enabled it is executed

Installing an handler (f,Q)

Compensation handlers l When an activity terminates the last defined termination handler becomes its compensation handler l Same handling for faults immediatly before activity termination and immediatly after activity termination

Installing compensation handlers q q’ Inst (q,Q)

Installing compensation handlers q (q,Q) Q terminates q’

Installing compensation handlers (q,Q) Handlers in q’ can compensate q using comp(q) q’

Roadmap l Idea of the work l Our approach to error handling –Extending SOCK –Dynamic installation of handlers –Interplay with request-response l The automotive case study l Conclusive remarks

Fault handling and request-response l Request-response is a long lasting interaction l Faults on one side influence the other side l Two possibilities: –Faults on server side during the interaction –Faults on client side while waiting for the answer

Faults on server side l A client asks a payment to the bank, the bank fails l In ActiveBPEL the client receives a generic “missing- reply” exception l Our approach –The exact fault is notified to the client –The notification acts as a fault for the client –Suitable actions can be taken to manage the remote fault

Faults on client side l A client asks a payment to the bank, then fails before the answer l In BPEL the return message is discarded l Our approach –The return message is waited for –The handlers can be updated according to whether or not a non-faulty message is received –The remote activity can be compensated if necessary

Roadmap l Idea of the work l Our approach to error handling –Extending SOCK –Dynamic installation of handlers –Interplay with request-response l The automotive case study l Conclusive remarks

Automotive case study l A car failure forces the car to stop l The car service system looks for –A garage to repair the car –A tow truck to take the car to the garage –A car rental to take the driver home l The suitability of the services is checked l The services are booked and paid via a bank

(Part of) the automotive case study in SOCK

Adding tow truck faults

Screenshot from JOLIE

Feedback from the case study l Easy to write the desired error handling policies l All the mechanisms are used –Useful to allow for frozen variables in handlers code l All unexpected behaviours catched

Roadmap l Idea of the work l Our approach to error handling –Extending SOCK –Dynamic installation of handlers –Interplay with request-response l The automotive case study l Conclusive remarks

Conclusions l Formal framework for error handling in SOC –Near to current technologies (BPEL)… –… but with formal semantics l Dynamic installation of handlers –Allows to update the termination handler as the activity progresses l Errors do not spoil the request-response protocol –Either the fault or the normal answer is sent back –The answer can be used during error recovery

Future work l Check whether the approach can be applied to other languages –Other languages for SOC (COWS, SSCC, CASPIS) –π-calculus l Study the relationships between different kinds of primitives for fault handling –Static vs dynamic –Hierarchical vs flat

End of talk