MiniS3: An Object Store in Nine Chapters¶
This book develops MiniS3 from one direct API call into a compact study of
object-storage semantics and local durability. Read the chapters in order:
each chapter assumes the vocabulary and mechanisms established by the previous
one, and every mechanism claim points back to a concrete function under
src/minis3/.
MiniS3 is a teaching kernel, not an Amazon S3 replacement. Keep the mapping matrix and the explicit differences beside the book: they separate equivalent observable invariants from intentional simplifications and unimplemented production concerns.
How to use the book¶
- Run commands from the repository root with
uv run. - Read the named source function after the mechanism explanation, not before the chapter gives it a role.
- Compare measured output with the output block in the experiment.
- Attempt the exercises before opening the folded reference answers.
- Keep exercise changes outside
src/unless the exercise asks for a proposed diff; the tutorial itself never modifies the implementation.
Chapters¶
- Meet MiniS3 — Set up the environment, create a bucket and object, learn the direct API boundary, and map the rest of the book.
- Objects, Flat Keys, and ETags — Separate opaque keys, immutable values, public version IDs, internal storage IDs, and single-PUT MD5 ETags.
- Versioning, Delete Markers, and the Null Slot — Follow the irreversible versioning state machine, recover hidden history, and distinguish ordinary from version-addressed deletion.
- Listing and the Directory Illusion — Derive contents and common prefixes from flat strings, paginate the projection, and define the strong-consistency boundary.
- Crash Atomicity and Manifest Publication — Trace immutable artifacts, file and directory fsync, atomic manifest replacement, crash injection, and startup cleanup.
- Multipart Upload — Stage private parts, validate the completion manifest, publish atomically, and derive the multipart ETag.
- Conditional Requests and CAS — Turn
If-Match/If-None-Matchinto cache validation and serialized compare-and-swap behavior. - Lifecycle Expiration — Evaluate pure current and noncurrent expiration rules using an injected clock and explicit tick.
- Methodology and Boundaries — Connect the experiments to the System-in-Miniature method and identify the distributed, security, and operational mechanisms beyond this repository.
Reference shelf¶
Use the quick start for the shortest runnable path, the mechanism mapping for equivalence classifications, the labs guide for experiment-oriented navigation, and Differences from Amazon S3 whenever a production comparison matters.