Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

My go-to method of inter-process communication in Node without using any third party modules is to just use process.send[1] to a send a message to the main thread, and then have it forward messages to the workers in the cluster, which you can listen for using the message event [2].

[1] https://nodejs.org/api/process.html#processsendmessage-sendh...

[2] https://nodejs.org/api/process.html#event-message



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: