Introduction to ReactPHP and Websockets
summary
Builds a tiny chat with ReactPHP server, vanilla JavaScript client and WebSockets, using Ratchet for the WebSocket layer and optional Redis for a backlog (server uses LRANGE to send the last 50 messages). Claims nonblocking PHP handles thousands of connections—example notes 8,000 connections as trivial—and shows nginx proxy config, long‑running process management (systemd/forever/docker) and a live demo plus GitHub code; the demo chat works and persistence is optional, Ratchet compatibility with the newest ReactPHP is noted as a caveat.
AI-written summary · about
chapters (10)
- 0:00ReactPHP and WebSockets intro
- 3:15What is ReactPHP
- 8:56First WebSocket demo
- 12:33Basic chat server
- 15:30Real-time chat app
- 24:44Adding Redis persistence
- 32:29Advanced use cases
- 34:17Deploying Ratchet
- 37:28COVID real-world example
- 39:13Summary & Q&A
related talks
43mGetting started with ReactPHP – Pushing Real-Time Data to the Browser
46mGetting started with ReactPHP Pushing real-time data to the browser
45mKeeping it Real(time)
33mAn Introduction to Asynchronous PHP using ReactPHP
46mPushing the limits of PHP with React PHP
41mWebsockets as the glue to interactivity
50mImproving Application Performance with ReactPHP
45mWebsockets and Torrents - A match made in PHP
