





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






When an Application in a transaction T first calls an RM, theRM must tell the TM it is part of T.
-^
Called enlisting or joining the transaction
Transaction Manager
Resource Manager
Application
When an application A in a transaction T first calls anapplication B at another node, B must tell its local TM thatthe transaction has arrived. Transaction
Manager Communications
Manager
Application A
Transaction
Manager
Communications
Application BManager
Node M
Node N
Communication managers solve the problem of handlingmultiple 2PC protocols by providing^ –
a model for communication between address spaces
a wire protocol for two-phase commit
-^
But, expect restrictions on multi-protocol interoperation
The RM only talks to the TM-RM interface. The multi-protocol problem is solved by the TM vendor.
Transaction Manager
Resource ManagerResource ManagerResource Manager
Application
RM ops Enlist and 2PC ops
TX XA
2PC ops
OtherTMs
Communication
Manager
Send/receive msg XA+
Docsity.com
Application:
Start-transCall DBMSCall remote appCommit
Application
Comm Mgr
DatabaseSystem
Txn Manager
Transaction
Manager CommManager
DBMS
3PC prevents blocking in the absence of communicationsfailures (unrealistic, but …). It can be made resilient tocommunications failures, but then it may block
-^
3PC is much more complex than 2PC, but only marginally improves reliability — prevents some blocking situations.
-^
3PC therefore is not used much in practice
-^
Main idea: becoming certain and deciding to commit areseparate steps.
-^
3PC ensures that if any operational process is uncertain,then no (failed or operational) process has committed.
-^
So, in the termination protocol, if the operational processesare all uncertain, they can decide to abort (avoids blocking).
to all participants
phase 2) it sends Pre-Commit to all participants.
Participant acknowledges Pre-commit.
some of them, it (begin third phase) sends Commit to allparticipants (that are up)