# 🧩 nodeBond: Lightweight IPC for Node.js — revived and improved
Pavel

Pavel @xzdes

About: developer on js and node js

Joined:
May 21, 2025

# 🧩 nodeBond: Lightweight IPC for Node.js — revived and improved

Publish Date: May 23
5 0

"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
Enter fullscreen mode Exit fullscreen mode

2. Registering a service

const { register } = require("nodebond");

register({
  id: "data-processor",
  exports: {
    async processData(payload) {
      return { status: "processed", id: payload.id };
    }
  }
});
Enter fullscreen mode Exit fullscreen mode

3. Calling a service

const { call } = require("nodebond/runtime");

const result = await call("data-processor.processData", { id: 123 });
console.log(result);
Enter fullscreen mode Exit fullscreen mode

From CLI:

nodebond call data-processor.processData "{"id":123}"
Enter fullscreen mode Exit fullscreen mode

4. Shared State: get, set, watch

nodebond set printer.status ""ready""
nodebond get printer.status
nodebond watch printer.status
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

CLI version:

npm install -g nodebond
Enter fullscreen mode Exit fullscreen mode

🔄 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!

nodejs #javascript #ipc #microservices #cli #opensource #nodebond

Comments 0 total

    Add comment