Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Interprocess communication between multiple nodejs apps

Tags:

node.js

ipc

I am working on a project in which I am using nodejs. Project runs multiple nodejs apps(processes) simultaneously. I want share data between these processes and synchronize their execution. Does nodejs has something similar to "message queue" and "Semaphores" to share data and synchronize execution of process. I know nodejs has asynchronous I/O and I should't be using blocking I/O operations in my app but some file read/write operations in the app needs blocking I/O.

I can use socket.IO for information sharing but synchronization using socket.io gets messy.

In-short, I am looking for a node module which can host a shared message queue for IPC and also act as a scheduler to block and run processes in the app.

like image 671
dvishal Avatar asked Sep 27 '26 23:09

dvishal


1 Answers

Google "nodejs message bus" - there are quite a few alternatives to Socket.io and ZeroMq including Simple Bus and Postal.js

like image 179
Dave Romero Avatar answered Sep 29 '26 15:09

Dave Romero