Storage, distribution and system architecture
A HeapDB node is a set of entity shards; each shard runs write, read and learn paths over the same data.
A HeapDB node is a set of entity shards; each shard runs three paths over the same data.
Events flow into an append-only log and seal into time-bucketed segments; questions read across those segments with bounds from the link store and kernel registry; confirmed answers flow back into the link store.
Components
- Log and segments. An LSM-style log seals segments by time. Old segments compact into coarser buckets that keep only their bound summaries and indexes.
- Hot heaps. For effect types queried often ("errors" in ops), a per-entity forward-decay heap or tournament tree is maintained on insert, so the answer is a peek.
- Sharding. Shards are keyed by entity (user, service, account), so most queries hit one shard. Cross-entity questions ("which service's deploy caused this incident?") run local top-k on each shard and merge with a k-way merge. They take a single effect type only, and merged scores are comparable only once calibrated; the merge does not renormalise per entity, because that would rank each entity's best guess as equally likely.
- Deletes and corrections. Tombstones with lazy deletion: a heap entry is checked against the log when popped, never searched for in place.
- Deployment. Single-user streams (health, personal finance) fit an embedded, on-device engine; ops and security fit a server deployment.
- Forgetting.
forget_entitydrops an entity's events, segments, links and calibration records; see Privacy.