Expand description
NEDB v2 — Content-addressed DAG storage engine.
Architecture:
objects/ — content-addressed, encrypted, BLAKE2b-verified nodes (immutable) indexes/ — id index (file-per-doc) + sorted indexes (BTreeMap, in-memory) graph/ — typed DAG edges (filesystem entries) MANIFEST — BLAKE2b Merkle root of all collection HEADs
Properties:
- Uncorruptable: atomic writes (tmp→rename), hash verification on read
- Parallel: no global lock on writes; each doc has its own index file
- Instant cold start: no AOF replay; rebuild sorted indexes in parallel
- Self-healing: migrate.rs handles v1→v2 on first startup
- Tamper-evident: BLAKE2b chain from MANIFEST → collection heads → nodes
Re-exports§
pub use store::Dek;pub use store::Node;pub use store::ObjectStore;pub use index::IdIndex;pub use index::OrderedValue;pub use index::SortedIndexes;pub use graph::GraphStore;pub use db::Db;
Modules§
- db
- Main DAG database — coordinates ObjectStore, IdIndex, SortedIndexes, GraphStore.
- graph
- DAG edge store — typed directed edges between node hashes.
- index
- Index store for NEDB v2.
- migrate
- Automatic v1 → v2 DAG migration.
- nql
- NQL (NEDB Query Language) parser and executor for v2 DAG storage.
- server
- nedbd v2 HTTP server — same /v1/databases/* API surface as v1. Drop-in replacement: Vision, itsl_mirror, all existing clients work unchanged.
- store
- Content-addressed object store — the foundation of NEDB v2.