A RocksDB backend for konserve, using clj-rocksdb.
Add to your dependencies:
(require '[konserve-rocksdb.core] ;; Registers the :rocksdb backend
'[konserve.core :as k])
(def config
{:backend :rocksdb
:path "./tmp/rocksdb/konserve"
:id #uuid "550e8400-e29b-41d4-a716-446655440000"
;; Optional:
:map-size (* 1024 1024 1024) ;; Default: 1GB
:flags 0})
(def store (k/create-store config {:sync? true}))For API usage (assoc-in, get-in, delete-store, etc.), see the konserve documentation.
This backend supports multi-key operations (multi-assoc, multi-get, multi-dissoc).
No hard item limits - operations scale with your RocksDB instance capacity.
| Operation | RocksDB API | Atomicity |
|---|---|---|
multi-assoc |
WriteBatch | Atomic |
multi-get |
multiGetAsList | Efficient bulk read |
multi-dissoc |
WriteBatch | Atomic |
Data is stored in two keys per entry (key for value, key.meta for header/metadata). This enables efficient metadata-only reads for garbage collection while using multiGetAsList to fetch both in a single call for full reads.
Copyright © 2021-2026 Christian Weilbach, Judith Massa
Licensed under Eclipse Public License (see LICENSE).