lect-12 - Computer Science 425 Distributed Systems Lecture...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
2006, 2007, M. T. Harandi Lecture 12-1 Computer Science 425 Distributed Systems Lecture 12 Distributed Transactions
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2006, 2007, M. T. Harandi Lecture 12-2 Distributed Transactions A transaction (flat or nested) that invokes operations in several servers. T A Y Z B C D T T1 T2 T11 T12 T21 T22 A B C D F H K Flat Distributed Transaction Nested Distributed Transaction
Background image of page 2
2006, 2007, M. T. Harandi Lecture 12-3 Coordination in Distributed Transactions Coordinator resides in 0ne of the servers T A Y Z B C D X join join join Coordinator Participant Participant Participant T Coordinator Open Transacton TID Close Transacton Abort Transacton Participant A a.method (TID, ) 1 2 Join (TID, ref) 3 The Coordination Process
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2006, 2007, M. T. Harandi Lecture 12-4 Atomicity principle requires that either all the distributed operations of a transaction complete or all abort. In a one-phase commit protocol, the coordinator communicates commit or abort to all participants until all acknowledge. When a client/coordinator requests a commit, it does not allow a server to make a unilateral decision to abort a transaction. A server may have to abort the transaction, for example, in the case of deadlock. In a two-phase protocol, any participant can abort its part of the transaction. Transaction is committed by consensus. When the client asks the coordinator to commit the transaction, the two-phase commit protocol is executed . There is also a 3-Phase protocol, more flexible, but also more complex and costly. Atomic Commit Protocols
Background image of page 4
2006, 2007, M. T. Harandi Lecture 12-5 Operations for Two-Phase Commit Protocol canCommit?(trans)-> Yes / No Call from coordinator to participant to ask whether it can commit a transaction. Participant replies with its vote. doCommit(trans) Call from coordinator to participant to tell participant to commit its part of a transaction. doAbort(trans) Call from coordinator to participant to tell participant to abort its part of a transaction. haveCommitted(trans, participant)
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 16

lect-12 - Computer Science 425 Distributed Systems Lecture...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online