Real-Time Rails
summary
Rails 4 exposes ActionController::Live and Rack.hijack so apps can hold raw TCP sockets and stream; Puma plus Ruby threads gives true concurrency. Demonstrations use WebSocket frames, server‑sent events, and the TubeSock gem to simplify code, powering a chat and drawing app that works but leaks memory and crashes under many clients. Deployment warnings: Heroku doesn’t support persistent websockets and nginx defaults kill idle sockets with proxy_read_timeout = 60s (adjustable up to 24 days). Use Postgres NOTIFY/LISTEN or Redis for pub/sub.
AI-written summary · about
chapters (32)
- 0:00Introduction
- 0:33RailsConf
- 0:55History of Popular Software
- 1:12IBM
- 1:35Java
- 2:05Ruby
- 2:20Node
- 2:41The Point
- 3:22The Metrics
- 4:22The Problem
- 4:57A Primer
- 5:30TCP Sockets
- 6:17Concurrency
- 6:39Puma
- 8:07Race Conditions
- 9:51Queues
- 11:52PubSub
- 13:03Long Pulling
- 13:39Action Controller Life
- 14:33ActionControllerLive
- 15:00Server Sent Events
- 16:27Demo
- 16:54Rack Hijack
- 17:57Rawhide Rock
- 18:52WebSocket
- 21:24Chat Demo
- 21:37Chat Server
- 22:44Source Code
- 23:25Patterns
- 23:58TubeSock
- 24:57WebSocket Challenges
- 27:24Thank you








