Distributed transaction
A distributed transaction is a unit of work whose operations span multiple resources or systems and whose outcome is coordinated across them.
Kafka for Architects
A distributed transaction is a transaction whose operations span multiple independent systems or databases and must satisfy a coordinated all-or-nothing outcome.
- How it is used
- Frames database-and-Kafka workflows where coordinated all-or-nothing outcomes are required.
- How deep it goes
- Defines distributed transactions, explains 2PC phases and failure modes, and points to the transactional outbox without detailing its full implementation.
- Examples
- Uses profile updates, Kafka notifications, database writes, offset commits, and a transactional-outbox publishing process.
- What you can do after
- Apply the transactional outbox pattern to address database-and-Kafka dual writes when 2PC is unavailable.
Read how Kafka for Architects explains distributed transaction →
Think Distributed Systems
A distributed transaction is a transaction whose participants are located across multiple components or stores and must reach a coordinated commit-or-abort outcome.
- How it is used
- Coordinates changes across multiple resource managers so they reach a unanimous commit-or-abort decision.
- How deep it goes
- Explains local and global states, safety, liveness, and atomic commit protocols, while focusing on atomicity rather than other ACID guarantees.
- Examples
- Uses a two-store money transfer, two key-value-store participants, transaction states, and a two-phase commit sequence.
- What you can do after
- Evaluate distributed transaction correctness by checking unanimous decisions for safety and eventual decisions for liveness.
Read how Think Distributed Systems explains distributed transaction →
MongoDB 8.0 in Action, Third Edition
A distributed transaction is a transaction whose operations involve multiple database resources or partitions and require coordinated commit or rollback.
- How it is used
- Coordinates atomic updates across documents, collections, databases, or shards when single-document modeling is insufficient.
- How deep it goes
- Explains Callback API execution, retries, deployment limits, forbidden operations, and cross-shard overhead without detailing transaction internals.
- Examples
- Demonstrates account, customer, and transaction updates through Node.js, with parallel implementations for PyMongo and Ruby.
- What you can do after
- Apply it via MongoDB driver Callback APIs with coordinated commit, rollback, and transient-error retry handling.
Read how MongoDB 8.0 in Action, Third Edition explains distributed transaction →
PostgreSQL Mistakes and How to Avoid Them
A distributed transaction is an atomic unit of work whose operations execute across multiple database nodes.
- How it is used
- Explains how applications preserve atomicity when one business operation reads or writes across database nodes.
- How deep it goes
- Defines the failure, demonstrates stale replica behavior, and introduces 2PC while deferring implementation detail.
- Examples
- Uses alpha and beta account reads, balance updates, and a stale standby to demonstrate an inconsistent cross-node operation.
- What you can do after
- Diagnose/debug with it by recognizing stale-replica decisions and evaluating whether 2PC costs are acceptable.
Read how PostgreSQL Mistakes and How to Avoid Them explains distributed transaction →
Related concepts
- Apache Kafkacontrasts with · Apache Kafka is a distributed event-streaming platform for publishing, storing, processing, and consuming streams of records.
- dataset splituses · A dataset split is the division of a dataset into distinct subsets assigned different purposes, such as training, validation, or testing.
- two-phase commitused by · Two-phase commit is a distributed transaction protocol that prepares participating systems and then coordinates their collective commitment or abortion.
- database transactionkind of · A database transaction is a logical unit of database operations whose changes are committed together or rolled back as a whole.
- key-value storeuses · A key-value store is a data-storage system that associates keys with values and supports storing, retrieving, or updating values by key.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.



