Design Goals
NSB2 was engineered around four core properties. These goals shaped every architectural decision described throughout this documentation โ from the multi-channel transport to the modular abstraction layers.
The Four Propertiesโ
Lightweightโ
Resource-efficient, functionally minimal, and fast. NSB2 minimizes latency, memory utilization, and external dependencies so it does not impose unnecessary burden on users, simulations, or systems.
Accessibleโ
Uses tools and dependencies available on most widely-used platforms (Linux, macOS, Windows via WSL). Designed to download, install, and integrate with ease and transparency.
Modular & Extensibleโ
Provides well-defined interfaces and abstractions that users and contributors can adapt. Internal components are implemented as plug-and-play modules with abstract base classes and contracts.
Symmetricโ
Both endpoint libraries expose small, consistent APIs โ socket-like send/receive on the application side, HTTP-like fetch/post on the simulator side โ implemented with full feature parity across Python and C++.
What NSB2 Is Notโ
NSB2 does not re-implement network logic. It does not simulate any network behavior. It is a relay pipeline โ it moves payloads between a native application and a network simulator so that the simulator can model how those payloads travel.
NSB2 vs. NSB (Prior Version)โ
NSB2 is a complete redesign and re-implementation of the original Network Simulation Bridge. No code from the prior version is present or used.
| Feature | NSB (v1) | NSB2 |
|---|---|---|
| System modes | Fixed polling only | PULL and PUSH modes |
| Simulator modes | Per-node only | System-Wide and Per-Node |
| Transport | Single TCP socket per client | 3 dedicated sub-channels per client |
| Payload handling | Full payloads through bridge (chunked) | Payload key through bridge + Redis cache |
| Extensibility | Fixed, tightly-integrated stack | Modular plug-and-play components |
| Configuration | Static | Dynamic INIT handshake |
| Language support | Limited | Full Python and C++ feature parity |
| Protobuf schema | None | Single .proto schema for both languages |
| Package installation | Manual | CMake + pkg-config |