I have a web application written in PHP using laravel.
Now, I have to add realtime notification system that pushes messages from server -> client, and can retrieve messages pushed from client -> server.
Since Socket.IO is backwards compatible and degrades gracefully, I want to use it for the WebSocket / AJAX polling part.
The problem is that Socket.IO by default works with Node.JS backend.
I have root access to the server, there is no problem running both (Apache and Node) in parallel or adding anything extra.
The problem is, how do I send a message from PHP to Node + Sockets.IO?
And then, how do I transfer a message from Sockets.IO + Node to PHP?
I have left the Node + Sockets to Browser part out, because that's pretty straight forward.
I have seen examples utilising Express.js + CURL and/or POST requests, but, isn't there a lower level way of doing it?
I am aware of DNode + PHP, but I cannot imagine how to assemble everything - Apache, PHP, Node, Socket.IO, DNode so it would work together seamlessly.
Also, I have transformed into a laravel library this PHP WebSockets server implementation. The problem with this library, though, is that it utilizes clean WebSockets for it's client side. And, I couldn't find a way to hack it together with Socket.IO client.