liveBook · Manning

Statefulness

Statefulness is the property of a system or operation whose behavior or results depend on information retained or changed across interactions or executions.

How 14 Manning books explain it

Kafka for Architects

A stateful system is a system whose behavior or operation depends on data maintained across requests or processing intervals.

How it is used
Frames real-time aggregations and joins as operations that retain context across events.
How deep it goes
Explains keyed counters, local stores, changelog recovery, and restoration bottlenecks without walking through an implementation.
Examples
Uses orders counted by region, hourly order counts, and a customer view joining transactions with profiles.
What you can do after
Apply it via Kafka Streams to design keyed, fault-tolerant aggregations and plan for state restoration.

Read how Kafka for Architects explains statefulness →

Kafka Streams in Action, Second Edition

A stateful application is a program that retains processing state across multiple input events.

How it is used
Uses retained event history to support Kafka Streams reductions, aggregations, joins, and more complex streaming decisions.
How deep it goes
Explains keyed state updates through reduce, automatic stores, naming effects, and TopologyTestDriver inspection without detailing store internals.
Examples
Demonstrates widget counting, per-player poker-score reduction, topology naming after a filter, and state-store assertions in tests.
What you can do after
Build stateful Kafka Streams topologies with keyed operations, stable store names, and tests that inspect outputs and stored results.

Read how Kafka Streams in Action, Second Edition explains statefulness →

React Quickly, Second Edition

A stateful application is an application whose behavior or user-interface output depends on data that can change over time.

How it is used
Makes React interfaces respond to clicks, form input, login, and other changes over time.
How deep it goes
Explains stateful versus stateless components, functional state setup and updates, shared state scope, and class-based differences without full class examples.
Examples
Uses a login form, clocks, counters, and a multicomponent to-do application with filter buttons and tasks.
What you can do after
Build it from scratch with `useState` and properties to make components interactive and share changing values.

Read how React Quickly, Second Edition explains statefulness →

Kubernetes for Developers

A stateful application depends on persistent or retained state across requests, executions, or instance replacements.

How it is used
Motivates storage-backed deployment when an application must keep data alongside workloads such as stateless frontends.
How deep it goes
Explains single-replica storage attachment and disk-retention consequences, then points to StatefulSet for multi-replica workloads.
Examples
Uses a single-Pod MariaDB deployment and a Redis recovery exercise that checks stored values after workload recreation.
What you can do after
Operate/configure it by attaching a storage claim and choosing a reclaim policy that preserves needed disk data.

Read how Kubernetes for Developers explains statefulness →

Kubernetes in Action, Second Edition

A stateful backend is a backend application component whose operation depends on retained application or client state.

How it is used
Frames storage, identity, and lifecycle decisions for backend workloads whose operation depends on retained state.
How deep it goes
Explains storage conflicts, replica identity, lifecycle behavior, and Kubernetes automation without detailing application-specific state management.
Examples
Uses the Quiz service, MongoDB volume locking, ordinal pods, per-replica claims, and the pets-versus-cattle analogy.
What you can do after
Operate/configure stateful workloads with StatefulSets, per-replica storage, stable identities, and lifecycle policies.

Read how Kubernetes in Action, Second Edition explains statefulness →

Google Anthos in Action

A stateful application retains client-session or other operational state that can affect subsequent requests.

How it is used
Guides migration deployment choices by distinguishing applications whose requests depend on retained client-session data.
How deep it goes
Defines statefulness through session retention and prior transactions, then stops short of detailing stateful deployment YAML.
Examples
Uses a migrated VM and generated deployment_spec.yaml to contrast stateful behavior with a stateless Kubernetes deployment.
What you can do after
Evaluate whether requests from a user must reach the same server during migration and deployment.

Read how Google Anthos in Action explains statefulness →

Functional Design and Architecture: Examples in Haskell

A stateful application is an application whose behavior depends on information retained across operations or interactions.

How it is used
Organizes retained information and side effects in functional applications without allowing mutable state to spread through business logic.
How deep it goes
Explains immutable state, state monads, mutable mechanisms, architectural boundaries, and concurrent granularity, but defers broader persistence details.
Examples
Uses a sandwich interpreter, ingredient inventory, IORef, key-value simulation, nested MVars, and coarse- versus fine-grained maps.
What you can do after
Build stateful functional applications by separating pure logic from interpreters and controlling mutable state at explicit architectural boundaries.

Read how Functional Design and Architecture: Examples in Haskell explains statefulness →

Real-World Cryptography

A stateful signature scheme requires persistent state, such as a counter, to prevent reuse of one-time signing material.

How it is used
Warns that XMSS and XMSSMT require persistent signing state to avoid reusing one-time keys.
How deep it goes
Explains counters, Merkle-tree paths, regeneration, and operational reuse failures without detailing storage implementation.
Examples
Uses filesystem rollback and shared signing keys across servers to illustrate one-time-key reuse.
What you can do after
Diagnose/debug state-reuse hazards when deploying stateful hash-based signatures.

Read how Real-World Cryptography explains statefulness →

Data-Oriented Programming: Reduce software complexity

Stateful code is code whose behavior or effects involve persistent state beyond the values passed directly to a computation.

How it is used
Tests mutations whose effects appear in persistent system state rather than direct return values.
How deep it goes
Explains state retrieval, mutation, commit, and comparison, while stopping short of deeper state-management internals.
Examples
Uses member addition, existing-member rejection, library state, system state, and expected-state comparisons.
What you can do after
Diagnose/debug with it by asserting the state produced by a mutation and checking expected exceptions.

Read how Data-Oriented Programming: Reduce software complexity explains statefulness →

Learn Docker in a Month of Lunches, Second Edition

A stateful application is an application whose behavior or future results depend on data retained from prior interactions or executions.

How it is used
Uses statefulness to explain why containerized applications need persistent storage and how Docker volumes provide it.
How deep it goes
Explains retained data through Docker volumes, mounts, directories, and container replacement, without detailing application storage internals.
Examples
Demonstrates a containerized to-do list that stores items in /data and retains them across application container updates.
What you can do after
Apply it via Docker volumes to preserve application data while replacing or updating containers.

Read how Learn Docker in a Month of Lunches, Second Edition explains statefulness →

AI for Everyday IT

Statefulness is the ability of a system to remember previous interactions or states and use that information in subsequent interactions.

How it is used
Supports coherent, ongoing AI conversations by carrying earlier exchanges into follow-up prompts.
How deep it goes
Defines remembered state and contrasts it with stateless requests, while deferring implementation details beyond basic API behavior.
Examples
Uses follow-up questions, API calls, separate chat sessions, and an overloaded two-month ChatGPT conversation.
What you can do after
Operate/configure conversations by using follow-ups, supplying missing context, and summarizing discussions when coherence declines.

Read how AI for Everyday IT explains statefulness →

Functional Programming in Scala, Second Edition

A stateful API is a program interface whose behavior or results depend on state maintained across interactions.

How it is used
Uses random number generation to establish a general pattern for converting stateful APIs into pure functional APIs.
How deep it goes
Explains explicit state transitions, manual threading, and State abstractions, while deferring broader effects to later treatment.
Examples
Demonstrates RNG transitions through randomPair, nonNegativeInt, numeric combinations, and lists of generated integers.
What you can do after
Build it from scratch by translating mutable APIs into explicit state transitions and composing them with State operations.

Read how Functional Programming in Scala, Second Edition explains statefulness →

Road to Kubernetes

A stateful containerized application is a containerized application whose behavior or data depends on persistent state across operations or restarts.

How it is used
Frames persistent data as a deployment challenge when moving databases and other stateful systems into containers or clusters.
How deep it goes
Defines statefulness, contrasts it with stateless containers, and demonstrates temporary changes without detailing persistent-storage implementation.
Examples
Uses databases, Python and Node.js applications, and an Ubuntu container with an installed NGINX server.
What you can do after
Evaluate/understand why databases need persistence and why container images should replace ad hoc changes inside running containers.

Read how Road to Kubernetes explains statefulness →

React in Depth

A stateful component is a React component that maintains state and can trigger updates when that state changes.

How it is used
Uses statefulness as a target for inspecting, manipulating, and diagnosing React component behavior.
How deep it goes
Explains state inspection and re-render effects, while stopping short of state-management architecture or hook internals.
Examples
Demonstrates state inspection with a dark-mode application, useState, useReducer, and context provider values.
What you can do after
Diagnose state behavior by inspecting and temporarily changing component or provider values in React Developer Tools.

Read how React in Depth explains statefulness →

Related concepts

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.