Data citing with fused hashing.

Work with values. Rely on stores.

Dacite separates what your application reasons about from how data is stored and moved. You manipulate Dacite Values — immutable, content-addressed structures with lazy, functional access — while Dacite Stores handle persistence, caching, and transmission as efficient hash→node dictionaries.

Read the book Clojure reference impl

Values for application logic

Vectors, maps, strings, and scalars are first-class store-aware values. Every value knows its hash and owning store. Updates return new values that share unchanged nodes with the old ones — structural sharing by construction, not convention.

Access is lazy: realize only the subtree you need, which makes partial sync and incremental fetch natural when data lives across a network.

Stores for persistence and sync

Content stores are simple immutable maps from hash → node. Mem, file, and LMDB backends share one protocol; layered, LRU, and remote stores compose for caching and distribution without changing application code.

A rooted store adds a single mutable root hash on top — compare-and-set, watches, and push — so peers coordinate on 32 bytes while the graph underneath stays immutable and cacheable forever.

Four layers

  1. Content stores — immutable persistence
  2. Hash fusion — content identity and tree independence
  3. Values — the data model your code uses
  4. Rooted stores — mutable application state and sync

The Dacite Book walks through each layer with intuition, API, and guarantees.

Status

The Clojure reference implementation covers hash fusion, content stores, values, rooted stores, garbage collection, LRU cache, and remote store — 318+ tests. Service and distribution layers are in progress.