Compensating transaction

Compensating transaction

The execution of a business process consists of one or more transactions. Each transaction may consist of several individual operations yet, as a whole, it moves the system between consistent states.

There are two groups of systems where compensating transaction may be applied:

1. In the context of a database this is often easily achieved using transactions and the commit/rollback mechanism[1] . Compensating transaction logic could be implemented as additional on top of database supporting commit/rollback. In that case we can decrease business transaction granularity.

2. For systems without a commit/rollback mechanism available, one can undo a failed transaction with a compensating transaction, which will bring the system back to its initial state. Typically, this is only a workaround which has to be implemented manually and cannot guarantee that the system always ends in a consistent state. The system designer may need to consider what happens if the compensating transaction also fails.

Compensating transactions are also used in case where a transaction is long lived (commonly called Saga Transactions), for instance in a business process requiring user input. In such cases data will be committed to permanent storage, but may subsequently need to be rolled back, perhaps due to the user opting to cancel the operation. Unlike conventional rollbacks, specific business logic will typically be required to rollback a long lived transaction and restore the system to its original state. This type of transaction differs from distributed transactions (often implemented using the two-phase-commit protocol), because although both types of transactions can result in multiple data stores being updated, compensating transactions allows for the updates to span a long period of time.

Compensating transactions are often designed into Web services that participate in the execution of business processes that are part of a service-oriented architecture solution.

  1. ^ Gray, Jim (June 1981). "The transaction concept: Virtues and limitations". Proceedings of the Very Large Database Conference. 

See also



Wikimedia Foundation. 2010.

Игры ⚽ Нужна курсовая?

Look at other dictionaries:

  • Transaction processing — For other uses, see Transaction (disambiguation). In computer science, transaction processing is information processing that is divided into individual, indivisible operations, called transactions. Each transaction must succeed or fail as a… …   Wikipedia

  • Database transaction — A transaction comprises a unit of work performed within a database management system (or similar system) against a database, and treated in a coherent and reliable way independent of other transactions. Transactions in a database environment have …   Wikipedia

  • Distributed transaction — A distributed transaction is an operations bundle, in which two or more network hosts are involved. Usually, hosts provide transactional resources, while the transaction manager is responsible for creating and managing a global transaction that… …   Wikipedia

  • Microsoft Transaction Server — (MTS) was software that provided services to Component Object Model (COM) software components, to make it easier to create large distributed applications. The major services provided by MTS were automated transaction management, instance… …   Wikipedia

  • Long-running transaction — Long running transactions are computer database transactions that avoid locks on non local resources, use compensation to handle failures, potentially aggregate smaller ACID transactions (also referred to as atomic transactions), and typically… …   Wikipedia

  • Enterprise application integration — (EAI) is defined as the uses of software and computer systems architectural principles to integrate a set of enterprise computer applications.OverviewSupply chain management applications (for managing inventory and shipping), customer… …   Wikipedia

  • Separation of duties — (SoD) is the concept of having more than one person required to complete a task. It is alternatively called segregation of duties or, in the political realm, separation of powers.General descriptionSeparation of duties is one of the key concepts… …   Wikipedia

  • SMS banking — is a technology enabled service offering from banks to its customers, permitting them to operate selected banking services over their mobile phones using SMS messaging.Push and pull messagesSMS banking services are operated using both push and… …   Wikipedia

  • Dodd–Frank Wall Street Reform and Consumer Protection Act — Full title An Act to promote the financial stability of the United States by improving accountability and transparency in the financial system, to end too big to fail , to protect the American taxpayer by ending bailouts, to protect consumers… …   Wikipedia

  • Credit derivative — In finance, a credit derivative is a securitized derivative whose value is derived from the credit risk on an underlying bond, loan or any other financial asset. In this way, the credit risk is on an entity other than the counterparties to the… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”