The standalone transactor: a TCP server owning the database's single writer. Peers and clients speak the wire protocol (docs/wire-protocol.md); writes serialize through one lock into a single total order, then commit to durable storage. Reads run against the transactor's db value, pinned to a t (as-of), a since view, or history when the request asks.
The standalone transactor: a TCP server owning the database's single writer. Peers and clients speak the wire protocol (docs/wire-protocol.md); writes serialize through one lock into a single total order, then commit to durable storage. Reads run against the transactor's db value, pinned to a t (as-of), a since view, or history when the request asks.
(-main config-path & _)(parse-config s)The transactor config file: EDN map with :host, :port, :storage, :path,
:token (a shared secret every client must carry; generate one with e.g.
openssl rand -hex 32), and :compact (true to let clients compact the
store over the wire).
The transactor config file: EDN map with :host, :port, :storage, :path, :token (a shared secret every client must carry; generate one with e.g. `openssl rand -hex 32`), and :compact (true to let clients compact the store over the wire).
(start! {:keys [host port storage path token compact]
:or {port 0 storage :memory compact false}})Start a transactor. Opts: :port (0 picks an ephemeral port), :host, :storage (:memory or :file), :path (for file storage), :token (a shared secret every :connect must carry — nil, the default, requires no auth; a token that is present must be a non-empty string), :compact (true to let clients trigger compaction over the wire — the default refuses :compact with :compact/disabled; peer-mode api/compact on the transactor's own connection is unaffected, ADR-0010). Returns a map with :port, :stop!, :acceptor, :conn. The transactor owns one connection; concurrent client writes serialize through it.
Start a transactor. Opts: :port (0 picks an ephemeral port), :host, :storage (:memory or :file), :path (for file storage), :token (a shared secret every :connect must carry — nil, the default, requires no auth; a token that is present must be a non-empty string), :compact (true to let clients trigger compaction over the wire — the default refuses :compact with :compact/disabled; peer-mode api/compact on the transactor's own connection is unaffected, ADR-0010). Returns a map with :port, :stop!, :acceptor, :conn. The transactor owns one connection; concurrent client writes serialize through it.
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 |