0

I need to add push notifications to my PHP based application and am researching the best way to do this.

Having searched both the web and indeed here at stackoverflow I have seen a lot of potentially very outdated information regarding the best way to achieve this now that we are in 2013.

I am looking to use websockets as the primary technology for this functionality but my understanding is that PHP itself is not the way to go about implementing this server side and that decoupling the real time notifications from the main app is my best bet.

Currently it looks as though installing node.js/socket.io alongside PHP is the way to go. Although I am really not clear on how I can send a message from my PHP app to node.js in order to initiate the push. However, I really would rather not get into node.js right now and would prefer a separate solution if it all possible. I have read a little about pywebsocket. How does this compare?

In summary, what is the best way to set up a scalable real time notifications system using websockets that can have pushes initiated from my PHP app? Are there any standalone websockets server available? If so how do they compare to a node.js implementation?

gordyr
  • 6,078
  • 14
  • 65
  • 123
  • If you'd like to use [WebSockets with PHP](http://stackoverflow.com/a/12204603), both [Ratchet](https://github.com/cboden/Ratchet) and [Wrench](https://github.com/varspool/Wrench) are still active projects. The [Socket.IO Wiki](https://github.com/learnboost/socket.io/wiki#in-other-languages) also suggests [elephant.io](https://github.com/wisembly/elephant.io) for PHP. – Jonathan Lonowski May 09 '13 at 21:27
  • @JonathanLonowski thanks, useful links. I am concerned about going with a pure PHP solution as this solution really needs to scale well. If node.js really is the best way then I guess it's what I will to do – gordyr May 09 '13 at 21:34

0 Answers0