State persistence
State persistence is the retention of data or application state beyond the operation, session, or process in which it was created, so it remains available for later use.
MongoDB 8.0 in Action, Third Edition
Persistence is the durable storage of program state so that it survives beyond a single program execution.
- How it is used
- Keeps application objects available across program runs and stores processed streaming results in an Atlas collection.
- How deep it goes
- Defines persistence, illustrates document storage, and walks through a streaming write pipeline; does not establish processor-state recovery behavior.
- Examples
- Uses a nested book document, find and update commands, and solar-device aggregates written with `$merge`.
- What you can do after
- Apply it via MongoDB queries to retain and retrieve documents, or via Atlas Stream Processing to store aggregated results.
Read how MongoDB 8.0 in Action, Third Edition explains state persistence →
Elixir in Action, Third Edition
Data persistence is the retention of data beyond the lifetime of the computation that created or processed it.
- How it is used
- Supports recovery and availability in concurrent systems by retaining state across process lifetimes.
- How deep it goes
- Explains disk and ETS implementations, write timing, restart behavior, and performance boundaries without detailing storage internals.
- Examples
- Uses a persistent to-do cache, Erlang external term encoding, post-update storage, and ETS table operations.
- What you can do after
- Build it from scratch with disk storage or ETS, then evaluate consistency, restart safety, latency, and distribution trade-offs.
Read how Elixir in Action, Third Edition explains state persistence →
Designing Deep Learning Systems: A guide for software engineers
The retention of data across process executions and system interactions so that it remains available for later retrieval.
- How it is used
- Supports reproducible dataset delivery from data collection through model training.
- How deep it goes
- Defines layered storage, immutable commits, versioned snapshots, hashes, and deletion policy, while deferring full management implementation.
- Examples
- Uses immutable dataset commits, versioned training snapshots, version hashes, cloud object storage, Delta Lake, Petastorm, and Pachyderm.
- What you can do after
- Operate a dataset workflow that retrieves reproducible training inputs and preserves update history for troubleshooting.
Kubernetes in Action, Second Edition
Data persistence is the preservation of data so that it remains available across process or container termination and recreation.
- How it is used
- Supports application deployment when stored data must outlive the pods using it.
- How deep it goes
- Explains the motivation and Kubernetes storage model, then surveys provisioning, snapshots, cloning, restoration, and lifecycle variants.
- Examples
- Uses a Quiz API, MongoDB, a pod manifest, curl requests, mongosh commands, and a shutdown test showing data loss.
- What you can do after
- Evaluate why a database loses data without persistent storage and how Kubernetes abstracts storage requirements.
Read how Kubernetes in Action, Second Edition explains state persistence →
Kafka for Architects
Message persistence is the durable storage of messages beyond the lifetime of the process that produced or consumed them.
- How it is used
- Preserves Kafka messages across broker failures or consumer disconnections and enables later delivery or replay.
- How deep it goes
- Defines broker storage, replication, retention, and consumer recovery, without detailing storage internals.
- Examples
- Uses broker failure and disconnected consumers to illustrate recovery, and contrasts retention expiry with acknowledgment-based deletion.
- What you can do after
- Operate/configure retention to match application needs, monitor disk use, and account for expiry regardless of processing.
AI Agents in Action, Second Edition
Persistence is the continuation of a system's goal-directed operation across multiple steps or interactions.
- How it is used
- Extends agent operation from reactive responses to coordinated work across multiple steps and long-horizon goals.
- How deep it goes
- Explains external plans and state, deterministic loop mechanisms, and production concerns, but stops short of a complete persistence implementation.
- Examples
- Uses revised travel itineraries, hybrid semantic-and-graph memory, process memory, local stores, and databases as concrete illustrations.
- What you can do after
- Apply via an external task loop that stores plans and state for continued execution across short-horizon steps.
Read how AI Agents in Action, Second Edition explains state persistence →
Introduction to Generative AI, Second Edition
Persistent state is information about an application or agent that remains available across operations or interactions.
- How it is used
- Supports continuity, long-term planning, and coordination in autonomous agents operating across sessions.
- How deep it goes
- Explains the mechanism and major risks, then names safeguards without detailing their implementation.
- Examples
- Uses poisoned Discord inputs, fraudulent transfers, hidden document instructions, and zero-click image or file exploits as examples.
- What you can do after
- Evaluate how retained state improves continuity while increasing exposure to manipulation, privacy failures, and difficult-to-contain actions.
Read how Introduction to Generative AI, Second Edition explains state persistence →
Related concepts
- state managementused by · State management is the practice of organizing, maintaining, and updating information that represents a system’s or process’s condition over time.
- databasealternative to · A database is an organized collection of persistent data managed by software for storage, retrieval, querying, and modification.
- Apache Kafkaused by · Apache Kafka is a distributed event-streaming platform for publishing, storing, processing, and consuming streams of records.
- streamingused by · Streaming is the incremental handling of a sequence of data items, including their processing, transfer, or consumption as they become available.
- E2Bused by · E2B is a cloud platform that provides isolated sandbox environments for executing code.
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.






