liveBook · Manning

Saga

A saga is a distributed transaction pattern that coordinates a sequence of local transactions and uses compensating actions to address failures.

How 3 Manning books explain it

Microservices Patterns, Second Edition

A distributed transaction pattern that coordinates a sequence of local transactions and, when necessary, compensating actions across services.

How it is used
Implements system commands that update data across service transaction boundaries.
How deep it goes
Explains compensation, pivot-based step structure, coordination choices, isolation countermeasures, and response trade-offs.
Examples
Uses an order-creation flow with credit reservation, rejection, approval, and a semantic lock.
What you can do after
Evaluate and design distributed command flows using compensation, coordination choices, and isolation countermeasures.

Read how Microservices Patterns, Second Edition explains saga →

Grokking Software Architecture

A pattern that coordinates a distributed business transaction as a sequence of local transactions with compensating actions for failures.

How it is used
Maintains data consistency across independent service databases during long-running business processes.
How deep it goes
Defines local transactions and compensation, walks through a failure, and contrasts coordination styles without providing an implementation.
Examples
Uses an inventory deduction and failed credit-card charge to illustrate restoring a laptop through compensation.
What you can do after
Evaluate and understand how a saga handles a failed distributed business transaction and why reliable event publication matters.

Read how Grokking Software Architecture explains saga →

gRPC Microservices in Go

A saga is a distributed transaction pattern that coordinates a sequence of local transactions and uses compensating transactions when a step fails.

How it is used
Coordinates local transactions to maintain consistency across service-owned data stores during order creation.
How deep it goes
Explains choreography, orchestration, client completion options, and reverse compensation through workflows rather than implementation code.
Examples
Traces an order through payment and shipping, including failure status changes, refunds, and cancellation.
What you can do after
Apply it via event channels or an orchestrator to coordinate order, payment, and shipping steps and compensate after failure.

Read how gRPC Microservices in Go explains saga →

Also covered in

What to know first

Related concepts

Questions about saga

What is saga?

A saga is a distributed transaction pattern that coordinates a sequence of local transactions and uses compensating actions to address failures.

Which Manning books explain saga?

Microservices Patterns, Second Edition, Grokking Software Architecture and gRPC Microservices in Go.

What should I know before learning saga?

Manning books that teach saga usually introduce ACID, consistency, distributed transaction and availability first.

What kinds of saga are there?

Kinds of saga include choreography-based saga.

What are the parts of saga?

Saga includes pivot transaction and retriable transaction.

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.