...

/

Introduction to Distributed Transactions

Introduction to Distributed Transactions

Get an introduction to distributed transactions.

One of the most common problems faced when moving from a centralized to a distributed system is performing operations across multiple nodes in an atomic way. We call this a distributed transaction.

In the next three chapters, we explore all the complexities involved in performing a distributed transaction, and examine several available solutions for each one as well as their pitfalls.

Before diving into the available solutions, let’s first learn about transactions and their properties, and what distinguishes distributed transactions from them.

Transaction

A transaction is a unit of work performed in a database system that represents a change potentially composed of multiple operations.

Database transactions are an abstraction invented to simplify engineers’ work and relieve them of dealing with all the possible failures that the inherent unreliability of hardware introduces.

Guarantees provided by database transactions

As we have learned, the acronym ACID sums up the major guarantees that database transactions provide. As a reminder, ACID stands for the following:

  • Atomicity
  • Consistency
  • Isolation
  • Durability

Each transaction TX comprises multiple operations (op1, op2, op3, …), and multiple transactions (TX1, TX2, etc.,) are executed simultaneously in a database.

Atomicity

Atomicity is the property that guarantees that either all of the ...