Скачать презентацию A Tool for Choreography Analysis Using Collaboration Diagrams Скачать презентацию A Tool for Choreography Analysis Using Collaboration Diagrams

03066f8b0abe514bce19f326188092d4.ppt

  • Количество слайдов: 34

A Tool for Choreography Analysis Using Collaboration Diagrams Tevfik Bultan Chris Ferguson Xiang Fu A Tool for Choreography Analysis Using Collaboration Diagrams Tevfik Bultan Chris Ferguson Xiang Fu University of California Santa Barbara Hofstra University

Outline • Modeling Service Interactions as Conversations • Specification of Conversations Using Collaboration Diagrams Outline • Modeling Service Interactions as Conversations • Specification of Conversations Using Collaboration Diagrams • Analyzing Collaboration Diagrams • Collaboration Diagram Extensions • Tool Architecture and Experiments

Web Services The World Wide Web Consortium (W 3 C) defines a Web service Web Services The World Wide Web Consortium (W 3 C) defines a Web service as – "a software system designed to support interoperable machine-tomachine interaction over a network” • Web services support basic client/server style interactions WSDL Request Service Requester Client SOAP Response Service Provider Server

Service Interactions • One of the main goals of service oriented computing is to Service Interactions • One of the main goals of service oriented computing is to facilitate integration and composition of services • Modeling, specifying and analyzing interactions among services are crucial problems that need to be addressed in order to achieve this goal • Different service developers that want their services to take part in a composition have to agree on how services will interact with each other • Web Service-Choreography Description Language (WS-CDL) – WS-CDL specifications describe “peer-to-peer collaborations of Web Services participants by defining, from a global viewpoint, their common and complementary observable behavior; where ordered message exchanges result in accomplishing a common business goal. ”

Web Services Standards Stack Choreography Orchestration Service Web Services Choreography Description Language (WS-CDL) Web Web Services Standards Stack Choreography Orchestration Service Web Services Choreography Description Language (WS-CDL) Web Services Business Process Execution Language (WS-BPEL) Web Services Description Language (WSDL) Protocol Type Simple Object Access Protocol (SOAP) XML Schema (XSD) Extensible Markup Language (XML) Data WSDL WS-BPEL SOAP Atomic Service SOAP Orchestrated Service SOAP WS-CDL WS-BPEL Orchestrated Service WSDL SOAP Atomic Service

An Example • Assume four peers (individual services): – Customer, Store, CDSupplier, Book. Supplier An Example • Assume four peers (individual services): – Customer, Store, CDSupplier, Book. Supplier • Workflow: – Customer sends an order to the Store – Store checks the availability of the CDs and the books in the order by sending a cd. Inquiry message to CDSupplier and a book. Inquiry message to Book. Supplier – CDSupplier and Book. Supplier send the cd. Availability and book. Availibility back to the Store – Store sends order. Reply to the Customer

A Model for Composite Web Services • A composite web service consists of – A Model for Composite Web Services • A composite web service consists of – a finite set of peers • Customer, Store, CDSupplier, Book. Supplier – and a finite set of messages • Customer Store: order • Store CDSupplier: cd. Inquiry • Store Book. Supplier: book. Inquiry • CDSupplier Store: cd. Availability • Book. Supplier Store: book. Availability • Store Customer: order. Reply

Asynchronous Communication Model • We assume that the messages among the peers are exchanged Asynchronous Communication Model • We assume that the messages among the peers are exchanged using reliable and asynchronous messaging – FIFO and unbounded message queues Customer order Store

Modeling Interactions as Conversations • A conversation is the global sequence of messages recorded Modeling Interactions as Conversations • A conversation is the global sequence of messages recorded in the order they are sent [Bultan, Fu, Hull, Su WWW’ 03] order Customer Store cd. Availability cd. Inquiry CDStore Conversation order cd. Inquiry cd. Availability …

Specifying Conversations • There are lots of allowed conversations for our simple example: order Specifying Conversations • There are lots of allowed conversations for our simple example: order cd. Inq cd. Avail order book. Inq book. Avail order book. Inq cd. Inq order cd. Inq book. Inq … … • There also lots of un-allowed conversations: order cd. Avail cd. Inq order book. Inq cd. Avail … … …

Specifying Conversations via Collaboration Diagrams : Customer must precede sequence message label 1/A 1: Specifying Conversations via Collaboration Diagrams : Customer must precede sequence message label 1/A 1: cd. Inquiry 1: order A 2, B 2/2: order. Reply : CDSupplier A 2: cd. Availability : Store 1/B 1: book. Inquiry : Book. Supplier B 2: book. Availability

More On Collaboration Diagrams must precede sequence label message A 2, B 2 / More On Collaboration Diagrams must precede sequence label message A 2, B 2 / 2 : order. Reply asynchronous communication conditional send cd. Inquiry [has CD] synchronous communication order* iterative send

Dependency Among Message Send Events • Message send events are ordered based on two Dependency Among Message Send Events • Message send events are ordered based on two rules – Implicit: The sequence labels that have the same prefix must be ordered based on their sequence number – Explicit: The events listed before “/” must precede the current event initial event 1: order 1/A 1: cd. Inquiry 1/B 1: book. Inquiry A 2: cd. Availability B 2: book. Availability A 2, B 2/2: order. Reply final event

1: order 1/A 1: cd. Inquiry {1, 2, A 1, A 2, B 1, 1: order 1/A 1: cd. Inquiry {1, 2, A 1, A 2, B 1, B 2} 1/B 1: book. Inquiry 1: order A 2: cd. Availability B 2: book. Availability A 2, B 2/2: order. Reply {2, A 1, A 2, B 1, B 2} A 1: cd. Inquiry Automata (Conversation Protocol) Construction B 1: book. Inquiry {2, A 2, B 1, B 2} A 2: cd. Availability {2, A 1, A 2, B 2} B 2: book. Availabililty B 1: book. Availability A 1: cd. Inquiry {2, B 1, B 2} {2, A 2, B 2} A 2: cd. Availability {2, A 1, A 2} B 2: book. Availability B 1: book. Inquiry A 1: cd. Inquiry {2, B 2} : Customer 1: order {2, A 2} A 2: cd. Availability B 2: book. Availability A 2, B 2/2: order. Reply {2} 1/A 1: cd. Inquiry A 2: cd. Availability : CDSupplier 2 : order. Reply : Store 1/B 1: book. Inquiry : Book. Supplier B 2: book. Availability

Implementation with Finite State Machines Store Customer ? order !cd. Inquiry ? order. Reply Implementation with Finite State Machines Store Customer ? order !cd. Inquiry ? order. Reply !book. Inquiry !order !book. Inquiry !cd. Inquiry ? cd. Availability ? book. Availability !book. Inquiry CDSupplier !cd. Availability !cd. Inquiry ? cd. Availability ? book. Availability ? cd. Inquiry Book. Supplier ? cd. Availability !order. Reply !book. Availability ? book. Inquiry

Realizability of Collaboration Diagrams • Not all collaboration diagrams are realizable! • It is Realizability of Collaboration Diagrams • Not all collaboration diagrams are realizable! • It is possible to specify interactions that cannot be realized by any peer implementation • This is a problem! – Assume that we want to specify how several services should interact with each other – If we write a specification that is not realizable • the implementation will not be faithful to the specification no matter what we do

Realizability of Collaboration Diagrams Not Realizable 1: order : Customer : Store 2: order. Realizability of Collaboration Diagrams Not Realizable 1: order : Customer : Store 2: order. Info 2: ship : Shipping : Customer : Depot 3: ship : Shipping : Depot

Realizability of Collaboration Diagrams Not Realizable 1: order : Customer 2: bill : Store Realizability of Collaboration Diagrams Not Realizable 1: order : Customer 2: bill : Store : Customer : Store 3: bill 2: order. Info : Accounting

A Sufficient Condition for Realizability • We call a send event e well informed A Sufficient Condition for Realizability • We call a send event e well informed – If e is an initial event – Otherwise, let e’ be an immediate predecessor of e • If e’ is a synchronous send or not conditional or iterative – sender for e should be either the receiver or sender for e’ • If e’ is an asynchronous send and conditional or iterative – sender for e should be the sender for e’ and the receiver for e should be the receiver for e’ – e should not be conditional or iterative, – e and e’ should not send the same message • A collaboration diagram is realizable if all its events are well-informed

Realizability of Collaboration Diagrams Not Realizable 1: order : Customer : Store 2: order. Realizability of Collaboration Diagrams Not Realizable 1: order : Customer : Store 2: order. Info 2: ship : Shipping : Customer : Depot 3: ship : Shipping this send event is not well-informed : Depot

Realizability of Collaboration Diagrams Not Realizable 1: order : Customer 2: bill : Store Realizability of Collaboration Diagrams Not Realizable 1: order : Customer 2: bill : Store this send event is not well-informed : Customer : Store 3: bill 2: order. Info : Accounting

Collaboration Diagram Extensions • Collaboration Diagram Sets – The conversation set if the union Collaboration Diagram Extensions • Collaboration Diagram Sets – The conversation set if the union of the conversation sets of each collaboration diagram in the collaboration diagram set • Collaboration Diagram Graphs – Conversation set is obtained by concatenating the conversation sets of different collaboration diagrams according to the collaboration diagram graph

Collaboration Diagram Sets • Collaboration diagram sets are more expressive than individual collaboration diagrams Collaboration Diagram Sets • Collaboration diagram sets are more expressive than individual collaboration diagrams 1: x 2: y : P : Q P Q: x P Q: z 3: z P Q: y 2: x 3: y : P : Q P Q: z P Q: x P Q: y 1: z Corresponding conversation protocol This collaboration diagram set specifies a set of interactions that cannot be specified by any single collaboration diagram

Collaboration Diagram Graphs • Collaboration diagram graphs are more expressive than collaboration diagram sets Collaboration Diagram Graphs • Collaboration diagram graphs are more expressive than collaboration diagram sets P Q: x 1: x : P : Q 2: y Q P: y Corresponding conversation protocol This collaboration diagram graph specifies a set of interactions that cannot be specified by any collaboration diagram set

Analyzing Collaboration Diagram Extensions • Realizability of collaboration diagram sets and collaboration diagram graphs Analyzing Collaboration Diagram Extensions • Realizability of collaboration diagram sets and collaboration diagram graphs cannot be determined using the well-informed event rule we discussed earlier • However, collaboration diagram sets and collaboration diagram graphs can be converted to conversation protocols • We can use the earlier results on realizability of conversation protocols to determine realizability of collaboration diagram sets and collaboration diagram graphs

A Tool for Analyzing Collaboration Diagrams Promela Translator LTL Model Checking with SPIN Automata A Tool for Analyzing Collaboration Diagrams Promela Translator LTL Model Checking with SPIN Automata Constructor Peer Synthesizer Realizability Analyzer Collaboration Diagrams Dependency Graph Constructor Conversation Protocol Translator Realizability Analysis with WSAT • The tool is implemented as an Add-In to Sparx Systems Enterprise Architect UML Editor

Experiments Problem Instance Realizability 1 Realizability 2 States Factory Manager YES NO 383 Order Experiments Problem Instance Realizability 1 Realizability 2 States Factory Manager YES NO 383 Order Item NO NO 42 (after fix) Purchase Order YES NO 246 Company Store YES 22 Information Exchange YES 50 Voting Booth NO NO 59 (after fix) Causality Model YES NO 116

Order Item Example order. Window: Order. Entry. Window 1: prepare. Order order: Order 2: Order Item Example order. Window: Order. Entry. Window 1: prepare. Order order: Order 2: prepare. Order. Line 5: need. To. Reorder 3: check macallan. Line: Order. Line 7: new. Delivery? delivery. Item: Delivery. Item macallan. Stock: Stock. Item 4: remove? 6: new. Re. Order reorder. Item: Re. Order. Item

Conclusions • Collaboration diagrams are an appropriate specification mechanism for service conversations – There Conclusions • Collaboration diagrams are an appropriate specification mechanism for service conversations – There are conditions which guarantee realizability of collaboration diagrams • Collaboration diagrams can be generalized to collaboration diagram sets and collaboration diagram graphs – Results on realizability of conversation protocols can be used to determine realizability of collaboration diagram sets and collaboration diagram graphs • We implemented these results in a collaboration diagram development tool

THE END THE END

Related Work • Message Sequence Charts (MSC) – Realizability [Alur, Etassami, Yannakakis ICSE 00, Related Work • Message Sequence Charts (MSC) – Realizability [Alur, Etassami, Yannakakis ICSE 00, ICALP 01] – Implied scenarios [Uchitel, Kramer, Magee ACM TOSEM 04] • Modeling agent conversations with Dooley graphs [Parunak, ICMAS 96] • Conversation protocols [Fu, Bultan, Hull, Su WWW 03] [Fu, Bultan, Su, TCS 04, IEEE TSE 05] • Modeling services using UML diagrams – [Benatallah, Sheng, Dumas, IEEE IC 03] – [Skogan, Gronmo, Solheim IEEE EDOCC 04] – [Blake ICWS 06] – …

1: x : P 1: y : Q 2: y : P : Q 1: x : P 1: y : Q 2: y : P : Q 2: x 3: z : R An unrealizable Collaboration Diagram Set which consists of realizable collaboration diagrams.

1: y 1: x : P : Q 2: y : R : P 1: y 1: x : P : Q 2: y : R : P 3: z : Q 2: x An unrealizable Collaboration Diagram Set which consists of realizable collaboration diagrams. : R

1: x : P 2: x : Q : P 2: y : R 1: x : P 2: x : Q : P 2: y : R : Q 1: y : S : R : S A realizable Collaboration diagram set which consists of unrealizable collaboration diagrams