Real-time collaboration with Rails
summary
Shows how to add real-time collaborative editing to a Rails app using AnyCable (Go websocket server) and Yjs (CRDT), with benchmarks showing Action Cable slowing to multi-second broadcasts at 10,000 connections while AnyCable stays under a second. Covers reliable streams/history replay, presence via Yjs awareness, server-side compaction/snapshots and a whisper mode that bypasses Rails for cursor updates. Delivers working demos: a Lexi-based realtime editor, an emoji board and an infinite collaborative drawing canvas; YRB Rust bindings used for compaction but require mutexing.
AI-written summary · about
chapters (9)
- 0:00Introduction to collaboration
- 1:24Challenges of collaboration
- 2:38Using AnyCable with Rails
- 7:57Managing connections and history
- 10:36Understanding CRDTs with Yjs
- 14:05Convergence and data order
- 19:38Cursor awareness and whispers
- 21:57Scaling and persistence
- 23:20Implementation and conclusion








