Webinar rooms
An interactive webinar room for hundreds of people that avoids a media server entirely, and keeps polls in sync with a stream that runs seconds behind.
The problem
A class or a town hall of a few hundred people needs everyone to hear the host and be able to take part without installing anything. It lets the audience join with a six-character code, and gives them chat, questions with upvotes and live polls; the recording lands in the video library afterwards.
Challenges
Scale without a media server
Two-way video for hundreds of people needs a costly selective forwarding server. The room deliberately has no audience video: the host’s broadcast rides the live-streaming pipeline, and all interaction travels over WebSockets. The tradeoff is that viewers are several seconds behind the host.
Polls that arrive before the host says them
With viewers seconds behind, a poll launched live would appear before the audience has heard the question. Every message records both wall-clock time and position in the talk, and polls are held back by the room’s measured lag: the median of recent player reports, clamped to a sane range because browsers cannot be trusted.
One slow reader must not stall the room
The socket hub never blocks on a client: a reader that falls behind misses messages rather than slowing everyone down, and presence is counted from open connections, which is what plans are sold on.
Implementation
Fair questions
One vote per person is enforced by a unique constraint in the database rather than by the client, and questions are kept separate from chat with optional moderation.
Why this stack
- WebSockets
- Chat, questions and polls need low-latency fan-out to hundreds of clients without the cost of media servers.
- Go
- A non-blocking hub handling many long-lived connections with little memory each.
- PostgreSQL
- Rooms, questions and votes with constraints that make fairness a database guarantee.
What it does
- Join with a six-character code: no account, no download
- Chat, questions with upvotes and moderated Q&A
- Live polls synchronised to the stream delay
- Recording saved to the video library
- Presence counts per room