component-based design and connector synthesis (lecture 2) massimo tivoli and marco autili email:...

Download Component-based design and connector synthesis (Lecture 2) Massimo Tivoli and Marco Autili Email: {massimo.tivoli, marco.autili}@univaq.it GSSI PhD in

If you can't read please download the document

Upload: marilyn-lewis

Post on 13-Dec-2015

213 views

Category:

Documents


0 download

TRANSCRIPT

  • Slide 1

Component-based design and connector synthesis (Lecture 2) Massimo Tivoli and Marco Autili Email: {massimo.tivoli, marco.autili}@univaq.it GSSI PhD in Computer Science LAquila, Italy Nov 11th, 2013 Slide 2 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] Slide 3 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 Slide 4 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 Slide 5 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 b a' a b a Slide 6 Preamble - composition of two IPSs IPS 2 IPS 1 IPS 2 b a' a b a IPS 1 c a a' c a IPS 1 || IPS 2 b c a b c a c inconsistency they became hidden in the composition Slide 7 Preamble connector algebra Mediator patterns ( ) Connectors as composition of primitive mediators a a Cons(a) NoOp a a Prod(a) b a Trans(a,b) b a a1a1 a Split(a,[a 1,,a n ]) a1a1 a anan anan a1a1 a Merge([a 1,,a n ],a) a1a1 a anan anan a1a1 Order([a 1,,a n ],, [a' 1,,a' n ]) ( is a permutation of 1,,n) a1a1 anan anan a' (n) a' (1) a' (n) Composition Iteration Slide 8 The purchase order mediation scenario From the Semantic Web Service (SWS) Challenge: http://sws-challenge.org/wiki/http://sws-challenge.org/wiki/ Two NSs implemented using different standards and protocols: the Moon Client (MC) and the Blue Service (BS) MOON Client (MC) Login CreateOrder SelectItem SetItemQuantity CloseOrder ConfirmItemClose PayThirdParty Login CreateOrderSelectItemSetItemQuantity PayThirdParty Close ConfirmItem CloseOrder BLUE Service (BS) StartOrder AddItemToOrder GetConfirmation PlaceOrder Quit GetConfirmation StartOrder AddItemToOrder Quit GetConfirmation PlaceOrder Communication mismatches concern the semantics and granularity of protocol actions Slide 9 The purchase order mediation scenario > PayThirdParty > GetConfirmation > ConfirmItem > PlaceOrder > CloseOrder > CreateOrder > StartOrder > Login isPartOf{some} > Close > Quit isPartOf{some} From the Semantic Web Service (SWS) Challenge: http://sws-challenge.org/wiki/http://sws-challenge.org/wiki/ Two NSs implemented using different standards and protocols: the Moon Client (MC) and the Blue Service (BS) subsumption prop{card} objectProperty ontological relation > ontological concept Domain Ontology (DO) > AddItemToOrder {hasPart some SelectItem, SetItemQuantity} > SelectItem {isPartOf some addItemToOrder} > SetItemQuantity {isPartOf some addItemToOrder} isPartOf{some} To solve communication mismatches, it is necessary to use ontology knowledge in order to align the two protocols to the same concepts and language Slide 10 The purchase order mediation scenario From the Semantic Web Service (SWS) Challenge: http://sws-challenge.org/wiki/http://sws-challenge.org/wiki/ Two NSs implemented using different standards and protocols: the Moon Client (MC) and the Blue Service (BS) MOON Client (MC) Login CreateOrder SelectItem SetItemQuantity CloseOrder ConfirmItemClose PayThirdParty Login CreateOrderSelectItemSetItemQuantity PayThirdParty Close ConfirmItem CloseOrder BLUE Service (BS) StartOrder AddItemToOrder GetConfirmation PlaceOrder Quit GetConfirmation StartOrder AddItemToOrder Quit GetConfirmation PlaceOrder Coordination mismatches concern the control structure of the protocols Slide 11 1 1 Automatic Synthesis of Communication Mediators Method overview P P R R DO Synthesis of Communication Mediators Synthesis of Communication Mediators 1.1 W W WiWi WjWj Automatic Synthesis of Coordination Mediators Automatic Synthesis of Coordination Mediators 2 2 M=(||M k ) MxMx MyMy Alphabet Alignment Alphabet Alignment 1.2 P wrapped-by W R wrapped-by W Slide 12 Automatic synthesis of communication mediators Synthesis of communication mediators out of subsumption relations > PlaceOrder > CloseOrder CloseOrder is subsumed by PlaceOrder PlaceOrder CloseOrder x2x2 x2x2 M 2 = PlaceOrder x2x2 x2x2 || Slide 13 Automatic synthesis of communication mediators Synthesis of communication mediators out of subsumption relations > PlaceOrder > CloseOrder CloseOrder is subsumed by PlaceOrder PlaceOrder CloseOrder x2x2 M 2 = PlaceOrder Slide 14 Automatic synthesis of communication mediators Synthesis of communication mediators out of subsumption relations > PlaceOrder > CloseOrder CloseOrder is subsumed by PlaceOrder PlaceOrder CloseOrder M 2 = PlaceOrder Slide 15 Automatic synthesis of communication mediators Synthesis of communication mediators out of aggregation relations CreateOrder and Login are part of StartOrder > CreateOrder > StartOrder > Login isPartOf{some} StartOrder M 5 = Login CreateOrder Login StartOrder CreateOrder Slide 16 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 StartOrder M 5 = Login CreateOrder Login StartOrder CreateOrder PlaceOrder CloseOrder M 2 = PlaceOrder StartOrder PlaceOrder StartOrder PlaceOrder P =P = Alphabet of P = {StartOrder, PlaceOrder} 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} Slide 17 Alphabet alignment P wrapped-by M 5 StartOrder? PlaceOrder! Login? CreateOrder? Login? PlaceOrder! Login? CreateOrder? Login? StartOrder? M5M5 P ? denote input actions ! denote output actions PlaceOrder? CloseOrder! M2M2 Slide 18 Alphabet alignment ((P wrapped-by M 5 ) wrapped-by M 2 ) Alphabet of the wrapped version of P = {Login, CreateOrder, CloseOrder} CloseOrder Login CreateOrder Login CloseOrder CreateOrder Slide 19 Automatic synthesis of coordination mediators The synthesis algorithm considers finite sets of finite traces wrapped version of MC wrapped version of BS Login! CreateOrder! SelectItem! SetItemQuantity! CloseOrder? ConfirmItem?Close! PayThirdParty? Login? SelectItem? ConfirmItem! CloseOrder! Close? ConfirmItem! CreateOrder? SetItemQuantity? SelectItem? SetItemQuantity? Slide 20 Automatic synthesis of coordination mediators In particular, it considers pairs of semantically-related traces wrapped version of MC wrapped version of BS Login! CreateOrder! SelectItem! SetItemQuantity! CloseOrder? ConfirmItem?Close! PayThirdParty? Login? SelectItem? ConfirmItem! CloseOrder! Close? ConfirmItem! CreateOrder? SetItemQuantity? SelectItem? SetItemQuantity? strong notion => possible under-use of protocols Slide 21 Automatic synthesis of coordination mediators For each pair of semantically-related traces, compute the difference pair CloseOrder? ConfirmItem? PayThirdParty? wrapped version of MC Login! CreateOrder! SelectItem! SetItemQuantity! Close! ConfirmItem! CloseOrder! ConfirmItem! SelectItem? SetItemQuantity? wrapped version of BS Login? SelectItem? Close? CreateOrder? SetItemQuantity? Slide 22 Automatic synthesis of coordination mediators CloseOrder? ConfirmItem? PayThirdParty? ConfirmItem! CloseOrder! ConfirmItem! SelectItem? SetItemQuantity? 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 Slide 23 Automatic synthesis of coordination mediators CloseOrder? ConfirmItem? PayThirdParty? ConfirmItem! CloseOrder! ConfirmItem! SelectItem? SetItemQuantity? 1) unshared actions [| Trans(PayThirdParty,PayThirdParty)* |] 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 Slide 24 Automatic synthesis of coordination mediators CloseOrder? ConfirmItem? PayThirdParty? ConfirmItem! CloseOrder! ConfirmItem! SelectItem? SetItemQuantity? 2) extra/missing sends corresponding to redundant messages [| Prod(SetItemQuantity)* |] [| Prod(SelectItem)* |] [| Cons(ConfirmItem)* |] 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 Slide 25 Automatic synthesis of coordination mediators CloseOrder? ConfirmItem? PayThirdParty? ConfirmItem! CloseOrder! ConfirmItem! SelectItem? SetItemQuantity? 3) complementary shared actions that appear in a different order [| Order([ConfirmItem,CloseOrder], (2,1), [ConfirmItem,CloseOrder])* |] 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 Slide 26 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 Slide 27 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, Salan 2008] it requires to know many implementation details about the adaptation Slide 28 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] Slide 29 Component-based design and connector synthesis (Lecture 2) Thank you for your attention! Any questions? GSSI PhD in Computer Science LAquila, Italy Nov 11th, 2013 Massimo Tivoli and Marco Autili Email: [email protected] Slide 30 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