300 likes | 389 Views
Component-based design and connector synthesis (Lecture 2). GSSI PhD in Computer Science L ’ Aquila, Italy Nov 11th, 2013. Massimo Tivoli and Marco Autili Email: { massimo.tivoli , marco.autili }@ univaq.it. Roadmap of this lecture. B y Massimo Tivoli
E N D
Component-based design and connector synthesis(Lecture 2) GSSI PhD in Computer Science L’Aquila, Italy Nov 11th, 2013 • Massimo Tivoli and Marco Autili • Email: {massimo.tivoli, marco.autili}@univaq.it
Roadmap of this lecture • By Massimo Tivoli • automatic synthesis of modular connectors via composition of protocol mediation patterns [ICSE2013] • By Marco Autili • automatic synthesis of service choreographies [FASE2013,SERENE2013,WCRE2013,RESS2011]
Problem and motivations • How to achieve interoperability among heterogeneous NSs by solving protocol mismatches? • State-of-the-art solutions • hand-coded software connectors • automatically synthesized software connectors • Their drawbacks • connector development is a never-ending and error-prone task • NSs interoperability depends on the interoperability of the respective underlying technologies • not all possible protocol mismatches are solvable • current solutions produce monolithic connectors
Our solution • A method for the automatic synthesis of modular connectors • composition of independent mediators • each mediator realizes a mediation pattern • patterns as primitive solutions to recurring protocol mismatches • Advantages • correctness as freedom from possible mismatches • connector evolution
Preamble - Interaction Protocol Specification (IPS) • It is an Interface Automaton (IA) slightly revised in order to account for semantically equivalent actions • Note that the action sets of an IA must be disjoint a' b a' a b a
Preamble - composition of two IPSs a' a a' c IPS1 a c b a' a' a b IPS2 they became hidden in the composition a b c b a a IPS1 IPS2 c inconsistency IPS1 || IPS2 c
Preamble – connector algebra • Mediator patterns ( ) a a a b b a a a … … a1 a'π(1) an a'π(n) NoOp Cons(a) Prod(a) Trans(a,b) a'π(1) a'π(n) a1 an … … … … a a1 a1 an an Order([a1,…,an],π, [a'1,…,a'n]) (π is a permutation of 1,…,n) a a1 an a1 an a a … … Split(a,[a1,…,an]) Merge([a1,…,an],a) • Connectors as composition of primitive mediators Composition Iteration
The purchase order mediation scenario • From the Semantic Web Service (SWS) Challenge: http://sws-challenge.org/wiki/ • Two NSs implemented using different standards and protocols: the Moon Client (MC) and the Blue Service (BS) Login CreateOrder SelectItem SetItemQuantity Close MOON Client (MC) Login SetItemQuantity CreateOrder SelectItem PayThirdParty Close ConfirmItem CloseOrder Communication mismatches concern the semantics and granularity of protocol actions CloseOrder PayThirdParty ConfirmItem GetConfirmation PlaceOrder BLUE Service (BS) GetConfirmation AddItemToOrder StartOrder GetConfirmation Quit PlaceOrder AddItemToOrder Quit AddItemToOrder StartOrder
The purchase order mediation scenario • From the Semantic Web Service (SWS) Challenge: http://sws-challenge.org/wiki/ • Two NSs implemented using different standards and protocols: the Moon Client (MC) and the Blue Service (BS) Domain Ontology (DO) <<OWLClass>> CreateOrder <<OWLClass>> PayThirdParty <<OWLClass>> AddItemToOrder isPartOf{some} {hasPart some SelectItem, SetItemQuantity} <<OWLClass>> Close <<OWLClass>> StartOrder isPartOf{some} isPartOf{some} isPartOf{some} <<OWLClass>> SelectItem <<OWLClass>> SetItemQuantity isPartOf{some} <<OWLClass>> Quit <<OWLClass>> Login {isPartOf some addItemToOrder} {isPartOf some addItemToOrder} <<OWLClass>> CloseOrder <<OWLClass>> GetConfirmation <<OWLClass>> PlaceOrder <<OWLClass>> ConfirmItem To solve communication mismatches, it is necessary to use ontology knowledge in order to align the two protocols to the same concepts and language prop{card} <<OWLClass>> … objectProperty – ontological relation subsumption ontological concept
The purchase order mediation scenario • From the Semantic Web Service (SWS) Challenge: http://sws-challenge.org/wiki/ • Two NSs implemented using different standards and protocols: the Moon Client (MC) and the Blue Service (BS) Login CreateOrder SelectItem SetItemQuantity Close MOON Client (MC) Login SetItemQuantity CreateOrder SelectItem PayThirdParty Close ConfirmItem CloseOrder Coordination mismatches concern the control structure of the protocols CloseOrder PayThirdParty ConfirmItem GetConfirmation PlaceOrder BLUE Service (BS) GetConfirmation AddItemToOrder StartOrder GetConfirmation Quit PlaceOrder AddItemToOrder Quit AddItemToOrder StartOrder
Method overview 1 Automatic Synthesis of Communication Mediators P wrapped-by W P 1.2 Alphabet Alignment R R wrapped-by W Wi 2 Automatic Synthesis of Coordination Mediators Wj W 1.1 DO Mx Synthesis of Communication Mediators My M=(||Mk)
Automatic synthesis of communication mediators • Synthesis of communication mediators out of subsumption relations <<OWLClass>> PlaceOrder CloseOrder is subsumed by PlaceOrder <<OWLClass>> CloseOrder CloseOrder x2 || x2 x2 PlaceOrder M2 = CloseOrder x2 PlaceOrder
Automatic synthesis of communication mediators • Synthesis of communication mediators out of subsumption relations <<OWLClass>> PlaceOrder CloseOrder is subsumed by PlaceOrder <<OWLClass>> CloseOrder CloseOrder x2 PlaceOrder M2 = CloseOrder PlaceOrder
Automatic synthesis of communication mediators • Synthesis of communication mediators out of subsumption relations <<OWLClass>> PlaceOrder CloseOrder is subsumed by PlaceOrder <<OWLClass>> CloseOrder CloseOrder PlaceOrder M2 = CloseOrder PlaceOrder
Automatic synthesis of communication mediators • Synthesis of communication mediators out of aggregation relations <<OWLClass>> CreateOrder CreateOrder and Login are part of StartOrder isPartOf{some} <<OWLClass>> StartOrder isPartOf{some} StartOrder <<OWLClass>> Login Login CreateOrder StartOrder M5 = CreateOrder Login Login CreateOrder
Alphabet alignment • When synthesized out of a subsumption (resp., aggregation) relation, a mediator is used as a wrapper for output (resp., input) actions of a protocol Alphabet of P= {StartOrder, PlaceOrder} StartOrder PlaceOrder CloseOrder Login CreateOrder StartOrder P= PlaceOrder PlaceOrder StartOrder M2 = M5 = CloseOrder StartOrder CreateOrder Login PlaceOrder Login CreateOrder • P is an excerpt of the BLUE service • As second protocol, let us consider an excerpt of the MOON client whose alphabet is {Login, CreateOrder, CloseOrder}
Alphabet alignment • P wrapped-by M5 M5 P StartOrder? ? denote input actions ! denote output actions Login? Login? CreateOrder? CreateOrder? StartOrder? PlaceOrder! PlaceOrder? CloseOrder! M2 PlaceOrder! CreateOrder? CreateOrder? Login? Login?
Alphabet alignment • ((P wrapped-by M5) wrapped-by M2) CloseOrder Login CreateOrder CloseOrder Alphabet of the wrapped version of P = {Login, CreateOrder, CloseOrder} CreateOrder Login Login CreateOrder
Automatic synthesis of coordination mediators • The synthesis algorithm considers finite sets of finite traces wrapped version of MC Login! SetItemQuantity! CreateOrder! SelectItem! CloseOrder? PayThirdParty? Close! ConfirmItem? wrapped version of BS SetItemQuantity? ConfirmItem! SelectItem? Login? SelectItem? CreateOrder? SetItemQuantity? CloseOrder! Close? ConfirmItem!
Automatic synthesis of coordination mediators • In particular, it considers pairs of semantically-related traces wrapped version of MC Login! SetItemQuantity! CreateOrder! SelectItem! CloseOrder? PayThirdParty? Close! ConfirmItem? wrapped version of BS SetItemQuantity? ConfirmItem! SelectItem? Login? SelectItem? CreateOrder? SetItemQuantity? CloseOrder! Close? ConfirmItem! strong notion => possible under-use of protocols
Automatic synthesis of coordination mediators • For each pair of semantically-related traces, compute the difference pair wrapped version of MC Login! SetItemQuantity! CreateOrder! SelectItem! CloseOrder? PayThirdParty? ConfirmItem? Close! wrapped version of BS SetItemQuantity? ConfirmItem! SelectItem? Login? SelectItem? CreateOrder? SetItemQuantity? CloseOrder! Close? ConfirmItem!
Automatic synthesis of coordination mediators since (i) the original traces were semantically-related, (ii) possible hidden actions have been removed, and (iii) loop/cycles are considered k times, these traces can differ for three reasons only CloseOrder? PayThirdParty? ConfirmItem? SetItemQuantity? ConfirmItem! SelectItem? CloseOrder! ConfirmItem!
Automatic synthesis of coordination mediators since (i) the original traces were semantically-related, (ii) possible hidden actions have been removed, and (iii) loop/cycles are considered k times, these traces can differ for three reasons only CloseOrder? PayThirdParty? ConfirmItem? SetItemQuantity? ConfirmItem! 1) unshared actions SelectItem? CloseOrder! ConfirmItem! [| Trans(PayThirdParty,PayThirdParty’)* |]
Automatic synthesis of coordination mediators since (i) the original traces were semantically-related, (ii) possible hidden actions have been removed, and (iii) loop/cycles are considered k times, these traces can differ for three reasons only CloseOrder? PayThirdParty? ConfirmItem? 2) extra/missing sends corresponding to redundant messages SetItemQuantity? ConfirmItem! SelectItem? CloseOrder! ConfirmItem! [| Prod(SetItemQuantity)* |] [| Prod(SelectItem)* |] [| Cons(ConfirmItem)* |]
Automatic synthesis of coordination mediators since (i) the original traces were semantically-related, (ii) possible hidden actions have been removed, and (iii) loop/cycles are considered k times, these traces can differ for three reasons only CloseOrder? PayThirdParty? ConfirmItem? 3) complementary shared actions that appear in a different order SetItemQuantity? ConfirmItem! SelectItem? CloseOrder! ConfirmItem! [| Order([ConfirmItem,CloseOrder], (2,1), [ConfirmItem’,CloseOrder’])* |]
Correctness and connector evolution • M enjoys the same correctness properties of a monolithic connector obtained via quotient • M||(R wrapped-by W) refines Inv((P wrapped-by W)) • M||(P wrapped-by W) refines Inv((R wrapped-by W)) • Relevant changes can be applied on M by simply acting on its constituent mediators, without entirely re-synthesizing its protocol • the most interesting scenario is related to changes at the level of the protocol ontology -> syntactic changes correspond to simple relabeling -> protocol-level changes imply to re-iter the synthesis on the affected traces only
Related work • Formal approaches to protocol conversion [Calvert, Lam 1990 & Lam 1998] • Specification of protocol adapters [Yellin, Strom 1997] • they do not support reordering (Order primitive) and different granularity of protocol languages (Split and Merge primitives) • Automatic mediation of business processes [Vaculin et al. 2007 & 2008] • due to the lack of a formal characterization, it is difficult to assess respective advantages and disadvantages • Connector wrappers as protocol transformations [Garlan et al. 2003] • Algebra of stateless connectors [Bruni, Lanese, Montanari 2006] • they support modularity • the focus is on connector design and specification => no automation • Converter synthesis [Passerone et al. 2002] • they assume an “inconsistency-free” specification of the converter • in the practice, providing such a specification is not a trivial task • Generation of component adapters [Canal, Poizat, Salaün 2008] • it requires to know many implementation details about the adaptation
Roadmap of this lecture • By Massimo Tivoli • automatic synthesis of modular connectors via composition of protocol mediation patterns [ICSE2013] • By Marco Autili • automatic synthesis of service choreographies [FASE2013,SERENE2013,WCRE2013,RESS2011]
Component-based design and connector synthesis(Lecture 2) GSSI PhD in Computer Science L’Aquila, Italy Nov 11th, 2013 Massimo Tivoli and Marco Autili Email: massimo.tivoli@univaq.it Thank you for your attention!Any questions?
Bibliography • [ICSE2013] M. Tivoli and P. Inverardi, Automatic Synthesis of Modular Connectors via Composition of Protocol Mediation Patterns, in: ICSE, 2013 • [FASE2013] M. Autili, D. Di Ruscio, A. Di Salle, P. Inverardi and M. Tivoli, A model-based synthesis process for choreography realizability enforcement, in: FASE, pages 37-52, 2013 • [SERENE2013] M. Autili, A. Di Salle and M.Tivoli, Synthesis of resilient choreographies, in: SERENE, pages 94-108, 2013 • [WCRE2013] M. Autili, P. Inverardi, and M. Tivoli, CHOReOS: Large Scale Choreographies for the Future Internet, in: WCRE, 2013 • [RESS2011] M. Autili, D. Di Ruscio, P. Inverardi, J. Lockerbie and M. Tivoli, A Development Process for Requirements Based Service Choreography, in: RESS, 2011