0

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.

diagram

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.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Maximus Light
  • 411
  • 3
  • 9

1 Answers1

0

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.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Carliedu
  • 71
  • 11