Skip to main content

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โ€‹

FeatureSocket BackendRabbitMQ Backend
TransportRaw TCPAMQP (RabbitMQ)
Message RoutingDaemon-mediatedBroker-native
Daemon RoleFull routerConfig service only
ScalabilitySingle-machineHorizontal scale
Async Implementationselect()asyncio + polling
Channel ArchitectureTCP channelsRabbitMQ queues
Protobuf formatSame (nsbm)Same (nsbm)
PULL/PUSH supportYesYes
Simulator modesYesYes
Redis supportYesYes

Go Deeperโ€‹