liveBook · Manning

Chapter 11: Durable executions

What you will learn in chapter 11 of Think Distributed Systems

The introduction previews the chapter’s path from process duration and failure-tolerant execution to sagas and durable executions, presenting durable execution as an abstraction that conceals failure.

After this chapter you will be able to

What it builds on

Section by section

Introduction

The introduction previews the chapter’s path from process duration and failure-tolerant execution to sagas and durable executions, presenting durable execution as an abstraction that conceals failure.

Key terms: durable executions, transactions, abstraction, short-running, long-running, failure-free definitions, failure-tolerant executions, sagas

11.1 The pitfalls of partial executions

The section uses a signup failure to show why sequential atomic actions can leave a process partially executed, then introduces failure-transparent recovery and two meanings of atomicity.

Key terms: partial execution, sequential composition, atomic actions, crash failure, failure-transparent, prefix, recovered execution, concurrency atomicity, failure atomicity, isolation

11.2 System model

This section separates code definitions from running executions so failure-related terms can be applied precisely.

Key terms: definition, execution, failure-aware, failure-agnostic, failure-free, failure-tolerant

11.2.1 Process definition

Defines a process as a sequence of failure-atomic actions ending in successful termination.

Key terms: process definition, failure-atomic action, successor process, ε

11.2.2 Process execution

This section models a process execution as a trace of observable steps and shows why failure atomicity does not carry over from individual steps to a multistep process.

Key terms: process definition, process execution, trace, observable event, Crash-Stop, ✓, failure atomicity, single step, multiple steps, failure atomicity does not compose

11.3 The concept of failure-transparent recovery

Defines failure-transparent recovery through application-specific equivalence between failure-free and recovered executions, then illustrates how much replay that equivalence may allow.

Key terms: failure-transparent recovery, failure-free execution, forward recovery, equivalence function, sequence of events, identity function, exactly-once processing, valid to duplicate last event equivalence function, valid to duplicate last n events equivalence function, restart equivalence function

11.4 Strategies of failure-transparent recovery

The section introduces idempotence as a safeguard against duplicated actions and names restart and resume as two patterns for continuing an interrupted process.

Key terms: idempotence, event duplication, process execution, restart, resume

11.4.1 Restart

Restarting a failed process execution is simple when its steps are idempotent, but restarting from the beginning can change intended timing or nondeterministic outcomes.

Key terms: restart, process execution, idempotent, user signup, create the account, one-week delay, collecting payment, nondeterministic actions, current time, random number

11.4.2 Resume

The section explains how a process execution can recover from failure by resuming from its most recent save point.

Key terms: process execution, save point, resume

11.5 Implementation of failure-transparent recovery

This section introduces application-level and platform-level ways to implement failure-transparent recovery, distinguished by where failure handling lives.

Key terms: application-level recovery, platform-level recovery, failure-aware, failure-agnostic, process definitions

11.5.1 Application-level implementation: Sagas

This section explains how sagas provide failure-transparent executions through application-level failure handling, and why that approach can obscure business logic.

Key terms: sagas, failure-aware process definitions, failure-transparent process executions, failure detection, failure mitigation, state-machine-based implementations, state of the saga, trigger for the next step, persisted, eventual execution

11.5.2 Platform-level implementation: Durable execution

The section explains how platform-level durable execution hides failure handling from process code and compares log-based replay with state-based resumption.

Key terms: failure-agnostic, failure-oblivious, failure-transparent, durable executions, log-based implementation, durable log, replay, deduplicates, deterministic execution, state-based implementation

11.6 Summary

The section recaps failure transparency, the application- and platform-level ways to achieve it, and two durable-execution strategies.

Concepts explained in this chapter

← Chapter 10: Distributed consensus Chapter 12: Cloud and services →

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.