Skip to main content

NimbusKV Interactive Architecture Explorer

Step inside NimbusKV's internal concurrency engine. Walk through snapshot isolation, write mutex serialization, generational TTL scheduling, and copy-on-write subscriptions.

1. Lock-Free Reads & Snapshot Isolation

Readers Never Lock

How readers achieve millions of ops/sec across multiple cores without taking any locks or contending with concurrent writers.

Step 1 of 3:Initial State: Reader acquires root pointer

What Happens Under The Hood

Reader Thread 1 begins reading 'user:1'. It loads the current in-memory HAMT root pointer (0xHAMT_ROOT_V1). Because HAMT nodes are immutable, Thread 1 can traverse the trie with zero synchronization, zero atomic CAS loops, and zero reader-writer locks.

Concurrency Guarantee

Readers never block, even if a concurrent thread is writing at the same instant.

Store Memory ModelInternal State
rootPointer
0xHAMT_ROOT_V1
storeState
{ "user:1": "Alice", "user:2": "Bob" }
writeMutex
UNLOCKED
activeReaders
2

Ready to test this behavior locally?

Inspect our verified regression tests and write-path benchmarks in the official repository.