160 likes | 353 Views
4.3 Transaction Communication. Yichuan Wang ywang38@student.gsu.edu. What is transaction. Network Business[2006, Chun-I Fan etc.] Database Communication Web Service. Let’s jog memory. The first presentation by Yang Wang The Goal: Concurrency Transparency What is it again?
E N D
4.3 Transaction Communication Yichuan Wang ywang38@student.gsu.edu
What is transaction • Network • Business[2006, Chun-I Fan etc.] • Database • Communication • Web Service
Let’s jog memory • The first presentation by Yang Wang • The Goal: Concurrency Transparency • What is it again? • Service Oriented Request/Reply • Multicast
Transaction • Come from the transaction concept in the Database Management System • A sequence of synchronous request/reply that satisfy ACID • In distributed communication • Use asynchronous request/reply and multicast that satisfy ACID[1997, Randy Chow etc.]?
ACID • Atomicity • Consistency • Isolation • Durability
Atomicity • All (success) or none (fail) • Why?
Concurrency? • Or serializebility • Interleaved transactions is equivalent to a serial execution
Isolation • Partial result not visible until commit
Durability • After commitment, result is permanent even if system failed
Transaction Model • Coordinator • Participants • Commit or abort, based on whether conform to ACID • How?
Two-phase commit Protocol • 2PC[wikipedia] • Like a vote
2PC • Coordinator • Participants • Basic Idea • Logging, Shadow Caching • Time line
2PC recovery on error cases • Log: old, new and vote. • Redo Only[2000, Mohammad Alrifai etc.] • Undo Only • Hybrid • Cascade rollback[wikipedia]
Problem with 2PC • Uncertain time: lock • Non-Blocking: Asynchronous: not possible unless… • 3PC[2004,Wenbing Zhao etc.]
Transaction in web service • from different trusted domain and use heterogeneous application logics, flows, and platforms. • the sub-transaction of each participant may execute for various periods of time. • we can’t just undo or roll back the whole transaction.
Reference • [1]Randy Chow etc.; Distributed Operating System & Algorithm; 1997 • [2]Wenbing Zhao etc., A Reservation-Based Extended Transaction Protocol,2004 • [3] Mohammad Alrifai etc., Transactions Concurrency Control in Web Service Environment,2000 • [4]http://en.wikipedia.org/wiki/Two-phase_commit_protocol • [5] Chun-I Fan etc., Fair Transaction Protocols Based on Electronic Cash, 2006 • [6] http://en.wikipedia.org/wiki/Cascading_rollback