Reputation: 431
I am reading about ReactPHP and I really love PHP doing async things, that is adding so much flexibility.
I am trying to wrap my head around how to make 2 servers talk to each other while I can connect to my server (likely through an HTTP socket) to issue commands when need and observe the execution like a control panel/console.
I drew a diagram of what I mean, could someone please point in the right direction on what read/ right materials/methods, I am reading through ReactPHP at the moment but couldn't wrap my head around yet how to make it more or less 1<->2<->3 connection.
Upvotes: 0
Views: 240
Reputation: 71
the system I'm developping does a similar thing. My ReactPHP solution has asynchronous communication with an websocket server using Ratchet/Pawl and asynchronous communication too with an HTTP browser where I can enter commands and receive/show results. Data are read/write to MySQL too. The ReactPHP program acts as an HTTP server and at the same time as an Socket client. It receives a command, assemble the command to be sent to the webserver. When the websocket answers, it formats the answer and send it to the users browser.
Upvotes: 0