Websockets and Torrents: A match made in PHP
summary
Built a Torrent Web GUI that pushes torrent JSON from server to browser using PHP event loops (React) and a WebSocket layer (Ratchet) with a client using AutobahnJS. Initial implementation polls a slow command-line dump (5–10s) every 2s via a periodic timer and blocks the loop, so work gets offloaded to workers and a job queue and injected back over zmq port 5555. Uses per-user topic tokens and Tor/SSH for VPS anonymity; demo initially fails on 3G then later runs.
AI-written summary · about
chapters (12)
- 0:00Introduction to project
- 1:36Developing the prototype
- 4:21Refining the architecture
- 9:21Understanding WebSockets
- 13:21Interrupt-driven programming
- 17:49Implementing the stack
- 20:40Code and data flow
- 27:57Solving technical challenges
- 35:15Job queues and workers
- 38:31Live system demonstration
- 42:31Scaling and final lessons
- 47:49Q&A session
related talks
45mWebsockets and Torrents - A match made in PHP
38mPushing the limits of JavaScript with P2P and streaming BitTorrent
41mWebsockets as the glue to interactivity
40mIntroduction to ReactPHP and Websockets
34mWebRTC Mad Science
45mKeeping it Real(time)
22mJavascript... Torrents... and Mad Science!
43mGetting started with ReactPHP – Pushing Real-Time Data to the Browser
