Real-world Considerations and Uses of Web Service ...

507 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
507
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
16
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Original contributors: IBM, MS, Hitachi, IONA, BEA and Arjuna (now Redhat)
  • Four standard fields: Activity identifier Activity expiration (optional) Coordination type EPR of coordinator’s Registration service + Open content
  • Each server creates EPRs for the protocol endpoints it hosts. The wsa:address in those EPRs needs to contain an address by which the proxy is known on the network. The (reverse) proxy is then configured to route the request onto the target endpoint server.
  • Order Fulfillment Process. WAS 6.1 on AIX on 5 boxes. Failover within each administrative cell. Shared filesystem within each administrative cell for TX logs. WLM directs TX-affinity for app messages and HA failover for protocol messages. HA file server is an active/active pair of AIX NFSv4 servers managed by HACMP. Throughput requirements are modest (<100 tps).
  • Real-world Considerations and Uses of Web Service ...

    1. 1. Real-world Considerations and Uses of Web Service Transactions in SOA Ian Robinson Chair OASIS WS-TX Technical Committee IBM Distinguished Engineer
    2. 2. Web services composeable architecture Management & Composition Transports Messaging Description Quality of Service HTTP/HTTPS SMTP RMI / IIOP XSD WSDL SOAP XML WS-Addressing WS-Policy WSDM JMS Security WS-ReliableMessaging WS-Transaction WS-BPEL WS-AtomicTransaction WS-BusinessActivity WS-Coordination
    3. 3. Brief history of WS-Tx standard <ul><li>WS-Tx = WS-Coordination +… </li></ul><ul><ul><li>WS-AtomicTransaction </li></ul></ul><ul><ul><ul><li>Atomic commit or rollback; 2PC </li></ul></ul></ul><ul><ul><li>WS-BusinessActivity </li></ul></ul><ul><ul><ul><li>Overall outcome atomic; business compensation </li></ul></ul></ul><ul><li>Version 1.0 specs published Aug 2005 </li></ul><ul><ul><li>Input for OASIS WS-Tx Technical Committee </li></ul></ul><ul><li>OASIS WS-Tx TC V1.1 standard published April 2007 </li></ul>
    4. 4. WS-Transaction: federating transactions across disparate systems <ul><li>WS-Tx defines the following concepts: </li></ul><ul><ul><li>An XML CoordinationContext that identifies a transaction and which is passed implicitly in Web service messages without this context having to be declared as an explicit message parameter. </li></ul></ul><ul><ul><ul><li>in the SOAP header for a SOAP binding </li></ul></ul></ul><ul><ul><li>A generic Coordination message set </li></ul></ul><ul><ul><li>Protocol-specific messages sets that define the AT and BA protocols </li></ul></ul><ul><li>This XML context and XML messages are designed for simple transformation within different runtimes to map down to underlying transaction processing technologies. </li></ul><ul><ul><li>For example, the J2EE WebSphere platform transforms WS-AT  (JTA-based impl)  XA </li></ul></ul>
    5. 5. Coordination Context (I) <wscoor:CoordinationContext> <wscoor:Identifier> uuid:33ca57d4-eaab-4939-8177-77351e6e63c7 </wscoor:Identifier> <wscoor:Expires>60000</wscoor:Expires>   <wscoor:CoordinationType> http://schemas.xmlsoap.org/ws/2004/10/wsat </wscoor:CoordinationType> <wscoor:RegistrationService>   <wsa:Address> http://wsatserver/wscoor/Registration </wsa:Address> <wsa:ReferenceParameters> <tm:txId>246</tm:txId>   </wsa:ReferenceParameters>   </wscoor:RegistrationService> … </wscoor:CoordinationContext> Note: Applications don’t see or care about this
    6. 6. Coordination Context (II) <ul><li>Flows as a SOAP header on application requests </li></ul><s:Envelope> <s:Header> <wsa:Action>http://tempuri.org/application/action</wsa:Action> <wsa:To>http://server/service/</wsa:To> <wscoor:CoordinationContext s:mustUnderstand=“true”> … </wscoor:CoordinationContext> </s:Header> <s:Body> <!-- Application body content --> </s:Body> </s:Envelope> Note: Applications don’t see or care about this
    7. 7. WS-Transaction architecture Requester runtime Requester application WS-Coordination & (WS-AT, WS-BA) Provider runtime Target Web Service Runtime env e.g. J2EE server begin TX Create CoordinationContext Web service request wscoor:Register WS-Coordination & (WS-AT, WS-BA) commit/close Runtime env e.g. .NET server Add context Extract context
    8. 8. When is WS-AT useful? <ul><li>WS-AT enables the scope of ACID behaviour to be distributed between Web service components. </li></ul><ul><li>BUT… </li></ul><ul><ul><li>Resource locks are held throughout the transaction </li></ul></ul><ul><ul><li>Services that share an ACID transaction are not loosely coupled </li></ul></ul><ul><li>Primary uses: </li></ul><ul><ul><li>transactions between services within a single organization domain </li></ul></ul><ul><ul><li>sometimes the only way to distribute an ACID transaction across different software stacks. </li></ul></ul>
    9. 9. When is WS-AT useful? Atomic transaction RDBMS RDBMS Web service WSa Web service WSb App Server 1 App Server 2 Transaction Manager Transaction Manager 2PC 2PC 2PC
    10. 10. Engaging transactions
    11. 11. When is WS-BA useful? <ul><li>WS-BA provides a different form of atomicity from WS-AT. Participant are still brought to an atomic outcome but: </li></ul><ul><ul><li>there is no isolation of resources </li></ul></ul><ul><ul><li>application-level compensation is required instead of resource manager rollback </li></ul></ul><ul><li>Also appropriate for longer-running and more loosely-coupled interactions. </li></ul><ul><ul><li>but don’t equate compensation with “looser coupling”. </li></ul></ul><ul><li>A non-process-oriented approach c.f. WS-BPEL </li></ul><ul><li>Primary uses: </li></ul><ul><ul><li>business transactions that span organizational boundaries </li></ul></ul><ul><ul><li>distributed processes that use non-transactional resources </li></ul></ul>
    12. 12. When is WS-BA useful? <ul><li>Business Tasks execute within the scope of a Business Activity </li></ul><ul><li>Updates are exposed before Business Activity completes </li></ul><ul><li>Completed participants receive common outcome </li></ul>Web service WSa Web service WSb Business Activity Runtime 1 Runtime 2 Business Task Business Task Compensate Compensate BA participant BA participant
    13. 13. What about the “NFRs”? <ul><li>The TX specs define interoperable Web service transaction protocols. They don’t define “non-functional requirements” such as: </li></ul><ul><li>Proxies and firewalls </li></ul><ul><li>High availability and failover of TX endpoints </li></ul><ul><li>Transaction-based workload management affinity </li></ul><ul><li>These are outside the scope of the specification. But any enterprise-level SOA runtime needs to accommodate these. </li></ul><ul><li>Where are these considerations factored and do they affect interoperability? </li></ul>
    14. 14. WS-Addressing EndpointReferences <ul><li>The TX endpoints exchanged are WS-Addressing EndpointReferences: </li></ul><ul><ul><li>A “++” XML pointer. </li></ul></ul><ul><ul><li>Contains an address URI for the endpoint service </li></ul></ul><ul><ul><li>Contains a set of opaque “ReferenceParameter” tokens that augment the address with anything required by the target service or its runtime environment. </li></ul></ul><wsa:EndpointReference> <wsa:Address> http://wsgw.fabrikam.com/_IBMSYSAPP/wsat/services/Participant </wsa:Address> <wsa:ReferenceParameters> <someNS:txID>111-222-333</someNS:txID> <was:HAclusterId>475639400084265978327593</was:HAclusterId> </wsa:ReferenceParameters> </wsa:EndpointReference>
    15. 15. WS-TX and intermediary nodes Server A Server B Intermediary node for server B Application Requests WS-TX Protocol Requests DMZ in firewall for Server B Intermediary node for server A HTTP reverse proxy for server A sA.myserv.com sB.yourserv.com gw.myserv.com gw.yourserv.com <wsa:To> <wsa:Address> http://gw.yourserv.com/_IBMSYSAPP/wsat/services/Participant </wsa:Address> </wsa:To> <someNS:txID wsa:IsReferenceParameter='true' >111-222-333</someNS:txID> <was:HAclusterId wsa:IsReferenceParameter='true' >475639400084265978327593</was:HAclusterId> <wsa:From> <wsa:Address> http://gw.myserv.com/_IBMSYSAPP/wsat/services/Coordinator </wsa:Address> … </wsa:From> Participant service Coordinator service
    16. 16. High availability failover of protocol endpoints Edge of network HTTP Proxy AppServer Node AppServer Node EPRs from each server contain a virtual host address mapped by the proxy. RefParams in the EPR are used by WLM plug-in to “follow” HA failover. WebService Environment WS-Tx Coordinator WLM WS-Tx plugin Server Cluster HA failover of EPR based on RefParams wsat:Commit WS-Tx Participant service WS-Tx Participant service EPR’ wsat:Commit wsat:Commit wsba:Close wsba:Close wsba:Close s1.fabrikam.com s2.fabrikam.com wsgw.fabrikam.com
    17. 17. High availability failover of protocol endpoints Edge of network HTTP Proxy AppServer Node AppServer Node WebService Environment WS-Tx Coordinator Server Cluster HA failover of EPR based on RefParams wsat:Commit WS-Tx Participant service WS-Tx Participant service wsat:Commit wsat:Commit wsba:Close wsba:Close wsba:Close <wsa:EndpointReference> <wsa:Address> http://wsgw.fabrikam.com /_IBMSYSAPP/wsat/services/Participant</wsa:Address> <wsa:ReferenceParameters> <someNS:txID>111-222-333</someNS:txID> <was:HAclusterId>475639400084265978327593</was:HAclusterId> </wsa:ReferenceParameters> </wsa:EndpointReference> EPR’ WLM WS-Tx plugin wsgw.fabrikam.com
    18. 18. Transaction-based affinity routing Edge of network HTTP Proxy AppServer Node Web service provider AppServer Node Web service provider WLM transaction affinity constraints. All requests to WLM-able EPRs within the same WS-Tx context targeted to the same server. WebService Environment Global Tran WLM WS-Tx plugin Server Cluster Affinity based on CoordinationContext App msgs App msgs WS-Tx Coordinator begin Requester commit
    19. 19. Transaction-based affinity routing Edge of network HTTP Proxy AppServer Node Web service provider AppServer Node Web service provider WebService Environment Global Tran Server Cluster Affinity based on CoordinationContext App msgs App msgs WS-Tx Coordinator begin Requester commit <soap:Header> <wscoor:CoordinationContext> <wscoor:Identifier> uuid:33ca57d4-eaab-4939-8177-77351e6e63c7 </wscoor:Identifier>   <wscoor:CoordinationType> http://docs.oasis-open.org/ws-tx/wsat/2006/06 </wscoor:CoordinationType> … </wscoor:CoordinationContext> … </soap:Header> WLM WS-Tx plugin
    20. 20. Order Management Application: HA WS-AT deployment DB2 Database WAS Node A WAS Node B Shared File System Order Service TM (WS-AT) XA JDBC Order Service TM (WS-AT) XA JDBC DB2 Database WAS Node X WAS Node Y Shared File System Inventory Service TM (WS-AT) XA JDBC Inventory Service TM (WS-AT) XA JDBC Cell 1, Cluster 1 Cell 2, Cluster 2 WLM WLM WLM WLM WS-AT protocol messages App Messages App Messages HA Failover WS-AT protocol messages HA Failover Distributed transaction WAS v6.1 on AIX
    21. 21. Online Banking: Proxied/WLM’d WS-BA deployment WAS v6.1 on zOS Payment Service Sysplex Credit Adapter Deposit Adapter HTTP Proxy WLM Sysplex Distributor CICS Transaction Gateway Payment Service Credit Adapter Deposit Adapter HTTP Proxy CRED CICS DPST TM (WS-BA) Online Banking WAS (AIX/Linux/Win ) TM (WS-BA) TM (WS-BA) App WS-BA WS-BA WS-BA App App App WS-BA WLM App WS-BA App Messages App Messages Distributed transaction WAS v6.1 on zOS
    22. 22. Summary <ul><li>WS-Transaction defines a generic framework for Web service coordination protocols, as well as two concrete protocols for atomic and compensating transactions. </li></ul><ul><li>Usage of transactions needs to be considered carefully. But using them is very simple. </li></ul><ul><li>The “non-functional requirements” that are typically necessary for enterprise deployments can be provided in a transparent and interoperable fashion. </li></ul><ul><li>Applications that use WS-AT and WS-BA and exploit these enterprise qualities of service have been successfully deployed and demonstrate the viability of these advanced technologies in the real world. </li></ul>

    ×