liveBook · Manning

Nondistributed transaction

As explained in Microservices Patterns, Second Edition

A local transaction is a transaction whose scope is restricted to the data and resources managed by one service.

A local transaction is an ACID transaction confined to the data and resources managed by one service. It provides a transactional boundary for service-local operations. section 9.4

When an operation spans services, each service commits its own local transaction rather than sharing one distributed ACID transaction. A saga coordinates these transactions; because commits may need to be undone, steps can use compensating transactions. section 9.2 section 9.4

Figure 9.2 A saga replaces what would other be a distributed ACID transaction with a sequence of local ACID transactions in each of the participating services.
saga overview

Shows a saga replacing a distributed ACID transaction with a sequence of local ACID transactions across participating services. section 9.2

A saga does not inherit ACID isolation: concurrent execution can create data anomalies, so consistency requires application-level design. Distributed queries likewise use independent transactions in each participating service. section 9.4 section 12.1.5

How Microservices Patterns, Second Edition covers it

How deep it goes
Defines service-local ACID transactions and explains their role in sagas and distributed queries, without detailing database internals.
Examples
Uses a saga sequence across participating services and the findOrder query distributed across services.
What you can do after
Apply local ACID transactions within services and coordinate cross-service operations with sagas or independent query transactions.
How it connects
Connects local transactions to ACID transactions, sagas, compensating transactions, and distributed queries.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Microservices Patterns, Second Edition. The section links point to the parts of the book it draws on.