BitBarrel is a key/value database built in Nim on the Bitcask model: writes are append-only, and the keys-with-file-offsets index stays in memory so reads are a single seek. On top of that base it grows the things a plain Bitcask does not give you.

It works both as an embedded library — think SQLite ergonomics — and as a multithreaded network server speaking a binary websocket protocol, which means the same store is usable from a front end in a browser.

  • Three index modes — hash for O(1) lookups, CritBit trees for range queries, and partitioned indexes for very large key sets.
  • Cursor pagination — efficient prefix and range scans without offset overhead.
  • Background compaction — a non-blocking thread compacts while writes keep flowing.
  • Extras — per-key TTL, batch operations, server-side graph traversal over JSON documents, and a pubsub system with watchable keys.
  • Clients in many languages — Nim, Go, Dart/Flutter, Python, TypeScript, C and Zig, plus a Flutter web admin UI.