Real-Time Rails
summary
Claim: Rails 4.0 can serve real‑time apps without an external Node process by using Rails 4.0 Live Streaming API plus rack hijack. Implementation uses Puma (threaded server), websocket‑ruby and TubeSock, Redis pub/sub or Postgres NOTIFY/LISTEN for broadcast, and mutex/queue patterns to avoid race conditions. Demonstrated chat and drawing apps run in one Rails app and handle roughly 30–40 concurrent clients before a memory leak appears. Covers SSE versus full WebSockets and when long polling suffices.
AI-written summary · about
chapters (13)
- 0:00Start
- 2:29REAL-TIME RAILS
- 8:38TCP SOCKETS
- 9:39CONCURRENCY
- 10:08WEB SERVERS
- 12:03THREADS-101
- 12:14MORE COMPLEX
- 15:17QUEUES
- 16:08PUB/SUB
- 19:09SERVER SENT EVENTS
- 23:03WEBSOCKETS
- 27:44A WILD PATTERN APPEARS!
- 29:22CHALLENGES








