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.

The Dacite way Install Anatomy of an app First values Values API GitHub

Status — Alpha 0.1

The Clojure / SCI reference implementation (JVM, babashka, nbb) covers hash fusion, content stores, values, rooted stores, pack transport, wire-v1 binary packs, and an HTTP service with browser todo demo — 460+ tests. APIs may still change; pin a git tag for experiments. See the changelog for scope and known limits.

Quick start (nbb): git clone … && npm install && npm run hello — details on the Install page.

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.

The Dacite way →

Stores for persistence and sync

Content stores are simple immutable maps from hash → node. Mem, file, and LMDB backends share one protocol; layered, LRU, pack, 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.

Stores API reference →

How to write programs

  1. The Dacite way — a stance on data
  2. Anatomy of a Dacite app — Values / Store split, root-ref
  3. First values — count, get, hash identity
  4. Persist and update a document — same domain on file and HTTP
  5. History is free — snapshots and restore
  6. Large sequences stay cheap — page without realizing the log
  7. Two writers, one CAS — retries and SSE watch
  8. Sync a tree of blobs — list without bodies; fetch one file
  9. A browser app — todo and explorer on HTTP

How it works

Content stores, hash fusion, the value representation, rooted stores, and pack transport live in the book’s How it works part. Skip them until you are writing an app — or until you are changing the library.