There are 2 processes on node.js, one running as root and one as a normal user, all on the same machine.
Purpose: to organize data exchange between processes, in the style of:
{"method":"reboot", "params":{"timeout":0}} and it is natural to get an answer about the result of execution or any other information
Now implemented by raising the socket server and serializing data in json. But the time has come to add all this, and I would like to find a more correct way, if there is one.
thank
upd: The machine is rather weak and I would not want to raise http api for such purposes