Architecture

How a solve flows through Selva

From a slider move to rendered geometry, step by step — every layer the request crosses, and what changes between the two runtime modes. Click any step to expand it.

The deployed app: the browser talks to the Selva server, which solves through Rhino.Compute. The server reads records and blobs through provider interfaces, so the flow is the same whether Postgres or files on disk sit behind them.

limits when work runs, stores nothing a cache — a hit skips what follows
  1. Browser @selvajs/ui in the user’s tab
  2. Selva server SvelteKit route + @selvajs/solve
  3. Compute client @selvajs/compute — in the Selva server process
  4. Rhino.Compute VM headless Rhino + Grasshopper, separate machine
  5. Selva server SvelteKit route + @selvajs/solve
  6. Browser @selvajs/ui in the user’s tab

Wire format

The same cloud-mode solve as above, as headers and JSON bodies. One request — radius 12.5, capped true — from the browser to Grasshopper and back. Read the bodies top to bottom: a flat object becomes a named tree, solves, and comes back flat.

Configuration

Each one is an environment variable read once at boot — the limits through resolveComputeLimits, the debug flag alongside the solve engine. Unset, every knob falls back to the default below — nothing here is required to run Selva.