Expand description
mongreldb-server — a long-lived process holding a multi-table Database
open, serving SQL + table-qualified native APIs over HTTP.
Endpoints: GET /health → 200 OK GET /tables → [“t1”, “t2”, …] POST /tables → create table DELETE /tables/{name} → drop table POST /tables/{name}/put → upsert one row POST /tables/{name}/count → { “count”: N } POST /tables/{name}/commit → { “epoch”: N } POST /sql → Arrow IPC bytes POST /txn → atomic cross-table transaction
Usage: mongreldb-server <db_dir> [port]
Functions§
- build_
app - build_
app_ full - Build the daemon router with full auth configuration including user-based auth.
- build_
app_ with_ config - Build the daemon router with optional auth token and max-connections limit.
- build_
app_ with_ external_ modules - spawn_
auto_ compactor - Launch the §5.9 background auto-compaction sweep (run-count cost trigger).
One OS thread, sleeping
intervalbetween sweeps; each tick locks each table individually and callsTable::maybe_compact. Best-effort: a compaction error is logged and never aborts the sweep.