Complete or cancel the transaction



next up previous
Next: CCR - The Up: CCR: The Service Previous: Response to a

Complete or cancel the transaction

C-COMMIT and C-ROLLBACK are confirmed services that provide the client CCR user the capability to lock into completing a transaction or to cancel and return to the state that preceded the use of C-BEGIN. The CCR service user decides whether to cancel or to go ahead with a transaction after hearing from all the servers expected to participate.

C-RESTART provides facility to deal with several types of failure. It can be used by a server at any time before it uses C-READY to notify the client that it must return data involved in the transaction to a prior state. C-RESTART can be used by a client when a failure in the communication system or at the server leaves the client unsure about the state of the server. Using the parameter of C-RESTART, the client may request the server return to the beginning of the atomic action, or return to the latest commit or rollback point.

In the funds transfer example, participation by both servers is required. If either refuses, the transaction is cancelled. In another case, refusal from one server may lead the client to enlist the participation of an alternate server. To continue with the bank example, suppose Bank C has received a check on a customer account in Bank A and the account does not have sufficient funds. Assuming that prior authorization has been made, Bank C initiates the fund transfer from another account of that customer, which is in Bank B. If Bank B is not able to transfer the funds, but another account is known, the refusal from Bank B will cause Bank C to send a transaction request to Bank D. Bank A continues to wait for the instruction to commit or to rollback. If Bank D sends C-READY, Bank C sends C-COMMIT to both and the transaction completes.

In another case, receiving C-READY from a subset of the servers might be sufficient to have the client issue C-COMMIT. The servers that refused were not needed for valid completion of the transaction. For example, a client seeking to arrange a meeting sends a query to an electronic calendar for each committee member to set a time. If some responses are refusals to schedule the meeting at the suggested time, but a quorum accepts the time, the client may proceed to schedule the meeting.

Note that procedures for correct implementation of distributed applications with respect to these complications remains the responsibility of the application process or a specific application protocol; CCR provides the necessary tools.


next up previous
Next: CCR - The Up: CCR: The Service Previous: Response to a



boots cassel
Wed Feb 7 10:22:57 EST 1996