DEV Community

Seiji Ito
Seiji Ito

Posted on

How do you connect a blockchain node with multiple trading bots without adding TCP/HTTP overhead?

What happens when a blockchain node needs to communicate with multiple trading bots running as separate processes?

Instead of adding another network layer, go-ipc uses local IPC.

The flow is surprisingly interesting:

➡️ Bot registers with the node
➡️ Bot creates its dedicated subscription pipe
➡️ Node connects and starts streaming events
➡️ Node creates a dedicated transaction-submit channel
➡️ Bot sends signed transactions back
➡️ Heartbeats keep the connection healthy
➡️ Stale bots are automatically removed

One architecture. Two directions. Multiple independent bots.

And because the transport uses OS-level IPC rather than TCP/HTTP, communication stays local to the machine.

I mapped the architecture and workflow in the diagram below.

🔗 https://github.com/seiji0411/go-ipc

Top comments (0)