Skip to main content

Module backend

Module backend 

Source
Expand description

The LedgerBackend trait — the load-bearing accounting-plane surface every backend (MemLedger now; RocksLedger, TigerBeetleLedger later) implements, and the enforcer builds on (plan §3.2).

PLAN DECISION 8: the trait is synchronous and blocking. Every backend is single-writer anyway (plan §2a), so the service layer owns the actor thread and exposes the async facade (LedgerHandle::submit → oneshot). Keeping the core sync is what keeps it tokio-free (the WASM requirement), matches RocksDB’s sync API, and confines TigerBeetle’s async client inside its feature gate.

Traits§

LedgerBackend
A single-writer double-entry ledger over one consistency domain (one cell).