Skip to main content

System Modes (Configuration)

This page documents the mode field in config.yaml. For the conceptual explanation of how PULL and PUSH actually work internally, see Architecture โ†’ System Modes.

PULL Mode (mode: 0)โ€‹

Clients must explicitly request messages from the daemon. No message is delivered unless asked for.

  • NSBAppClient.receive() โ†’ sends a RECEIVE request โ†’ daemon responds with payload or NO_MESSAGE
  • NSBSimClient.fetch() โ†’ sends a FETCH request โ†’ daemon responds with payload or NO_MESSAGE

Recommended for: Most configurations. Simpler to reason about and debug.

system:
mode: 0

PUSH Mode (mode: 1)โ€‹

The daemon automatically forwards payloads to clients as soon as they are available.

  • When send() is called โ†’ daemon pushes directly to the simulator client
  • When post() is called โ†’ daemon pushes directly to the destination application client
  • Clients must maintain persistent connections throughout the simulation

Recommended for: Latency-sensitive setups.

NAT and Firewall Considerations

PUSH mode may not work in all network configurations (e.g., NAT, firewalls, unstable connections), since it relies on the daemon being able to proactively reach each client over a persistent connection.

system:
mode: 1

Go Deeperโ€‹