Elements of Web Service Choreography


Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Elements of Web Service Choreography

  1. 1. Elements of Web Services Choreography Jean-Jacques Dubray WS-CHOR f2f 3/13/03 Redwood Shores, CA
  2. 2. Bio <ul><li>Got interested by B2B, BPM and XML in 1998 at NEC System Laboratories </li></ul><ul><li>1999 - eXcelon to develop a B2B Integration Server based on a Business Process Engine </li></ul><ul><li>2001 - Eigner (PLM vendor) to design next generation architecture </li></ul><ul><li>Contributor to OAG (IF), ebXML (BPSS), and BPML (ebXML binding) </li></ul><ul><li>Represent no particular interest, just want to learn, share ideas and experiences </li></ul>
  3. 3. Outline <ul><li>Introduction </li></ul><ul><li>Paradigm Shifts </li></ul><ul><li>WS-Choreography and SOA </li></ul><ul><li>Collaboration, Choreography and Orchestration </li></ul><ul><li>Elements of WS-Choreography </li></ul><ul><ul><li>Message Exchange Patterns </li></ul></ul><ul><ul><li>Choreography protocol </li></ul></ul><ul><ul><li>Transactional behavior </li></ul></ul><ul><ul><li>Message content </li></ul></ul><ul><ul><li>Control flow </li></ul></ul><ul><ul><li>Technical Binding </li></ul></ul><ul><li>Conclusions </li></ul>
  4. 4. Introduction <ul><li>XML, Web Service and BPM will revolutionize the way we built applications </li></ul><ul><li>Applications as we know it will disappear </li></ul><ul><ul><li>1990-1999 looking for a better way to build applications (CORBA/DCOM, J2EE, but also EDOC, BOCA, …) </li></ul></ul><ul><ul><li>2000-2010 found the better way </li></ul></ul><ul><li>Towards a new “component model”: SOA </li></ul>
  5. 5. Paradigm Shifts <ul><li>Can the web do for applications what it had done for humans? </li></ul><ul><ul><li>From a given application access any service (data, transaction, computation) regardless of its location </li></ul></ul><ul><li>Can the web give us hints on a better application model? </li></ul><ul><ul><li>Loosely coupled, plug & play, Message based </li></ul></ul><ul><ul><li>REST? </li></ul></ul><ul><li>Meta, Meta, Meta </li></ul><ul><ul><li>Current programming languages show lots of limitations when developing business applications (e.g Java/J2EE, C#/.NET) </li></ul></ul>
  6. 6. WS-Choreography is at the convergence of <ul><li>B2B </li></ul><ul><li>EAI </li></ul><ul><li>Distributed computing model </li></ul><ul><li>Applications models (s.a. J2ee and .NET) </li></ul>
  7. 7. WS-Choreography and SOA Request Web Services Provider Response Internet Web Services Provider J2EE™ AppServer .NET SOAP Messages This is the WRONG Picture for SOA
  8. 8. What is a Service? OAGIS 8.0 Scenario 41 This is A Service
  9. 9. SOA’s Foundation is “Peer-to-Peer” OAGIS 8.x Scenario 50 No Application Or Corporation Boundaries
  10. 10. Intra / Inter Company Message Exchange <ul><li>Message exchange between corporation boundaries is sufficiently different to justify special treatments: </li></ul><ul><ul><li>State alignment (no shared “memory”) </li></ul></ul><ul><ul><li>Legal aspects (non-repudiation) </li></ul></ul>
  11. 11. SOA as an Application Model (MVC Revisited) ERP Model PLM1 Model PLM2 Model Process Engine Task Engine Thin Fat Other Firewall Process & Data Federation
  12. 12. Key Takeaway <ul><li>Ws-chor is a major enabler of SOA </li></ul><ul><li>Ws-chor foundation is peer-to-peer </li></ul>
  13. 13. Collaboration, Executable Business Processes and Services ROLE Executable Business Process Message Exchange B2B Collaboration
  14. 14. Collaboration And Executable Business Process <ul><li>Both are state machine </li></ul><ul><li>A collaboration has no engine associated with it (nothing is in the middle) </li></ul><ul><ul><li>It is merely the execution of activities of the executable business processes in each party that advances the state of the collaboration </li></ul></ul>
  15. 15. Collaboration And Executable Business Processes <ul><li>The Process Engine is responsible for: </li></ul><ul><ul><li>Mapping (many-to-one-one-to-many) </li></ul></ul><ul><ul><li>Decoupling services via message routing </li></ul></ul><ul><ul><ul><li>sequence, flow, switch, while </li></ul></ul></ul><ul><ul><li>Monitoring (coupled) interaction between services to advance the state of the process instance </li></ul></ul><ul><li>A Collaboration “service” is responsible for ensuring that an incoming/outgoing message is expected at this point in time </li></ul><ul><ul><li>No mapping, no routing, no “advancement” </li></ul></ul>
  16. 16. (Business) Components a.k.a. Services Process PO Review PO Task Process Sales Order Map Route Orchestration
  17. 17. Choreography and Orchestration <ul><li>Business component can exhibit a long running behavior and looking from the perspective of such component, the flow of messages between itself and other components can also be expressed using a meta language. </li></ul><ul><ul><li>This is orchestration </li></ul></ul><ul><li>The confusion is that Components are typically very coarse and can directly be exposed to partners. The long-running behavior might also be complete. </li></ul>
  18. 18. Choreography and Orchestration Success Failure
  19. 19. Key Takeaway <ul><li>ws-chor applies to Collaboration and executable business processes </li></ul><ul><li>Orchestration might be different </li></ul>
  20. 20. Elements of WS-Choreography <ul><li>What do we choreograph, how? </li></ul><ul><li>What is a message content? </li></ul><ul><li>Choreography between who/what? </li></ul><ul><li>Choreography technical binding </li></ul>
  21. 21. Choreograph Messages or Message Exchange Patterns? One way Notification Request Response Solicit Response
  22. 22. Message Exchange Pattern Choreography Buyer Seller PO AckPO Invoice Payment This is far easier than trying to choreograph Notifications and One ways Change PO AckPO Change PO AckPO
  23. 23. Choreography Protocol <ul><li>There is a need, specially in B2B scenario to exchange signals in addition to messages </li></ul><ul><li>Signals feature typically a fixed format and carry special meaning </li></ul><ul><ul><li>Message structure and content is valid </li></ul></ul><ul><ul><li>Message was successfully processed by the receiving application </li></ul></ul><ul><li>Signals are typically part of the Message Exchange Pattern </li></ul><ul><li>Exception associated to signal content: business, technical exception </li></ul>
  24. 24. Choreograph Exceptions Buyer Supplier (Self) Order Entry PO BTA1 OpA1 OpA2 BTA2 PO Invoice Invoice Billing Success Failure [Success] [TechnicalFailure] [BusinessFailure] [AnyFailure] [AnyFailure]
  25. 25. Transactional Behavior <ul><li>WSCI, BPEL4WS features transaction specifications as part of the choreography </li></ul><ul><ul><li>BPEL4WS scopes </li></ul></ul><ul><li>BPSS doesn’t, all compensating transactions must be explicit </li></ul><ul><li>Transactional behavior sounds reasonable to be within the scope of WS-Chor </li></ul><ul><li>First step is expressing meaningful exceptions: timeout, technical, business,… </li></ul>
  26. 26. Message Content <ul><li>Any number of XML or Binary documents </li></ul><ul><li>XML document type or content might be used to specify condition expressions in the control flow </li></ul>
  27. 27. Control Flow Specification <ul><li>Prof. van der Aalst patterns </li></ul><ul><li>BPEL4WS </li></ul><ul><li>WSCI </li></ul><ul><li>BPSS </li></ul><ul><li>Receive / Reply issue </li></ul><ul><ul><li>BPML spawns a new sub process altogether </li></ul></ul><ul><ul><li>BPSS has an onInitiation condition </li></ul></ul><ul><ul><li>BPEL correlates a reply with a receive. The reply can be located anywhere in the choreography </li></ul></ul><ul><li>Should consolidate to one control flow, no need for half-baked overlapping specification there. </li></ul>
  28. 28. Control Flow Specification Collaboration Control Flow Semantics are different from the semantics of an executable business process
  29. 29. Technical Binding <ul><li>Two approaches </li></ul><ul><ul><li>Start with WSDL specification and express a choreography of these services </li></ul></ul><ul><ul><li>I suggest an alternative approach which I think will work better </li></ul></ul><ul><ul><ul><li>Specify the choreography in terms of roles and usage of message exchange pattern types </li></ul></ul></ul><ul><ul><ul><li>Then generate the corresponding WSDL automatically </li></ul></ul></ul>
  30. 30. Beyond Choreography <ul><li>UMM </li></ul><ul><li>Business Collaboration Patterns & Monitored Commitments, e.g. from COOL: </li></ul><ul><ul><li>Negotiation: Offer and Counter-offer </li></ul></ul><ul><ul><li>Offer and Acceptance </li></ul></ul><ul><ul><li>Commitment and Fulfillment </li></ul></ul><ul><ul><li>Deliver the goods and Pay for them </li></ul></ul><ul><li>REA </li></ul><ul><ul><li>http://homepage.interaccess.com/~linkage/REA4SCM.htm </li></ul></ul><ul><li>Business Entities </li></ul><ul><ul><li>http://www.collaborativedomain.com/standards/ </li></ul></ul>
  31. 31. Conclusion <ul><li>SOA appears as a valid application model moving forward </li></ul><ul><ul><li>No more application or corporation boundary </li></ul></ul><ul><ul><li>Process and Data federation </li></ul></ul><ul><ul><li>Decoupled services? </li></ul></ul><ul><li>SOA is at the convergence of traditional application models, EAI and B2B </li></ul><ul><li>Service Choreography is essential to SOA </li></ul>
  32. 32. Conclusion <ul><li>Service Choreography MUST be peer-to-peer </li></ul><ul><li>Scope is everything that is pure message exchange: Collaboration and EBP </li></ul><ul><li>Message Exchange Patterns are the units of what is being choreographed </li></ul><ul><li>B2B is different than EAI / Business Process Execution </li></ul><ul><li>More metadata is good by beware of metadata hell and poorly articulated layers </li></ul>