pstree floodgate
- floodgate
- ├─ socketio_transport — official Fluid/Routerlicious wire format
- ├─ phx_transport — Phoenix Channels wire format (levee-driver compatible)
- ├─ beryl — coordinator
- │ ├─ session_logic — feature/version negotiation, sequenced ops, summaries
- │ ├─ signals — v1/v2 normalization, recipient targeting
- │ ├─ presence_v1 — server-backed roster, per document
- │ └─ nack — rejection construction
- ├─ storage — per-tenant backend
- │ ├─ shelf (dets) — default — persistent, one file per document
- │ ├─ ets — in-memory, process-local
- │ └─ memory — ephemeral, used by tests
- └─ spillway — protocol: message types, sequencing, validation
Floodgate doesn't implement the Fluid protocol itself. It composes a handful of sibling Gleam libraries — each one a supervised part of the same process tree — and adds the transports, storage wiring, and admin surface around them.
composed from- [lib] spillway — Fluid protocol: message types, sequencing, validation, signals, nacks
- [lib] beryl — session coordination and presence registry
- [lib] dewdrop — supporting protocol utilities
- [lib] signet — JWT signing and verification
- [lib] silt — typed ETS access
- [lib] windsock — supporting runtime utilities
Each document session is its own BEAM process, supervised with a one_for_one restart strategy. If a session process crashes, it restarts and reloads its state from storage — the rest of the node, including every other document's session, is unaffected. This is the same isolation model the BEAM has run telecom switches on for decades; Floodgate's sequencing and validation logic on top of it is written in Gleam, so a whole class of protocol bugs is caught by the compiler before the process ever starts.
socketio_transport and phx_transport are two wire-format adapters in front of the same beryl coordinator, session state, and storage. A Fluid client on /socket.io/ and a Phoenix Channels client on /socket/websocket can collaborate on the same document at the same time; neither transport knows the other exists.
- GET
/health— readiness probe - POST
/documents/:tenant— create a document - GET
/documents/:tenant/:id— document metadata - GET
/documents/:tenant/:id/deltas— ops catch-up - GET
/repos/:tenant/git/refs— list refs - POST
/repos/:tenant/git/{blobs,trees,commits}— create a git object - GET
/api/tenants— list tenants (admin session or key)