ProximumVecStore — IVecStore adapter over the proximum HNSW index (org.replikativ/proximum, ref: clones-ref/proximum).
Two design constraints drive the shape of this namespace:
Late-bind via requiring-resolve so a consumer that omits the
proximum jar still compiles. The dep IS declared in this
project's deps.edn, but addon-style isolation keeps the slot
system honest — failures surface as :slot/factory-failed
upstream instead of class-load errors.
The proximum API is immutable (every op returns a new index value). Consumers cache one handle per slot and share it across the swarm, so we wrap the immutable index in an atom and synchronise mutations under it. Concurrent writers serialise through the atom, concurrent readers see a consistent snapshot.
Reopen flow:
open! first attempts proximum.core/load against the existing
Konserve filestore. On miss (first boot / empty dir) it falls
back to proximum.core/create-index. This means a process
restart with the same :db-path resumes the same vectors —
no manual snapshot wiring required.
ProximumVecStore — IVecStore adapter over the proximum HNSW index (org.replikativ/proximum, ref: clones-ref/proximum). Two design constraints drive the shape of this namespace: 1. Late-bind via `requiring-resolve` so a consumer that omits the proximum jar still compiles. The dep IS declared in this project's deps.edn, but addon-style isolation keeps the slot system honest — failures surface as `:slot/factory-failed` upstream instead of class-load errors. 2. The proximum API is *immutable* (every op returns a new index value). Consumers cache one handle per slot and share it across the swarm, so we wrap the immutable index in an atom and synchronise mutations under it. Concurrent writers serialise through the atom, concurrent readers see a consistent snapshot. Reopen flow: `open!` first attempts `proximum.core/load` against the existing Konserve filestore. On miss (first boot / empty dir) it falls back to `proximum.core/create-index`. This means a process restart with the same `:db-path` resumes the same vectors — no manual snapshot wiring required.
(create-store & [{:keys [db-path dim capacity]}])Create a new Proximum-backed IVecStore.
Resolution order:
Construction is cheap and side-effect free; the index is opened
lazily on first pvec/open! (or first upsert!/search/etc).
Create a new Proximum-backed IVecStore. Resolution order: 1. Explicit caller args (:db-path, :dim, :capacity) 2. ProximumVecConfig (env > config.edn > XDG default) Construction is cheap and side-effect free; the index is opened lazily on first `pvec/open!` (or first `upsert!`/`search`/etc).
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |