550 likes | 856 Views
10th June 2007 Steve Ross-Talbot Chair Pi4 Technologies Foundation CTO Hattrick Software Ltd Chair W3C Web Services Choreography WG Thanks to Pi4 Technologies Foundation Ltd ( www.pi4tech.com ) Hattrick Software Ltd ( www.hattricksoftware.com )
E N D
10th June 2007 Steve Ross-Talbot Chair Pi4 Technologies Foundation CTO Hattrick Software Ltd Chair W3C Web Services Choreography WG Thanks to Pi4 Technologies Foundation Ltd (www.pi4tech.com) Hattrick Software Ltd (www.hattricksoftware.com) World Wide Web Consortium (Choreography Working Group) Building distributed systems using WS-CDL
Agenda • Background • π4 Technologies Foundation • Hattrick Software Ltd • WS-CDL • Simple example • Case study • Research
π4 Technologies Foundation • Founded in November 2005 • Kohei Honda, Nobuko Yoshida, Marco Carbone, Robin Milner, Steve Ross-Talbot, Gary Brown • Enable collaborative research between industry and academia in applying formalisms to distributed systems development
π4 Technologies Foundation • Bi-directional (open format for collaboration) • Real world examples -> academia • Academia research -> industry • Forums for discussion • www.pi4tech.org • Open source environment for research and development. (Apache 2.0) • CDL toolsuite • Advanced type system
π4 Technologies Foundation • Results so far: • CDL tool suite - eclipse-based community edition • Modeling editor • Generation to wsdl, java, ws-bpel • Export to html, bpmn, ws-cdl, uml • Scenarios • Editor • Validation • Vertical standards use (FpML, TWIST, ISO WG4) • Modeling editor with wsdl, html, bpmn, ws-cdl and uml • Scenrios editor and validation • Complements existing vertical standards packs • Static • Document, Validated example message, XMLSchema, Example scenarios • Dynamic • Document, Validated example scenarios, WS-CDL description
π4 Technologies Foundation An example in CDM
π4 Technologies Foundation Exported to BPMN
π4 Technologies Foundation Exported to HTML
π4 Technologies Foundation Exported to HTML
π4 Technologies Foundation Exported to CDL
π4 Technologies Foundation Exported to CDL
π4 Technologies Foundation Support for scenarios validated against the choreography
Hattrick Software Ltd • Commercial entity charged with solving the problems of automation of OTC Derivatives Trading. • Long lived, complex peered processes in which parties may change roles • ClearGate generic WS-CDL-based protocol enforcer/monitor
WS-CDL A language to describe the collaborative external observable behavior of a set of peered systems/services/applications as an ordered set of interactionsover one or more logical channels that connect them.
Buyer Seller Buyer Seller getQuote getQuote quoteResponse quoteRejected < 1000 units >= 1000 units Simple example x
Workunits This is what we used
This is what we provide in the Pi4Tech tools for workunits Workunits
GC End Point Projection EPr1 EPr2 EPrn Theory • Global Calculus • Distillation of WS-CDL • Reduction rules, etc • End point Calculus • Correspondance to Global Calculus • Reduction riles, etc http://www.w3.org/2002/ws/chor/edcopies/theory/note.pdf
Theory http://www.w3.org/2002/ws/chor/edcopies/theory/note.pdf
Theory http://www.w3.org/2002/ws/chor/edcopies/theory/note.pdf
WS-CDL Benefits • A complete and unambiguous description [of a distributed system] of how peered roles or participants should interact and the order in which these interactions should take place. • Enables code generation for a distrbuted system (end point projections) and guarantees interoperability of that system by design. • Enables us to ask questions of a system so described: • Is it free from deadlocks, livelocks and races?
Case Study • FpML • Financial Products Markup Language • Policed by ISDA • FpML today is • A set of documents that describe the structure of how to encode financial products in XML • XMLSchema to enable validation of correct message formats and a set of example messages • There are a set of sequence diagrams to govern when to send what to whom
Why WS-CDL? • Consider the following: • Three companies wish to embark on a common business process. They are PartyA, PartyB and Confirmer. • PartyA: Is a seller selling some commodity • PartyB: Is a buyer buying some commodity • Confirmer: Acts as a central/brokered matching service that both PartyA and PartyB use to ensure that the contract between them matches (is valid). Confirming is legally binding.
Why WS-CDL? • This is a distributed system in which no one company has dominion over any other. • PartyA, PartyB and Confirmer are all peers. • PartyA, PartyB and Confirmer could be different parts of the same company or different companies. • PartyA, PartyB and Confirmer need to interact to progress some common goal such as buying and selling some goods.
Confirm Confirmed Confirm Confirmed 2 4 3 1 Confirm Confirmed Confirmed Confirm Why WS-CDL? Confirmer PartyA PartyB
Why WS-CDL? • How we do this today using older technology: • XMLSchema, UML Activity Models, Sequence Diagrams, etc … • How we do this with WS-CDL: • XML Schema, WS-CDL description, Scenarios/Sequence Diagrams, multiple formats for review
Today XMLSchema for data formats
Using WS-CDL Choreography description: Parallel { { // PartyA thread RequestTradeConfirmation [PartyA2Confirmer] RequestTradeMatch [Confirmer2Matcher] } // PartyA thread { // PartyB thread RequestTradeConfirmation [PartyB2Confirmer] RequestTradeMatch [Confirmer2Matcher] } } ……. }
Using WS-CDL While (not inConfirm) { Choice { { // ---- Modification by PartyA ModifyTradeConfirmation [PartyA2Confirmer] ModifyTradeMatch [Confirmer2Matcher] } { // ---- Modification by PartyB ModifyTradeConfirmation [PartyB2Confirmer] ModifyTradeMatch [Confirmer2Matcher] } ……… } }
Using WS-CDL Choice { …… Sequence { // ---- Confirmation process Choice { Sequence { // ---- TradeMatched ---- TradeMatched [Matcher2Confirmer] Parallel { { TradeMatched [Confirmer2PartyA] } { TradeMatched [Confirmer2PartyB] } } ConfirmTrade [PartyA2Confirmer] Parallel { { TradeConfirmed [Confirmer2PartyA] } { TradeConfirmed [Confirmer2PartyA] } } } ….. } // End Choice } // End Sequence }
Using WS-CDL Choice { …… { // ---- TradeMismatched ---- TradeMismatched [Matcher2Confirmer] Parallel { { TradeMismatched [Confirmer2Alleger] } { TradeMismatched [Confirmer2Acceptor] } } } { // Alleger cancels CancelTradeConfirmation [Alleger2Confirmer] CancelTradeMatch [Confirmer2Matcher] Parallel { { ConfirmationCancelled [Confirmer2Alleger]} { ConfirmationCancelled [Confirmer2Acceptor]} } } ….. // same but other way around } // End Choice
Trading System Confirmation System Matching System Trading System RequestTradeConfirmation RequestTradeMatch RequestTradeConfirmation RequestTradeMatch ModifyradeConfirmation ModifyTradeMatch Question
Trading System Confirmation System Matching System Trading System RequestTradeConfirmation RequestTradeMatch ModifyradeConfirmation ModifyTradeMatch RequestTradeConfirmation RequestTradeMatch Question Is this valid against our model?