Copy-on-write
Copy-on-write is a technique that shares data until modification requires creating an independent copy, preserving the original for existing users.
Grokking Simplicity
A data-management technique that creates a copy before modifying data so the original remains unchanged.
- How it is used
- Applies immutability to writes in JavaScript, including array, object, and nested-data updates.
- How deep it goes
- Explains three procedural steps, read-write separation, shallow copies, nested updates, and reusable callback wrappers.
- Examples
- Uses shopping carts, mailing lists, array methods, object updates, nested prices, and callback-based array utilities.
- What you can do after
- Build it from scratch by converting mutating JavaScript operations into immutable functions that return updated values.
Architecting an Apache Iceberg Lakehouse
Copy-on-write is a data-modification pattern that rewrites affected base files immediately to materialize updates or deletions.
- How it is used
- Applies row-level updates and deletes while favoring fast reads and simpler file-retention management.
- How deep it goes
- Explains write-time rewriting, snapshots, manifests, file retention, and read-write tradeoffs, but stops short of implementation commands.
- Examples
- Demonstrates deleting rows by rewriting data files, publishing replacement manifests, preserving older snapshots, and later cleaning up unreferenced files.
- What you can do after
- Evaluate COW against merge-on-read by balancing read speed, write amplification, update latency, and cleanup complexity.
Read how Architecting an Apache Iceberg Lakehouse explains copy-on-write →
Learn Docker in a Month of Lunches, Second Edition
Copy-on-write is a storage technique that copies shared data into a writable location only when a modification is made.
- How it is used
- Explains how Docker containers modify image files while preserving shared read-only image layers.
- How deep it goes
- Works through the writable-layer mechanism and a file-edit exercise, but stops short of storage-driver internals.
- Examples
- Uses Docker commands to replace /input.txt, rerun a file-display container, and compare original and changed contents.
- What you can do after
- Apply it via Docker commands to edit container files and distinguish writable-layer changes from image contents.
Read how Learn Docker in a Month of Lunches, Second Edition explains copy-on-write →
Kubernetes in Action, Second Edition
A copy-on-write mechanism preserves shared data until a modification causes a private copy to be created.
- How it is used
- Explains how Docker containers isolate file changes while sharing image layers.
- How deep it goes
- Explains layered reads, whole-file copying, deletion markers, and storage consequences without detailing filesystem-driver internals.
- Examples
- Uses three containers sharing layers, file modification, file deletion, and permission changes as concrete cases.
- What you can do after
- Evaluate how container file operations affect isolation and writable-layer storage.
Read how Kubernetes in Action, Second Edition explains copy-on-write →
The Joy of JavaScript
A mutation strategy in which changes are made by creating modified copies rather than altering an existing value in place.
- How it is used
- Supports pure manipulation of custom data objects and composable functional code.
- How deep it goes
- Defines return-new-object behavior and connects it to frozen value objects and lenses, without detailing lens implementation.
- Examples
- Uses Money arithmetic, frozen and sealed objects, and lenses for targeted immutable property updates.
- What you can do after
- Apply it via value objects or lenses to update data without mutating existing values.
Related concepts
- shallow copyuses · A shallow copy duplicates a data structure’s outer container while retaining references to its nested values rather than copying them recursively.
- immutable collectionimplements · An immutable collection is a collection whose membership and contents cannot be changed after creation.
- Cowimplemented by · Cow is Rust’s standard-library clone-on-write type, representing either borrowed or owned data and creating owned data when necessary.
- writable layeruses · A writable layer is a mutable, container-specific filesystem layer that records changes made above read-only image layers.
- snapshotused by · A snapshot is a fixed representation or copy of data or system state as it existed at a particular point in time.
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.




