"Modern inter-process communication made simple. A refreshed IPC bus for local Node.js microservices."
Hi everyone!
Have you ever had to connect several Node.js processes running on the same machine?
Maybe you're splitting a monolith into smaller pieces, running worker daemons, or coordinating local tools?
Standard solutions like child_process
, stdin/stdout
, named pipes or TCP — they all work, but come with tons of boilerplate: serialization, routing, discovery, and error handling.
This is where nodeBond comes in — a revived and redesigned lightweight IPC bus for local Node.js services.
Yes, it’s an old idea — now completely reworked and updated in version 4.0.0 ✨
🔧 Why nodeBond?
Common IPC pain:
- Setting up raw sockets is error-prone
- No built-in service discovery
- No shared in-memory state (without adding Redis or DB)
- Hard to test or interact manually with services
✅ nodeBond Solves That
Core ideas:
1. Central Hub (nodebond start-hub
)
The hub manages service registration and routing:
nodebond start-hub
2. Registering a service
const { register } = require("nodebond");
register({
id: "data-processor",
exports: {
async processData(payload) {
return { status: "processed", id: payload.id };
}
}
});
3. Calling a service
const { call } = require("nodebond/runtime");
const result = await call("data-processor.processData", { id: 123 });
console.log(result);
From CLI:
nodebond call data-processor.processData "{"id":123}"
4. Shared State: get
, set
, watch
nodebond set printer.status ""ready""
nodebond get printer.status
nodebond watch printer.status
5. CLI Tool
The nodebond
CLI gives you full control:
- launch the hub
- call services
- inspect or set variables
- debug your system live
🧪 Real-World Use
You can connect:
- 🖨
printer-service
— handles receipt printing - 📦
db-service
— fetches client info - 💳
cashbox-service
— orchestrates both
One service can call another, pass data, and monitor status variables in real time.
⚠ Considerations
Feature | Notes |
---|---|
Local only | Works only on a single machine (by design) |
One point of failure | The hub is central — but very lightweight |
Volatile state | In-memory store resets on restart |
🎯 Use Cases
Choose nodeBond
when:
- You split your app into small isolated services
- You want to avoid HTTP overhead or external brokers
- You want a CLI to monitor and test your system
- You want to teach microservice patterns locally
📦 Install
npm install nodebond
CLI version:
npm install -g nodebond
🔄 What's New in v4.0.0?
This project was originally started earlier, but fully reimagined recently:
- ✅ Per-request ID & socket-based responses
- ✅ CLI with token auth (
NODEBOND_TOKEN
) - ✅ Global in-memory store (
get/set/watch
) - ✅ Unified API for services and tools
- ✅ Clean modular core (hub, IPC, runtime)
- ✅ Fully testable with
.bat
scripts - ✅ Windows + Unix socket support
🔗 Learn More
Thanks for reading — I’d love to hear how nodeBond
might help your projects too!