Introduction
Modern safety-critical systems, such as autonomous vehicles, rely on distributed frameworks like the Robot Operating System (ROS 2). These frameworks typically employ a publish-subscribe (pub-sub) model. While flexible, pub-sub is inherently asynchronous: there is no guarantee that messages sent from different sensors will arrive at a controller in the correct order.
This nondeterminism leads to "node-to-node inconsistency." For example, a planner might receive a "Reverse" gear signal before a "Drive" signal, even if they were sent in the opposite order. This can cause "mode confusion," where software executes logic based on an incorrect view of the world. Currently, developers must write complex, error-prone state machines to manually re-align these messages.
The Xronos Approach
Xronos is an open-source middleware designed to bring deterministic, predictable coordination to distributed systems. It replaces the "best-effort" asynchrony of frameworks like ROS 2 and MQTT with a time-tagged "reactor" model, built on the Lingua Franca (LF) coordination language. In this model, every event is associated with a logical tag (a timestamp), and Xronos ensures that every component (or "federate") processes events in strict tag order.
Xronos introduces two primary coordination strategies:
- Centralized Coordinator: A central "Runtime Infrastructure" (RTI) manages logical time, ensuring perfect consistency at the cost of potential performance bottlenecks.
- Decentralized Coordinator: Based on the PTIDES model, federates advance their own logical clocks based on a Safe-to-Process (STP) offset that accounts for network latency and clock synchronization errors.
Crucially, Xronos makes timing faults detectable. If a message arrives too late to be processed in the correct logical order (an STP violation), Xronos triggers a user-defined fault handler rather than silently producing incorrect behavior.
Experimental Evaluation
The researchers evaluated Xronos using Autoware.Auto 1.0, a full-stack autonomous driving application ported from ROS 2. Performance was measured via microbenchmarks (Simple Source-Sink, One-to-Many, and Many-to-One) on hardware platforms including a standard PC (AMD Ryzen 5800X) and an NVIDIA Jetson AGX Xavier.
Key Results and Insights
Reliability and Determinism
In a test of 300,000 message sequences, ROS 2 experienced thousands of ordering errors due to its asynchronous nature. Under centralized coordination, Xronos achieved zero errors. In decentralized mode, errors were eliminated once the STP offset was tuned to 5ms.
Throughput and Latency
A common misconception is that enforcing order kills performance. However, Xronos significantly outperformed ROS 2 and MQTT in microbenchmarks. On a PC, Xronos achieved a maximum throughput of ~8 Mbps in a simple source-sink test, compared to ~1.2 Mbps for ROS 2. While centralized coordination adds latency due to RTI round-trips, decentralized coordination latency remains comparable to the uncoordinated connection speed of ROS 2.
Time as a First-Class Citizen
Unlike ROS, where time is just a data field, Xronos uses time as the fundamental driver of execution. This allows the system to distinguish between "logical time" (when an event should happen) and "physical time" (when it actually happens), framing the problem around the CAP theorem to balance consistency and availability.
Limitations and Future Work
Currently, the Xronos "federation" structure is static. Future work aims to implement "Mutation," allowing the system structure to change at runtime (e.g., adding a new sensor node on the fly). Additionally, the team is working on built-in mechanisms for federate recovery and automating the tuning of STP offsets based on real-time network conditions.
Summary updated