Long-running transactions (also known as the saga interaction pattern) are computer
database transaction
A database transaction symbolizes a unit of work, performed within a database management system (or similar system) against a database, that is treated in a coherent and reliable way independent of other transactions. A transaction generally rep ...
s that avoid
locks on non-local resources, use compensation to handle failures, potentially aggregate smaller
ACID
An acid is a molecule or ion capable of either donating a proton (i.e. Hydron, hydrogen cation, H+), known as a Brønsted–Lowry acid–base theory, Brønsted–Lowry acid, or forming a covalent bond with an electron pair, known as a Lewis ...
transactions (also referred to as
atomic transaction
In database systems, atomicity (; from ) is one of the ACID (''Atomicity, Consistency, Isolation, Durability'') transaction properties. An atomic transaction is an ''indivisible'' and '' irreducible'' series of database operations such that eithe ...
s), and typically use a coordinator to complete or abort the transaction. In contrast to
rollback
In political science, rollback is the strategy of forcing a change in the major policies of a state, usually by replacing its ruling regime. It contrasts with containment, which means preventing the expansion of that state; and with détente, ...
in ACID transactions, compensation restores the original state, or an equivalent, and is business-specific. For example, the compensating action for making a hotel reservation is canceling that reservation.
A number of protocols have been specified for long-running transactions using Web services within business processes. OASIS Business Transaction Processing and WS-CAF
are examples. These protocols use a coordinator to mediate the successful completion or use of compensation in a long-running transaction.
See also
*
Optimistic concurrency control
Optimistic concurrency control (OCC), also known as optimistic locking, is a non-locking concurrency control method applied to transactional systems such as relational database management systems and software transactional memory. OCC assumes that ...
*
Long-lived transaction
A long-lived transaction is a transaction that spans multiple database transactions. The transaction is considered "long-lived" because its boundaries must, by necessity of business logic, extend past a single database transaction. A long-lived t ...
References
{{Reflist
Data management
Transaction processing