Presentation is loading. Please wait.

Presentation is loading. Please wait.

Π 4 Technologies Building distributed systems using WS-CDL and FpML 16th May 2007 Steve Ross-Talbot CTO Hattrick Software Chair W3C Web Services Choreography.

Similar presentations


Presentation on theme: "Π 4 Technologies Building distributed systems using WS-CDL and FpML 16th May 2007 Steve Ross-Talbot CTO Hattrick Software Chair W3C Web Services Choreography."— Presentation transcript:

1 π 4 Technologies Building distributed systems using WS-CDL and FpML 16th May 2007 Steve Ross-Talbot CTO Hattrick Software Chair W3C Web Services Choreography WG Chair Pi4 Technologies Foundation Thanks to Pi4 Technologies Foundation Ltd (www.pi4tech.com)www.pi4tech.com Hat Trick Software Ltd (www.hattricksoftware.com)www.hattricksoftware.com

2 π 4 Technologies Agenda Background Why is process important? Why use WS-CDL? What is WS-CDL? Deep dive

3 π 4 Technologies Background 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 –There are a set of sequence diagrams to govern when to send what to whom

4 π 4 Technologies Background Typical message:

5 π 4 Technologies Background Typical flow:

6 π 4 Technologies The problem How do we know what the context is for any FpML message Is it NovationConsentGranted? Is it NovationConsentRefused?

7 π 4 Technologies The solution today Hope and pray …. –Add meta data around the FpML package –Agree meta data with your clients NovationConsentGranted AllocationId 9876

8 π 4 Technologies The problem today Behavior first. Content second. No agreement on meta data needed, because there are no fully defined processes What makes a NovationConsentGranted a NovationConsentGranted is the process not the message. The message is a consequence.

9 π 4 Technologies The problem today Sequence diagrams are not enough

10 π 4 Technologies Buyer, Seller, Credit Agency, Shipper. Buyer barters with the Seller to get a price Buyer accepts a price and places an order Seller checks Buyers credit worthiness Seller requests delivery from Shipper Shipper sends delivery details to Seller and to Buyer How do we write this down today? –Bubble and stick –Sequence diagrams –WS-CDL An Example

11 π 4 Technologies BuyerSeller Shipper Credit Agency An Example - Bubble and Stick

12 π 4 Technologies BuyerSeller Buyer request a quote from the seller. Seller responds with a quote. Quotes may timeout. Buyer MAY update quote and request the update from the seller. Seller MAY respond with the update quote. Buyer MAY accept the quote. An Example - Bubble and Stick

13 π 4 Technologies BuyerSeller Shipper Credit Agency Seller checks credit worthiness. Seller requests delivery from Shipper. Shipper sends delivery details back to Seller and to Buyer. If Buyer accepts the quote. If Credit worthiness is okay An Example - Bubble and Stick

14 π 4 Technologies An Example - Sequence diagrams

15 π 4 Technologies An Example - Sequence diagrams

16 π 4 Technologies An Example - Sequence diagrams

17 π 4 Technologies An Example - Sequence diagrams

18 π 4 Technologies Why Process? All messages exist in a context. –E.g. fpml:RequestAllocationConfirmation message will not be relevant in an Affirmation (Trade) business process It’s not what you do but the way that you do it –Did I expect to get an fpml:AllocationConfirmed message after sending an fpml:ConfirmAllocation? –Ordering is important because it defines how you behave. Behaviour directly impact interoperability. Can I work with Mega Bank? Standardising the business processes increases STP rates and enables the market to grow. –The differentiator is the product being sold not how the back office deal with it.

19 π 4 Technologies Why WS-CDL? Need to describe a business process from an architectural neutral perspective. Need to describe a complex model in which participant roles may change. Need to model a message oriented business processes as well as having an option to leverage Web Services. Need to use a recognised standard to avoid vendor lock-in. Need to have open source tools for description to avoid vendor lock-in.

20 π 4 Technologies What is WS-CDL? Standard from the W3C Enables processes (protocols, business processes) to be described from a neutral or global perspective, enabling the services to run as peers whilst guaranteeing interoperabilty of those services. Described processes based on their common collaborative behavior through message passing, called interaction.

21 π 4 Technologies Where does WS-CDL fit? XMLSchema describes format WS-CDL described behavior Format + Behavior = systems

22 π 4 Technologies FpML 4.3 Open source tool for process description XMLSchema (with meta data identified) Scenarios validated against a WS-CDL model Scenarios for review, Html for review, BPMN for review Generation of roles directly into code or through UML into code

23 π 4 Technologies Opensource toolsuite Pi4 Technologies Foundation open source tool suite –www.pi4tech.org –Eclipse plugins (pi4tech update site)pi4tech update site –Graphical modeling environment –Static type checking (completeness, lock free, race condition free) –Export WS-CDL WSDL HTML BPMN –Generate UML artifacts Java (for J2EE) Java (for Axis) BPEL –Monitor Against WS-CDL description Legacy and/or generated

24 π 4 Technologies FpML 4.3 model overview

25 π 4 Technologies FpML 4.3 model designer

26 π 4 Technologies FpML 4.3 model

27 π 4 Technologies FpML 4.3 model

28 π 4 Technologies FpML 4.3 model

29 π 4 Technologies FpML 4.3 model

30 π 4 Technologies FpML 4.3 model

31 π 4 Technologies FpML 4.3 model

32 π 4 Technologies FpML 4.3 model In a nutshell: –Types Roles - encapsulations of behavior Participants - encapsulations of end-points that play roles Information types - messages and useful variables Channel types - to facilitate communication Bindings of channel types to message types through identity (called session typing) –Ordering/Business Processes Interactions over channels (sending and receiving of messages) Ordering and dependencies –Situated decisions @roles –Project out participant behaviors

33 π 4 Technologies FpML 4.3 confirmations AllocationAlleged [Acc2All] OR RequestAllocationConfirmation [All2Acc], AllocationUnmatched [Acc2All] OR RequestAllocationConfirmation [All2Acc], DO Loop Loop { Choice { 1.ModifyAllocationConfirmation [All2Acc], IF (policy) THEN ModifyAllocationMatch[Acc2All] 2. AllocationMismatched[Acc2All] 3. CancelAllocationConfimation[All2Acc], (AllocationCancelled OR AllocationAlreadyMatched)[Acc2All] 4. AllocationAlreadySubmitted [Acc2All] 5. RequestAllocationMatched[Acc2All], AllocationMatched[All2Acc], ConfirmAllocation[Acc2All], AllocationConfirmed[All2Acc] 6. AllocationAlreadyMatched[Acc2All] } if you do any of 2, 3,4 5,6 then break the loop }

34 π 4 Technologies FpML 4.3 Confirmations Project out the behavior of the Alleger and the Accepter. AllStateMachine policies the Alleger role. –When it sends AccStateMachine policies the Accepter role. –This guy receives How do you know they are correct –Statically - advanced typechecking shows conformance. –At runtime - with session mgmt and monitoring against expected behavior……. For example …..

35 π 4 Technologies FpML 4.3 confirmations AllocationAlleged RequestAllocationConfirmation AllocationUnmatched RequestAllocationConfirmation ModifyAllocationConfirmation ModifyAllocationMatch ModifyAllocationConfirmation ModifyAllocationMatch ModifyAllocationConfirmation ModifyAllocationMatch CancelAllocationConfirmation AllocationCancelled RequestAllocationConfirmation RequestAllocationMatched AllocationMatched ConfirmAllocation AllocationConfirmed RequestAllocationConfirmation ModifyAllocationConfirmation ModifyAllocationMatch ModifyAllocationConfirmation ModifyAllocationMatch RequestAllocationMatched AllocationMatched AllocationConfirmed   HOW CAN WE DETERMINE IF THESE SEQUENCES OF MESSAGES ARE CORRECT? ConfirmAllocation RequestAllocationConfirmation RequestAllocationMatched AllocationMatched ConfirmAllocation AllocationConfirmed RequestAllocationConfirmation ModifyAllocationConfirmation ModifyAllocationMatch ModifyAllocationConfirmation ModifyAllocationMatch RequestAllocationMatched AllocationMatched AllocationConfirmed

36 π 4 Technologies ConfirmAllocation RequestAllocationConfirmation ModifyAllocationConfirmation ModifyAllocationMatch ModifyAllocationConfirmation ModifyAllocationMatch RequestAllocationMatched AllocationMatched AllocationConfirmed FpML 4.3 confirmations

37 π 4 Technologies FpML 4.3 scenario

38 π 4 Technologies CDL generation CDL State machine per service –Send Send.java –Receive Receive.java –SilentAction Activity.java –Predicate Predicate.java –Channel (discovery) Channel.java –Stubs Preserve behavior of the distributed system described Make calls to the context to retrieve, manipulate and store state. State is stored in a context per participant service and passed to the stubs –Context Hashmap (name, object) Name is the name of the variable in the CDL description setVariable(….) getVariable(….)

39 π 4 Technologies CDL generation

40 π 4 Technologies CDL generation

41 π 4 Technologies CDL generation

42 π 4 Technologies CDL generation

43 π 4 Technologies CDL generation

44 π 4 Technologies CDL generation Receive public class PublishMessageExReceive extends DefaultActivityExtension implements ReceiveActivityExtension { ……. public void processMessage(ExtensionContext context, Message message) throws ServiceException { }

45 π 4 Technologies CDL generation Send public class InvalidCounterpartyExSend extends DefaultActivityExtension implements SendActivityExtension { ……. public java.io.Serializable getMessageContent( ExtensionContext context) throws UnresolvedConstraintException, ServiceException { java.io.Serializable ret=null; ……. return(ret); }

46 π 4 Technologies CDL generation Activity public class PrepareCounterPartyExceptionActivity extends DefaultActivityExtension implements SilentActivityExtension { ……. public void process(ExtensionContext context) throws ServiceException { …… }

47 π 4 Technologies CDL generation Predicate public class SuccessfulLookupPredicate extends DefaultActivityExtension implements PredicateExtension { ……. public boolean isSatisfied(ExtensionContext context) throws UnresolvedConstraintException, ServiceException { boolean ret=false; ……. return(ret); }

48 π 4 Technologies CDL generation Channel public class ConfirmationAlledgerChannel extends DefaultActivityExtension implements ChannelCreationExtension { { ……. public EndpointReference discover( ExtensionContext context, String serviceType, String endpointReferenceType,ServiceRegistry registry, SemanticAnnotations semantics) throws DeferProcessingException, ServiceException { EndpointReference ret=null; ret = registry.discover(serviceType, endpointReferenceType); return(ret); }

49 π 4 Technologies CDL generation Context: Is a hash map. Object val = context.getVariable(“businessEvent”); context.setVariable("businessEvent",val); Contexts are local to the participant service StubClass { stubToFillIin(Context c) { v1 = c.getVariable(“varName”); …… c.setVariable(“varName”,v1); }

50 π 4 Technologies Demo CDL editor – FpML model – End point projections – Generation to HTML and BPMN – Generation to Java Confirmations – Inject some messages – See what happens at the Acceptor and the Alledger – Monitor the participants against the choreography description Uses – generic CDL aware gateways and a monitor from Hat Trick Software, – Any JMS messaging, including QPid, – J2EE container

51 π 4 Technologies Demo Accepter Alledger

52 π 4 Technologies Demo

53 π 4 Technologies Demo

54 π 4 Technologies Demo Message contents: Could introduce an xslt style sheet to pretty print. Logical communication channels between participants: NullChannel is for out of sequence messages. What actually happened: Externally observable message exchanges.

55 π 4 Technologies Demo Message Sequence Number for the monitor Business identifier for the transaction Sending Participant (Service) Receiving Participant (Service) Logical operation name Status (Initiated means sender sent, Completed means receiver received)

56 π 4 Technologies Questions


Download ppt "Π 4 Technologies Building distributed systems using WS-CDL and FpML 16th May 2007 Steve Ross-Talbot CTO Hattrick Software Chair W3C Web Services Choreography."

Similar presentations


Ads by Google