Distributed Transactions


Distributed Transactions

A transaction is always part of an application. When a user types an application code, user requests the execution of an application, which does not have the properties of atomicity, durability, serializability and isolation.

At some time after its invocation by the user, the application issues a begin transaction primitive from this moment, all actions which are performed by the application, until a commit or an abort primitive is issued.

In order to perform function at different sites, a distributed application has to execute several processes at these sites. These processes are called the agents of the application. An agent is therefore a local process, which Performs some actions on behalf of an application.

Architectural Aspects of Distributed Transaction

1) Processes and Server

2) Session and Datagram

3) Computational Structure of Distributed Transaction

4) Communication Structure for Commit Protocols

Processes and Server

In organization there is a strong correspondence between the entities of the transaction manager and the entities of the operating system.

So that it is relatively easy to take advantage of the feature of the op system. We call this organization the process model. Server model is independent from transaction.

Session and Datagram

The communication between processes or server can be perform through sessions and datagram. Datagram and session can be used with all the approaches. With a process approach, session seem more convenient if one process per site is retained instead of creating a new process for each request.

The reason for this fact is that sessions have a basic advantage the' authentication and identification function need to be and then message can be exchanged without repeating these operations.

Computational Structure of Distributed 'transaction

The computational structure of distributed database transaction is organized in two basic ways:

centralised structure: In the centralised structure one agent activates and controls all other agents. In a strictly the other agent, agents should not communicate between themselves.

Hierarchical Structure: With a hierarchical structure each agent can active other agents, thus creating a tree of agent having the root agent as root. This method is move general and can represent the special case.

Commit Protocols

In a local database system, for committing a transaction, the transaction manager has to only convey the decision to commit to the recovery manager. However, in a distributed system, the transaction manager should convey the decision to commit to all the servers in the various sites where the transaction is being executed and uniformly enforce the decision.