A high-performance, crash-safe key-value store with append-only log durability, on-disk indexing, log compaction, and thread-safe concurrent access.
Type commands below to interact with the simulated storage engine. Try PUT, GET, DEL, or use the action buttons.
| Key | Value | Offset | Size |
|---|
Measured using Yahoo! Cloud Serving Benchmark workloads with 100K operations each.
Heavy update workload. 50% reads, 50% writes simulating session stores and user profiles.
Read-heavy workload. 95% reads, 5% writes simulating photo tagging and tag exploration.
Read-only workload. 100% reads simulating user profile caches with external write sources.
Read-latest workload. Reads skew towards recently inserted records, like status updates and news feeds.
How the storage engine achieves crash safety, durability, and performance.
All writes are serialized to an append-only file (AOF). Sequential I/O ensures high write throughput.
Each entry stores: [op | key | value | size].
An std::unordered_map maps each key to its byte offset and value size in the log file for O(1) lookups.
Compaction rewrites the log, keeping only the latest value for each key. Reduces disk usage and speeds up recovery.
On startup, the engine replays the append-only log from the beginning, rebuilding the in-memory index to the last consistent state.
Uses std::shared_mutex for reader-writer locking. Multiple concurrent readers, exclusive writer access.
Integrated with Yahoo! Cloud Serving Benchmark for standardized performance measurement across read/write workload mixes.