1

I'm setting up a node.js cluster in which I'd like slave processes to send messages to the master so it keeps track of their progress. All the documentation I've read mentions passing messages from the master to the slaves and not the other way around, which makes me wonder if that is possible.

Thanks

ThomasWeiss
  • 1,292
  • 16
  • 30
  • Possible duplicate of [Communicating between two different processes in Node.js](https://stackoverflow.com/questions/10213501/communicating-between-two-different-processes-in-node-js) – Jérémy Pouyet Jun 05 '18 at 15:24

1 Answers1

1

This question has been raised before.

Ideally, you will fork a child process from your parent process, so that there are common interfaces for each.

You can then pass messages between processes using events.

Community
  • 1
  • 1
Alex
  • 4,844
  • 7
  • 44
  • 58