






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!







Use the local database to store the state of the request
Txn1: Start
Get Request R from local DBEnqueue(Request R, Q1)State(R) = “Submitted”
Commit
Txn3: Start
Dequeue(Reply for R, Q2)decode reply & process outputState(R) = “Done”
Commit
Txn2: Start
Dequeue(Req, Q1)process request ReqEnqueue(Reply, Q2)
Commit
Txn0: Start
construct request & store it in local DBState(R) = “NotSubmitted”
Commit
Not in the textbook
Client Recovery with Persistent Sessions
// Let R be id of client’s last request// Assume client ran Txn0 for R before Txn1Client connects to request and reply queues;If (id of last request enqueued
R) { resubmit request }
elseif (id of last reply message dequeued
{ dequeue (and wait for) reply with id R }
else // R was fully processed, nothing to recover
After the operation runs, there is a test operation thatthe client can execute to tell whether the operationran
Typically, the non-undoable operation returns adescription of the state of the device (before-state)and then changes the state of the device
the test operation returns a description of the state ofthe device.
E.g., State description can be a uniqueticket/check/form number under the print head
To process a reply1. Start a transaction2. Dequeue the reply3. If there’s an earlier logged device state for this
reply and it differs from the current device state,then ask the operator whether to abort this txn
the reply’s ID. This operation is permanentwhether or not this transaction commits.
Log
create and destroy queue database
create and destroy queue
show and modify queue’s attributes (e.g. security)
open-scan and get-next-element
enqueue and dequeue
next element or element identified by index
inside or outside a transaction
read element