CONCEPTS / BUILD THE MENTAL MODEL

Storage model and API contracts

Connect the LSM storage model with key order, serialization, filtering, deletion, write sequencing, and value ownership.

Storage model

Layers describe record generations; parts divide a logical disk segment into ranges.

Data contracts

Equality, hashing, encoding, and deletion must agree with the application model.

Application rules

Own mutable data and define how sequencing, recovery, and replication fit together.

01 / ARCHITECTURE

LSM-tree architecture

Follow writes through ordered memory, read-only segments, compaction, and persistent multipart storage.

Follow the storage lifecycle
02 / STORAGE UNITS

Segments and parts

Distinguish memory and disk layers, logical segments, reusable parts, and the counters that describe them.

Name the storage units
03 / QUERY SHAPE

Key ordering

Put related records into contiguous comparer order, with CompositeKey or a custom key type.

Design the keyspace
04 / MULTI-FIELD RECORDS

Composite keys and values

Store several values in one byte[] key or value, index rows by any of their values, and scan by leading elements, by a range, or by text.

Combine fields into one key
05 / DATA CONTRACTS

Serializers and comparers

Separate equality, hashing, and persisted bytes. Configure custom components and preserve compatibility.

Define the contracts
06 / POINT READS

Bloom filters

Skip provably absent memory-segment lookups and understand filter allocation, hashing, and false positives.

How the filter works
07 / VISIBILITY

Deletion markers and TTL

Choose tombstones, model expiration, and reclaim deleted storage without exposing older values.

Define what is live
08 / WRITE IDENTITY

Operation indexes

Use a producer's write sequence without confusing it with durable delivery, global ordering, or transaction commits.

Write sequencing and replay
09 / OWNERSHIP

Value mutability

Keep stored objects and buffers read-only, create replacements, and make cancellation leave no shared mutation.

Own stored values safely
Put the model into code

The Usage guides turn these contracts into runnable examples for opening a tree, writing records, coordinating updates, and scanning ranges.

Explore the Usage guides