a single-node key/value store with transaction support. Turns out you can get pretty far with a map and a mutex.
In-memory map for the KV store
Process read/write ops sequentially within txn
Grab a lock, do the work, release when done
Read returns nil for missing keys (spec says that's cool)
Atomic Transactions: Lock the whole thing, do all ops, unlock
Simple Semantics: Read what's there, write what you're told
Total Availability: Single node = no coordination needed
Stateful: Everything lives in memory, so it's fast
Pros:
Dead simple implementation
Fast in-memory operations
No need for complex transaction logic in single-node
Read-after-write consistency comes for free
Cons:
Coarse-grained locking (could be more granular)
Unbounded memory growth
No persistence (crashes = data loss)
Won't scale to multi-node without more work
Could optimize with more granular locking or a proper storage backend, but honestly this passes the tests. Curious how the multi-node version will complicate things...