Fine-grained Compatibility and Replaceability Analysis of Timed Web Service Protocols Julien Ponge 1,2, Boualem Benatallah 2, Fabio Casati 3 and Farouk Toumani 1 (1) Université Blaise Pascal, Clermont-Ferrand, France (2) UNSW, Sydney, Australia (3) University of Trento, Italy ER 2007, Auckland, New Zealand Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 1 / 31
Outline 1 Introduction 2 Timed protocols 3 Formal framework 4 Implementation and conclusion Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 2 / 31
Outline 1 Introduction 2 Timed protocols 3 Formal framework 4 Implementation and conclusion Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 3 / 31
WS for application integration My company Databases, new and legacy applications Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 4 / 31
WS for application integration My company RPC, MOM, ESB,... Databases, new and legacy applications Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 4 / 31
WS for application integration My company Integrated applications and clients RPC, MOM, ESB,... Databases, new and legacy applications Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 4 / 31
WS for application integration Partner 1 HTML My company Integrated applications and clients RPC, MOM, ESB,... Databases, new and legacy applications Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 4 / 31
WS for application integration Partner 1 Partner 2 HTML VPN + adapters My company Integrated applications and clients RPC, MOM, ESB,... Databases, new and legacy applications Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 4 / 31
WS for application integration Partner 1 Partner 2 XML, SOAP, HTTP,... My company Web services Integrated applications and clients RPC, MOM, ESB,... Databases, new and legacy applications Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 4 / 31
Static vs dynamic interface Operations, message schemas, binding,... WSDL answer login search AnswerMessage LoginMessage SearchMessage Web service Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 5 / 31
Static vs dynamic interface Operations, message schemas, binding,... WSDL answer login search AnswerMessage LoginMessage SearchMessage Web service Valid conversations: login, search, answer login, search, answer, search, answer (...) Invalid conversations: search, login, answer answer, search, login (...) Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 5 / 31
Business Protocols [ER 2004, DKE: Benatallah, Casati, Toumani] Conversations: message choreographies Finite deterministic automata Execution traces semantics search start login logged search searching answer answered Extensions: transactions, timing constraints, policies,... Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 6 / 31
Compatibility analysis Service? Requester / service Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 7 / 31
Replaceability analysis Service 1 Requester Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 8 / 31
Replaceability analysis Service 1 Service 2? Requester Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 8 / 31
Use-case: agile composition runtimes Development environment Runtime environment Composite application Compatibility Replaceability Services with protocol descriptions Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 9 / 31
A need for timing constraints Many examples: TCP/IP, watchdogs transaction locks business agreements BPEL (wait / onalarm) RosettaNet... Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 10 / 31
Outline of contributions 1 Extension of business protocols 2 Compatibility and replaceability analysis 3 A new class of timed automata 4 Implementation Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 11 / 31
Outline 1 Introduction 2 Timed protocols 3 Formal framework 4 Implementation and conclusion Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 12 / 31
Primitives C-Invoke M-Invoke Temporal windows for a message exchange Expiration for an implicit state change C-Invoke((T 1 < 12h:50m) (T 2 > 1h)) M-Invoke((T 1 = 6h) (T 2 > 1h)) ( ) Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 13 / 31
Primitives C-Invoke M-Invoke Temporal windows for a message exchange Expiration for an implicit state change C-Invoke((T 1 < 12h:50m) (T 2 > 1h)) M-Invoke((T 1 = 6h) (T 2 > 1h)) ( ) Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 13 / 31
Extensions s5 T6 :loanoffer s6 T7 :loanaccept C Invoke T6 11d s7 T7 :offerexpired M Invoke T6=30d s8 Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 14 / 31
Analysis classes Compatibility: full partial Replaceability: full partial subsumption, equivalence w.r.t. client protocol w.r.t. interaction role A set of flexible classes because of a versatile environment Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 15 / 31
Illustration of replaceability w.r.t. client protocol T1: a T2: b s0 s1 s2 T3: c P T5 :e s3 T4 :d s4 Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 16 / 31
Illustration of replaceability w.r.t. client protocol T1: a T2: b s0 s1 s2 T3: c P' s3 T4 :d C Invoke T1 4h s4 Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 16 / 31
Illustration of replaceability w.r.t. client protocol T1: a T2: b s0 s1 s2 T3: c P' T5 :e s3 T4 :d C Invoke T1 4h s4 Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 16 / 31
Illustration of replaceability w.r.t. client protocol T1: a T2: b s0 s1 s2 T3: c P T5 :e s3 T4 :d s4 Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 16 / 31
Illustration of replaceability w.r.t. client protocol T1: a T2: b s0 s1 s2 T3: c P' s3 T4 :d C Invoke T1 4h s4 Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 16 / 31
Characterization through operators Comparison subsumption ( ), equivalence ( ) Manipulation parallel composition ( TC ), intersection ( TI ), difference ( TD ) Example: P 1 can replace P 2 w.r.t. a client protocol P C iff: [ PC TC P 2 ] P 2 P 1, or P C TC (P 2 TD P 1 ) = Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 17 / 31
Characterization through operators Comparison subsumption ( ), equivalence ( ) Manipulation parallel composition ( TC ), intersection ( TI ), difference ( TD ) Example: P 1 can replace P 2 w.r.t. a client protocol P C iff: [ PC TC P 2 ] P 2 P 1, or P C TC (P 2 TD P 1 ) = Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 17 / 31
1 Algorithms and decidability? 2 Are timed protocols closed under our operators?
Outline 1 Introduction 2 Timed protocols 3 Formal framework 4 Implementation and conclusion Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 19 / 31
Timed automata (Alur, Dill 1994) Clocks over dense time + constraints + resets Vibrant research Use-cases: {system, property} checker {yes, no} s0 a x :=0 s1 b x 5 s2 Timed words such that a follows b by at most 5 units of time Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 20 / 31
Mapping Protocol TA Timed protocols Timed automata + extensions Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 21 / 31
Mapping Timed protocol T 1 : a T 2 :b S0 S1 S2 Timed automaton C Invoke T 1 5h S0 a b S1 x 1 :=0 x 1 5 S2 x 2 :=0 M Invoke T 2 =10h c x 2 10 T 4 : T 3 : c x 2 =10 x 3 :=0 x 4 :=0 S4 S3 S4 S3 Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 21 / 31
Mapping Timed protocol T 1 : a T 2 :b S0 S1 S2 Timed automaton C Invoke T 1 5h S0 a b S1 x 1 :=0 x 1 5 S2 x 2 :=0 M Invoke T 2 =10h c x 2 10 T 4 : T 3 : c x 2 =10 x 3 :=0 x 4 :=0 S4 S3 S4 S3 Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 21 / 31
Mapping Timed protocol T 1 : a T 2 :b S0 S1 S2 Timed automaton C Invoke T 1 5h S0 a b S1 x 1 :=0 x 1 5 S2 x 2 :=0 M Invoke T 2 =10h c x 2 10 T 4 : T 3 : c x 2 =10 x 3 :=0 x 4 :=0 S4 S3 S4 S3 Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 21 / 31
The case of ε-transitions They have clock resets and they cannot be removed! Proof Based on precise actions (Bérard, Diekert, Gastin, Petit 99) Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 22 / 31
The case of ε-transitions T 1 : a x T1 =1 x 1 0 x 1 =1 x 2 0 x 2 =1 x 1 1 s0 T 2 :b, 0 x T1 1 1, x T1 =1 s1 T 3 : b 0 x 1 1 x T 1 1 2, x T 3 =1 s2 (b, δ 1 ) (b, δ 2 ) (b, δ d 1 ) (a, d) (a, d + 1) the occurrences of a-events should be precise Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 22 / 31
The case of intersection / composition Usual technique Product with label synchronization s1 a(+) s2 s1' a(+) s2' b(+) s3 c(+) s3' s1,s1' ti a(+) s2,s2' Determinism problem: ε-transitions are never synchronized! Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 23 / 31
The case of intersection / composition s1 a(+) x 1 =k 1 1 s2 s3 ti s1' a(+) x 2 =k 2 2 s2' s3' s1,s1' a(+) x 1 =k 1 1 x 2 =k 2 2 s2,s2' s3,s1' x 2 =k 2 2 x 1 =k 1 1 x 2 =k 2 2 x 1 =k 1 1 x 2 =k 2 2 Keeps semantics and determinism! (mandatory (x i = k i ) clauses in M-Invoke ) s1,s3' s3,s3' x 1 =k 1 1 Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 23 / 31
The case of difference / complementation Extension of the procedure on deterministic TA a, s0 1 b, s1 2 s2 Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 24 / 31
The case of difference / complementation Extension of the procedure on deterministic TA a, s0 1 b, s1 2 s2 a a, 1 b q b, 2 a,b Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 24 / 31
The case of difference / complementation Extension of the procedure on deterministic TA s0 a, 1 b, s1 2 a s2 a, 1 b q b, 2 a,b Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 24 / 31
The case of difference / complementation Needs exactly 1 run per recognized timed word! a, s0 1 b, s1 2 s2 (a,0) (b,3) b, 2? s3 The extended complementation procedure keeps this property Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 24 / 31
The case of subsumption / equivalence The test P 1 P 2 is equivalent to P 1 P 2 = (timed language inclusion problem) Complementation PTA are closed under complementation Emptiness checking (Alur, Dill 94) The problem is PSPACE-complete and need a model-checker (UPPAAL, Kronos,...) Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 25 / 31
The case of subsumption / equivalence The test P 1 P 2 is equivalent to P 1 P 2 = (timed language inclusion problem) Complementation PTA are closed under complementation Emptiness checking (Alur, Dill 94) The problem is PSPACE-complete and need a model-checker (UPPAAL, Kronos,...) Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 25 / 31
Results 1 Timed protocols are closed under manipulation operators 2 Timed automata based algorithms for manipulation and comparison operators 3 Every compatibility and replaceability class can be implemented 4 Protocol timed automata form a new class of timed automata Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 26 / 31
Outline 1 Introduction 2 Timed protocols 3 Formal framework 4 Implementation and conclusion Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 27 / 31
Prototype Eclipse-based Protocol editor Protocol operators Complementary modules: Protocol extraction from BPEL Protocol mining from execution logs (lead by Hamid Motahari) Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 28 / 31
Perspectives Refined expressiveness (in progress) Agile composition development and execution runtimes Analyse at the composition level Help BPEL engines scalability (with O. Coupelon) Ponge et al. (UBP, UNSW, U.Trento) Analysis of Timed Protocols ER 2007, Auckland 30 / 31
Questions? http://www.isima.fr/ ponge/ http://servicemosaic.isima.fr/