Real Time Rack
summary
A working browser REPL broadcasts code output to multiple clients in real time using IRB-in-the-browser and shows a nonblocking implementation that actually works across tabs. Implementation uses Sinatra on Thin with EventMachine.defer, async Rack callbacks (throw or -1 status), and Server-Sent Events for resumable streams with per-message IDs; WebSockets are discussed but SSE is recommended. Demo sends the current time 20 times and successfully resumes and broadcasts messages to all connected clients.
AI-written summary · about
chapters (7)
- 0:00Start
- 4:04Demo
- 6:18Basic Structure
- 8:41Middleware
- 11:29Messaging Service
- 26:13Web Sockets
- 26:49Event Machine Web Sockets








