Transactions

We have seen that concurrent access to a shared object by separate clients can lead to consistency problems. The mechanism that is employed to avoid these problems is <#614#> atomic<#614#> transactions. With knowledge that the service is shared, the client program may be written, specifying that some sequence of operations on the shared object are not to be interleaved with operations by other clients. Essentially, a group of operations are structured into a single <#615#> atomic<#615#> operation which is called a transaction. The four properties of an Atomic Operation are referred to conventionally the useful acronym ;SPM_quot;ACID;SPM_quot; - Atomicity, Consistency, Independence and Durability. A major consequence of transactions is the requirement for mechanisms for failure recovery. If the client or the server fail <#616#> during<#616#> a transaction, the transaction must appear to have either: This means that the state of the system at each end must be <#619#> recoverable<#619#>. The Transaction is a mechanism that was devised for database systems. Its purpose it to maximize <#620#> consistency<#620#> of stored data. This consistency must be maintained in the face of failures, and without placing unnecessary restrictions on any concurrency between different applications accessing the data. Its properties include: Transaction services are sometimes offered on file systems as well as database systems. In an Open Distributed System, transactions are a way of offering this failure atomicity on any object in the system (ref Persistent Objects). To provide a transaction service, certain functions are required: All of these functions require stable storage (i.e. disk/battery backed RAM etc). Transactions are another tool to make programming distributed applications easier. The Atomicity property means that the programmer does not have to concern himself with consistency. They can group operations in a transaction arbitrarily, without concern for what failures may occur in the client, server or network. They are guaranteed that the stable storage holding the data will either contain successful results, or no change. The serializability of concurrent transactions means that each application programmer is sealed off from others. They need not concern themselves with the ORDER in which operations are invoked in different applications. Applications are shielded from handling errors caused by other applications by the way transactions hide tentative intermediate updates.