Dependable Composition of Web Services and Process Calculi
Dependable Composition of Web Services and Process Calculi Manuel Mazzara Newcastle University
Agenda 1. Process Calculi and their Equivalences ü reconfigurability in the pi-calculus ü equivalences/bisimulation 2. Dependable Composition of WS ü WS and standards ü BPEL composition ü Recovery 3. Process calculi and BPEL ü unification of Recovery Framework
Process Calculi and their Equivalences
What is a “process calculus”? ü Language ü syntax ü semantics ü pragmatics ü Interaction ü message passing ü mobility ü reconfigurability
Reconfigurability ü Messages can include channel names (pi-calculus) ü Sending an address expecting a reply to that address ü output capability (MS Biztalk) ü a received name will be used as the subject of outputs only ü input capability (π-calculus) ü a received name will be used as the subject of inputs
Equivalences ü Functions ü identical outputs for identical inputs ü What about interactive programs? ü bisimulation ü programs exhibiting the same behaviour
Web Services vs. BEV Services SPECIFICATION IMPLEMENTATION 50 p Push “coffee” Serve coffee 50 p Push “tea” Serve tea 50 p Push “coffee” 50 p Push “tea” Serve tea Serve coffee Milner’s CCS famous example
Message-sequences ü These two BEV services accept the same message-sequences 50 p. tea 50 p. coffee ü Are they the same? ü message-sequences can be inadequate ü Essence of bisimulation ü attention to possibilities still available at each state
Look at this state SPECIFICATION IMPLEMENTATION 50 p Push “coffee” Serve coffee 50 p Push “tea” Serve tea
What is wrong? ü This state in the specification has two possibilities: ü 50 p ü “tea” ü There is no matching state in the implementation ü The implementation fails bisimulation
A new implementation SPECIFICATION NEW IMPLEMENTATION 50 p Push “coffee” 50 p Push “tea” Serve tea 50 p Push “coffee” Serve coffee Push “tea” Serve tea private dialog with Illy, Lavazza, Segafredo, Breda Serve coffee
Now it is fine! ü Engagement in a private dialog with providers üat the end it still emits the coffee ü Internal states üsame external possibilities of the specification
Dependable Composition of Web Services
WS Background HTTP XML SOAP WSDL
BPEL for WS Composition XML (workflow) “programming language” Standard (11 April 2007)
BPEL Activities ü A process consists of a set of (nested) activities ü Basic activity üreceive and send messages üassign values to variables ücomposition is stateful üsignal faults ü Structured activities üsequential, parallel üconditional ülooping
Dependability in WS (standards) ü SOAP is employed as an XML messaging protocol ü SOAP is not compulsory in SOA anyway ü message level ü WS-Reliability (OASIS) ü dependability added to the unreliable Internet channel of communication ü WS-Security (OASIS) ü specifies mechanisms to provide integrity and confidentiality of SOAP messages
Dependable Composition At the level of single services by domainspecific techniques Oracle BPEL process manager/Biztalk… provide no support stochastic Petri nets? Fault Prevention Fault Forecasting Fault Tolerance recovery Fault Removal Contracts conformance Deadlock Safety… not standardised
Recovery in WS üACIDity is not possible when transactions last long periods and cross administrative domains ü atomicity has to be relaxed ü isolation has to be relaxed ü no “perfect” roll-back ü explicit compensation
BPEL Recovery Framework (1) Basic Units of Work WS-BPEL: scope Failures Management WS-BPEL: fault handler Partial Roll-back WS-BPEL: compensation
BPEL Recovery Framework (2) ü Fault Handler (FH) ü forwards error recovery ü reacts to events occurring during the normal execution ü catch blocks for explicitly thrown faults ü generally returned by an invoke activity ü possibly thrown from inside the process itself ü scopes are abnormally terminated when FH is invoked ü Compensation Handler (CH) ü backwards error recovery ü installed when the body successfully terminates ü application-specific rollback ü get back to a state where execution can continue ü available for another activity requiring an undo
Process Calculi and BPEL
Formal Methods?
Bisimulation ? ≈ BPEL process ? ? BPEL process
The Unifying Theory
Reduction Semantics Two ways to interact: Asynchronous message passing Event raising
BPEL Encoding ü Understanding of the OS ACTIVE BPEL semantics ü It “should” implement the standard BPEL ü Definition of the BPEL encoding Description of how the BPEL activites can be represented in the calculus
BPEL Encoding (only basic activities) Use of the continuation passing style technique
Unified Recovery Framework Basic Units of Work Unit Failures Management Event Handler Partial Roll-back Event Handler
Use of Bisimulation π process BPEL process ≈ π process BPEL process
Some feedback about this work ü Semantics only for a subset of the BPEL activities ü Encoding hardly readable ü Timed theory not fully developed (timed transactions) ü Explosion of states when encoding examples due to signaling of the end of each activity Efficient Analysis of BPEL 2. 0 Processes Using pi-Calculus Weidlich, M. ; Decker, G. ; Weske, M.
Contacts Manuel. Mazzara@newcastle. ac. uk +44 -(0)-191 -222 -5154 www. cs. ncl. ac. uk/people/manuel. mazzara www. linkedin. com/in/manuelmazzara
- Slides: 32