





























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!






























docsity.com
docsity.com
Start Dequeue(Req, Q1) process request Req Enqueue(Reply, Q2) Commit
Client
Server’s request queue
Client’s reply queue
Q1 Server Program
docsity.com
Txn1 : Start get input construct request Enqueue(Request, Q1) Commit Txn3 : Start Dequeue(Reply, Q2) decode reply process output Commit
Txn2 : Start Dequeue(Req, Q1) process request Req Enqueue(Reply, Q2) Commit
docsity.com
docsity.com
docsity.com
Txn1 : Start R = LastRequest Enqueue(Request Q, R) LastEnqueuedID=R.ID Commit
Txn3 : Start R = Dequeue(Reply Q) decode reply & process output LastDequeuedID=R.ID Commit
Txn2 : Start Req=Dequeue(RequestQ) process request Req Enqueue(ReplyQ, reply) Commit
Txn0 : Start get input & construct request R LastRequest = R Commit
docsity.com
docsity.com
Client Recovery with Persistent Sessions
// Let R be id of client’s last request // Assume client ran Txn0 for R before Txn Client connects to request and reply queues; If (id of last request enqueued R) { resubmit request } elseif (id of last reply message dequeued R) { dequeue (and wait for) reply with id R } else // R was fully processed, nothing to recover
docsity.com
docsity.com
To process a reply
Log
docsity.com
docsity.com
docsity.com