Socket Backend
The default transport for NSB โ raw TCP sockets, with the daemon actively routing every message.
Architectureโ
NSBAppClient โโTCPโโโบ NSBDaemon โโTCPโโโบ NSBSimClient
โ
Redis
(optional)
- Uses raw TCP sockets for all communication
- The daemon actively routes all messages
- Three logical channels per client:
CTRL,SEND,RECV - Best for single-machine setups
Best for: Single-machine setups and general use โ no broker process to manage, minimal external dependencies, lowest latency floor.
For the rationale behind the 3-channel design, see Deep Architecture โ Multi-Channel Architecture.
Backend Comparisonโ
| Feature | Socket Backend | RabbitMQ Backend |
|---|---|---|
| Transport | Raw TCP | AMQP (RabbitMQ) |
| Message Routing | Daemon-mediated | Broker-native |
| Daemon Role | Full router | Config service only |
| Scalability | Single-machine | Horizontal scale |
| Async Implementation | select() | asyncio + polling |
| Channel Architecture | TCP channels | RabbitMQ queues |
| Protobuf format | Same (nsbm) | Same (nsbm) |
| PULL/PUSH support | Yes | Yes |
| Simulator modes | Yes | Yes |
| Redis support | Yes | Yes |
Go Deeperโ
- RabbitMQ Backend โ the alternative broker-based transport
- Architecture Overview โ where this backend fits in the full system
- Deep Architecture โ the
Commsabstraction that makes this backend swappable