Engineering notes
How Castalong is built, under the hood.
An SFU on a PaaS: the two-IPs problem
STUN reports the shared NAT egress; inbound media arrives on the dedicated IP. Pinning node_ip, the balancer 502 that impersonates a broken app, and why TURN/TLS was deliberately left out.
Two hundred call sites, one seam: SQLite to Postgres without touching the queries
A thin wrapper rebinds ? to $N at the driver seam so no query changed. Why MariaDB lost on silent TEXT-index truncation, and proving the migration on a copy of the real data.
Recording without Docker: LiveKit egress as a plain process
Chrome is only for room compositing; participant egress is pure SDK + GStreamer. Building egress from source and running it as an autoscaling process: one missing AAC plugin, a hardcoded tmp dir, and a binary that must be named egress.
Compositing graphics straight into a WebRTC video source
Why on-screen graphics moved out of a browser source and into the plugin: overlay definitions over the LiveKit data channel, off-pump rasterisation, and a lock-free, always-BGRA blend that travels with the guest.
ArchitectureJune 2026Per-location graphics, and deleting the old overlay
Per-source visibility with a live toggle that never drops video, masking an immutable snapshot, and retiring the entire legacy /gfx polling path so there's a single graphics system.
One plugin, two C runtimes: the Rust core and the Qt dock
libwebrtc is /MT, OBS and Qt are /MD. Why that forces the plugin into two DLLs talking over a narrow C ABI, plus SDK-free libobs FFI via raw-dylib.