Add LMDB storage backend, OCaml 5.5 Cloud Agent environment - #1
Closed
tiensonqin wants to merge 2 commits into
Closed
Add LMDB storage backend, OCaml 5.5 Cloud Agent environment#1tiensonqin wants to merge 2 commits into
tiensonqin wants to merge 2 commits into
Conversation
Define a repository-managed environment for datascript-ocaml: - Base image installs opam, OCaml 5.5.0, libsqlite3-dev, and Node.js 24 - Install script runs opam deps and dune build after checkout Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
Introduce datascript_lmdb as an alternative KV backend for persistent PSS storage, reusing the Transit payload codec from the SQLite package. Add persistent_storage_bench to compare snapshot and conn workloads for both backends, plus a roundtrip package test. Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
datascript_lmdb: LMDB-backed implementation of the existingstorageKV interface (address → Transit-encoded PSS node payload), mirroring the SQLite backend shape.persistent_storage_bench: runs the same snapshot + conn workloads against SQLite and LMDB side by side.test_lmdb_package: roundtrip + closed-session guard tests.liblmdb-devandlmdbopam dependency.Benchmark highlights (native OCaml 5.5)
Lower is better (ms). Same row counts for both backends; LMDB files are larger due to mmap pre-allocation.
Size 100
Size 1000
LMDB wins clearly on incremental snapshot store/update paths; bulk build is similar at 1000 blocks. SQLite produces smaller on-disk files.
Usage
Cloud Agent environment
.cursor/environment.jsonpins OCaml 5.5.0 via Dockerfile + install script.