Keeping it Real(time)
summary
Built a live chat and beta video call system that sustains 1,000 concurrent connections on a $5 DigitalOcean droplet, using WebSockets with Crossbar/Autobahn (WAMP) and PHP libraries ReactPHP / Ratchet / Thruway for long‑running workers. Authentication uses WAMP challenge workers and one‑time tokens; meta events feed a worker that subscribes to topics and writes messages into a message queue and Redis for presence and lookup. The design minimizes HTTP polling, keeps the router dumb, and recovers durability via queues and Redis caching while exposing granular publish/subscribe and RPC permissions.
AI-written summary · about
chapters (21)
- 0:00Introduction
- 1:40WebSockets
- 7:08What is WebSocket
- 8:24WebSocket System Diagram
- 18:01React PHP
- 19:19React Ratchet
- 19:53Authentication
- 22:21Permissions
- 24:29Goals
- 24:46Chat History
- 26:00Crossbar
- 29:11System Diagram
- 30:11Goal
- 34:15Code
- 34:48Keepalive
- 36:47WebSockets as a playground
- 37:08WebRTC
- 37:49PHP
- 38:29Service
- 40:37Research
- 42:16Questions
related talks
40mIntroduction to ReactPHP and Websockets
41mWebsockets as the glue to interactivity
43mRealtime Web Apps in the Wild
36mReal-Time Laravel
30mWebSockets: The Real-Time Avengers
34mJoe Dixon :: Real-Time Laravel
46mGetting started with ReactPHP Pushing real-time data to the browser
30mCreating a Chat App in 15 Minutes with Angelo
