Presentation is loading. Please wait.

Presentation is loading. Please wait.

WS-AtomicTransaction Mark Little, Chief Architect Arjuna Technologies Ltd.

Similar presentations


Presentation on theme: "WS-AtomicTransaction Mark Little, Chief Architect Arjuna Technologies Ltd."— Presentation transcript:

1 WS-AtomicTransaction Mark Little, Chief Architect Arjuna Technologies Ltd

2 2 Introduction Coordinate agreement with ACID semantics –Atomic, Consistent, Isolated, Durable Tried and trusted model –Simple application model –Synchronized state changes –Correctness in the face of failures –Widespread adoption –Proven protocols

3 3 Model Assumptions Transactions are short lived –Resources isolated (locked) for duration Coordinator availability –Connected and responsive –Timely failure recovery Participants trust that the above are true

4 4 Core Scenarios Some services require ACID properties - Tight coordination of mission critical state Use with service-based resource managers –Example: Queue service Use within datacenter –Controlled environment Use with virtual datacenter –Between close partners –Contractual QOS

5 5 Protocol Defines WS-Coordination Coordination Type –http://schemas.xmlsoap.org/ws/2004/10/wsat Activities are transactions –CreateCoordinationContext Create transaction Join transaction as subordinate –Register Create subordinate enlistment Three coordination protocols –Completion –Durable 2PC –Volatile 2PC Simple message patterns –One-way messages –Correlation using WS-Addressing Full state machines for 2PC

6 6 The Actors Completion Initiator (I) –Signals coordinator to complete a transaction Can request commit or rollback Coordinator (C) –Responsible for coordinating a single outcome –Drives 2PC with participants Phase 1: Ensure all participants are prepared Phase 2: Notify participants of outcome Participants (P) –Can vote to abort –Can vote “prepared to commit” Must honor coordinator’s commit decision

7 7 WS-C and WS-AT

8 8 Completion Protocol C I Commit Rollback Committed Aborted

9 9 2PC Protocol CP Prepared ReadOnly Aborted Committed Replay Prepare Rollback Commit

10 10 Volatile versus Durable 2PC Two variants of 2PC protocol –One for volatile resources (e.g., cache) –One for durable resources (e.g., database) Phase 1 has sub-phases A) Prepare all volatile participants This can cause more durable participant registrations B) Prepare all durable participants

11 11 Prepare message 7f000001:8018:4369ea05:9 7f000001:8018:4369ea05:7 AUID:e0e1c2b07369e621

12 12 Prepared message 7f000001:8018:4369ea05:7 7f000001:8018:4369ea05:9 AUID:e8022a77874bb1c9

13 13 Commit message 7f000001:8018:4369ea05:e 7f000001:8018:4369ea05:c AUID:ef3bda4cf07c9add

14 14 Committed message 7f000001:8018:4369ea05:e AUID:ca2178bb6e56949c

15 15 Policy assertions Transaction flow assertion – –Operation Policy Subject –Used by applications to indicate willingness to accept incoming transactions –Wire format of serialized transaction is header Atomic service assertion – –Operation Policy Subject –Used by applications to indicate that a requester’s message will be processed transactionally

16 16 WS-Addressing Specification uses WS-Addressing –Important for interoperability Different message classifications –Request messages –Reply messages –Notification messages –Fault messages

17 17 But why…? Web services are “for the internet” –B2B communication –Separate trust domains –Why WS-AT? Two reasons –Interoperability Heterogeneous systems –Ubiquity Vision of WS-* scale down

18 18 Resources WS-AtomicTransaction –http://schemas.xmlsoap.org/ws/2004/10/wsat/d efault.htmhttp://schemas.xmlsoap.org/ws/2004/10/wsat/d efault.htm Web services whitepapers, specs, workshops –http://msdn.microsoft.com/webservices/http://msdn.microsoft.com/webservices/

19 19 State tables (I) Atomic Transaction 2PC protocol (Coordinator View) Inbound Events States NoneActivePreparingPreparedPreparedSuccessCommittingAborting Register Invalid State None Send RegisterResponse Active Durable: Invalid State Aborting Volatile: Send Register Response Active N/A Invalid State PreparedSuccess Invalid State Committing Invalid State Aborting Prepared Durable: Send Rollback Volatile: Invalid State None Invalid State Aborting Record Vote Preparing N/A Ignore PreparedSuccess Resend Commit Committing Resend Rollback, and forget Aborting ReadOnly Ignore None Forget Active Forget Preparing N/A Invalid State PreparedSuccess Invalid State Committing Forget Aborting Aborted Ignore None Forget Aborting Forget Aborting N/A Invalid State PreparedSuccess Invalid State Committing Forget Aborting Committed Ignore None Invalid State Aborting Invalid State Aborting N/A Invalid State PreparedSuccess Forget Committing Invalid State Aborting Replay Durable: Send Rollback Volatile: Invalid State None Send Rollback Aborting Send Rollback Aborting N/A Ignore PreparedSuccess Send Commit Committing Send Rollback Aborting

20 20 State tables(II) Atomic Transaction 2PC protocol (Participant View) Inbound Events States NoneActivePreparingPreparedPreparedSuccessCommittingAborting Register Response Register Subordinate Active Invalid State Active Invalid State Aborting Invalid State Prepared Invalid State PreparedSuccess Invalid State Committing Invalid State Aborting Prepare Send Aborted None Gather Vote Decision Preparing Ignore Preparing Ignore Prepared Resend Prepared PreparedSuccess Ignore Committing Resend Aborted, and forget Aborting Commit Send Committed None Invalid State Aborting Invalid State Aborting Invalid State Aborting Initiate commit decision Committing Ignore Committing InconsistentInternalState Aborting Rollback Send Aborted None Initiate Rollback, Send Aborted, and Forget Aborting Initiate Rollback, Send Aborted, and Forget Aborting Initiate Rollback, Send Aborted, and Forget Aborting Initiate Rollback, Send Aborted, and Forget Aborting InconsistentInternalState Committing Send Aborted, and Forget Aborting

21 21 Workshops March 2004 for feedback workshop January 2005 for interoperability workshop –http://msdn.microsoft.com/webservices/community/wo rkshops/transactionsinterop1204.aspxhttp://msdn.microsoft.com/webservices/community/wo rkshops/transactionsinterop1204.aspx Several public endpoints, including … –http://wsi.alphaworks.ibm.com:8080/wstx/services/Int eropServicehttp://wsi.alphaworks.ibm.com:8080/wstx/services/Int eropService –http://mssoapinterop.org/ws/http://mssoapinterop.org/ws/ –http:// :8080/ –http:// :8080/WsTxTester/ep

22 22 Testing scenarios Explicitly tested WS-AT and WS-BA –Implicitly tested WS-C Many different test cases –Both for coordinator and participants –Included failures

23 23 General flow

24 24 Interoperability results


Download ppt "WS-AtomicTransaction Mark Little, Chief Architect Arjuna Technologies Ltd."

Similar presentations


Ads by Google