Best way to connect two socket servers (node.js and ratchet php)

one text

Solution:

I'd probably use this : https://github.com/ratchetphp/Pawl to have PHP sending messages to nodejs.

Then about the concept being good, I think not.

There is no point in having two differents websockets servers imo.

I'd probably use only one websockets server (nodeJS), and have PHP and node "talk" together through a messaging queue like rabbitMQ / REDIS

quick drawing

Source