Skip to main content

Crate mongreldb_server

Crate mongreldb_server 

Source
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 interval between sweeps; each tick locks each table individually and calls Table::maybe_compact. Best-effort: a compaction error is logged and never aborts the sweep.