API Reference barrel_design v#0.1.0

View Source

Modules

Versioned designs with automatically maintained views.

The view BQL source: FROM view(design', 'view'[, group_level => N | reduce => true]) AS v'.

Installed designs and their module bytes, kept as local documents of the source database: persisted and backed up with it, never replicated, and never part of its changes feed, so no map sees them.

Strict decoder for the CBOR a guest emits.

Pinned read cursors: a RocksDB snapshot of a view's store, held so every page of one read comes from the same checkpoint and generation. Kept in a public table owned by barrel_design_dbs; the database's process creates, expires and evicts its own, and releases them all before it closes its store.

One source database: its derived store, its installed designs and one indexer per active view.

Registry of the per-database processes.

Deterministic CBOR (RFC 8949 section 4.2.1) for what barrel_design signs or authenticates: cursor tokens and publication statements.

Run a guest map over a batch of documents.

Row layout and reads of a view index.

Order-preserving view keys (encoding version 1).

Design manifests: validation, normalization and view signatures.

Admission checks for a guest module (ABI barrel_v1).

Node-wide holder of loaded guest modules.

Native projections: a view's key and value read straight from document paths, without a guest. A missing path or a value of another type yields no row, as a guest map that finds no field emits nothing.

Published designs: the node's policy, the statements a database holds, their states, and which one a name follows.

Key bounds from BQL WHERE conditions on v.key.

One group totalled by a Wasm reducer at read time, within bounds.

Concurrency caps for guest jobs, per node and per database, and the activations allowed to run them.

Signed publication statements: the exact wire form.

Node-wide counters: guest calls made and guest calls that failed.

The derived store of one source database instance: a RocksDB directory under barrel_design's data_dir, opened with the source's storage environment so an encrypted database gets encrypted rows.

Continuation tokens: deterministic CBOR fields authenticated with HMAC-SHA256 under a secret drawn when the application starts, so a token is valid only on the node that issued it and only until it restarts, as its cursor is. At most 8 KiB.

The indexer of one view: the only writer of its index.