The current state of Realtime Web Tech for PHP

18 Oct 2013

PHP Logo

I quite frequently see posts on StackOverflow about how to add realtime functionality to a PHP application, or to build a realtime solution with PHP. And I'm increasingly getting emails asking the same. So, here's what I feel the current state of Realtime Web Technology is for PHP:

The solutions for PHP alone are very limited. There is a framework called ReactPHP on top of which Chris Boden has built Ratchet. I've also come across something called WaterSpout Server which claims to offer WebSockets and HTTP fallback, but I haven't tried it out.

However, as per the book I co-authored with Jason Lengstorf - Realtime Web Apps - and the articles I've written for Web & PHP (Understanding Realtime PHP Apps and Building Realtime Web Apps with PHP) the best solution right now is either to use a realtime hosted service or to have a non-PHP solution running in parallel. Lee Boynton wrote a nice article for Web & PHP on integrating Node.JS with PHP and the Ratchet documentation provides information on integrating a realtime solution into a LAMP stack using message queues.

If you know of any other solutions, or believe differently, please get in touch.

Other Solutions

  • phpDaemon - Thanks to Filippo for the heads-up.