TransportManager (one per process) connects to it and reports its publishers. The coordinator aggregates this information and broadcasts a NetworkInfo message back to all connected processes so that subscribers can discover where to connect.
What the coordinator does
On each update cycle (every 50 ms), the coordinator:- Accepts new client connections — any process with a
TransportManagerconnects on startup. - Receives transport manager info — each client sends its current publisher list, including topics, schema IDs, and transport endpoints.
- Aggregates network info — builds a
NetworkInfoprotobuf message mapping each topic to all known publishers across all connected processes. - Broadcasts to all clients — sends the aggregated
NetworkInfoback to every connected process so subscribers can find publishers and negotiate connections. - Manages schemas — collects
MessageSchemaregistrations from clients and serves them on request (used by tools likebasis schema printandbasis topic print).
Default port
The coordinator listens on TCP port 1492 (BASIS_PUBLISH_INFO_PORT), defined in:
127.0.0.1:1492 by default. The port can be overridden when creating a Coordinator or CoordinatorConnector by passing a different port value.
Starting the coordinator
After building and installing Basis, start the coordinator from a terminal:/opt/basis/bin/coordinator and is on PATH after sourcing the environment. It runs until interrupted (Ctrl+C).
You can also start it through the basis launch command by including it in a launch file process, or run it manually in the background before launching other processes.
Only one coordinator should be running on a host at a time. A second coordinator will fail to bind the port and exit immediately.
How units connect
Units connect to the coordinator throughWaitForCoordinatorConnection(), which is called automatically as part of the unit startup sequence in UnitThread:
WaitForCoordinatorConnection() uses WaitForCoordinator(), which retries every second until a connection is established:
CoordinatorConnector
CoordinatorConnector is the client-side class that units and tools use to communicate with the coordinator. It is a thin wrapper around a TCP connection with framed protobuf messages.
Update() is non-blocking. It reads any available messages from the coordinator — primarily NetworkInfo updates and schema responses — and stores the latest values locally.
Multi-process setup
When a launch file defines multiple processes, each process gets its ownTransportManager and its own connection to the coordinator. The coordinator merges publisher information from all processes into a single NetworkInfo and distributes it to everyone.
This allows a subscriber in process A to discover a publisher in process B, negotiate a TCP transport connection, and receive messages directly — the coordinator is only involved in the discovery phase, not message delivery.
What happens without the coordinator
If the coordinator is not running:CoordinatorConnector::Create()returnsnullptr.WaitForCoordinator()(andWaitForCoordinatorConnection()) loops indefinitely, logging a warning every second.- The
basisCLI commands that require a coordinator connection (basis topic ls,basis topic print,basis schema print) will print an error and exit immediately.
Network transport negotiation
The coordinator facilitates transport negotiation but does not carry message data. After receivingNetworkInfo, a TransportManager inspects the publisher endpoints for each subscribed topic and establishes direct connections using the appropriate transport plugin (e.g., net_tcp for cross-process TCP, inproc for in-process zero-copy).
Transport endpoint addresses are included in the publisher info that each TransportManager reports to the coordinator. The schema_id field in each publisher entry identifies the message type and serialization format, enabling schema lookup via basis schema print or runtime deserialization.