A distributed transaction is a transaction that runs in multiple processes, usually on several machines. Each process works for the transaction. This is shown in Figure 1, where each oval indicates work that is being done on a different machine and each arrow between ovals indicates a remote procedure call (RPC).

Distributed transactions, like local transactions, must observe the ACID properties. However, maintenance of these properties is very complicated for distributed transactions because a failure can occur in any process. If such a failure occurs, each process must undo any work that has already been done on behalf of the transaction.
A distributed transaction processing system maintains the ACID properties in distributed transactions by using two features:
Recoverable processes can store two types of information: transaction state information and descriptions of changes to data. This information allows a process to participate in a two-phase commit and ensures isolation and durability. Transaction state information must be stored by all recoverable processes. However, only processes that manage application data (such as resource managers) must store descriptions of changes to data. Not all processes that are involved in a distributed transaction need to be recoverable. In general, clients are not recoverable because they do not interact directly with a resource manager.
The most common commit protocol is the two-phase commit protocol. In each transaction, one process acts as the coordinator. The coordinator oversees the activities of the other participants in the transaction, to ensure a consistent outcome. The two-phase commit protocol involves two phases: