How atostek/rustdds works
Main system layers and components
• Core DDS Implementation: Central to the system, located in the src directory.
• DDS API Layer: Includes abstractions such as DataReader, DataWriter, and topic/key handling. This is largely implemented in src/dds and related modules.
• Message and Serialization Modules: Managed within src/messages and src/serialization. These modules define the RTPS submessages, header structures, and the interface to the serde-based serialization (using the CDR adapter).
• Network and RTPS Transport: Found in src/network and src/rtps. This module handles UDP transport, control of non-blocking I/O (using the mio crate), and network utilities.
• Discovery Service: Located in src/discovery, which manages peer discovery (SPDP/SEDP) and built-in endpoints for domain discovery.
• Security Services: Found in the src/security tree. This handles authentication, access control, and cryptographic functions. Although security is still under ongoing testing and evolution, the architecture must include these components.
• Support and Integration Layers: Some integration is shown for ROS2 compatibility (in src/ros2), plus example programs in the examples directory to demonstrate functionality and interoperability.
Component interactions and data flow
• Data written by the API flows into the Message Module where payloads are serialized (using serde coupled with the CDR adapter) and shaped into RTPS submessages.
• Discovery mechanisms in the Discovery Module continuously exchange announcements using RTPS. Show bidirectional communication between Discovery and Network.
• The Security Module “wraps” or “intercepts” parts of the data flow to add authentication, cryptographic transformations, and access control.
• Finally, point out that examples and interoperability tests (including the FastDDS_interop_test folder) serve as consumers or demonstrators of the core architecture. They simulate external DDS systems or serve as integration validations.
Architectural patterns and design principles
• Modular design: Each subcomponent (DDS, messages, network, security, discovery) is well-isolated within its own namespace/folder. This separation makes it easier to update or replace implementations in each layer.
• Layered architecture: High-level DDS API calls are gradually transformed through serialization, network transport, and security checks.
• Non-blocking I/O: Highlight the integration with the mio crate as a critical element that enables event-based, asynchronous processing.
Relevant technologies, frameworks, and supporting assets
• Mention Rust’s Cargo for package management (indicated by Cargo.toml).
• Integrations with external crates: serde for serialization (and its CDR format adapter), mio for non-blocking network I/O, and possibly others (like Rust’s log facilities).
• The .github directory indicates CI/CD workflows, static checks, and tests—all showing the project’s commitment to quality.