Course contents
On this page
Lesson plan 44: RocksDB and Cassandra
Separate the responsibilities of an embedded RocksDB engine and a Cassandra deployment.
Placement: Part 8: Architectural case studies and synthesis.
Prerequisites: Lesson 43: SQLite and PostgreSQL, plus the earlier dependency chain.
Learning outcomes
- Separate the responsibilities of an embedded RocksDB engine and a Cassandra deployment.
- Explain LSM amplification, compaction, partition-key modeling, replication, and repair.
- Compare durability and convergence contracts before interpreting throughput claims.
- Separate a general mechanism, a documented implementation choice, and an illustrative numerical assumption.
Teaching sequence
- Establish the motivating situation: An engineer mistakes an embedded durable key-value library for a replicated database service.
- Introduce the vocabulary and the correctness obligation before an optimization. Define storage engine, distributed database, LSM economics.
- Develop the mechanism: Assign responsibilities to the storage library and the distributed coordinator, routing, and repair layers.
- Follow the complete worked example: Three replicas and write amplification 8 turn 10 MB/s logical input into roughly 240 MB/s aggregate device writes. Explain the assumptions, intermediate units, and limiting interpretation.
- Extend the scenario to changed load, skew, or failure, explaining partitioning, repair.
- Connect the mechanism to a documented implementation and an alternative with a different workload fit. Close by stating the remaining cost and the next lesson dependency.
Required chapter material
Use a complete execution trace or worked calculation, supported by an annotated static diagram or table. Include language-neutral pseudocode or labeled SQL when it clarifies the mechanism. State preconditions, ownership, visibility, and failure boundaries for algorithms. Describe operational costs as well as the normal path. All questions raised in the narrative must be resolved in the text.
Visual explanation
A layered responsibility diagram places RocksDB within an owning application and Cassandra across routing, replication, storage, and repair roles. The accompanying prose explains the arrows, state changes, or table entries so the lesson remains understandable in a plain Markdown reader.
Editorial checks
Confirm that the numerical example agrees with its units and assumptions. Check that a faster path preserves the stated contract, or explicitly identify the changed guarantee. Keep hypothetical figures separate from product measurements. Explain both an appropriate use and a limitation of the case design. Check terminology against the glossary and links against the course index.