15. Typical Use-Cases

Fast DDS is highly configurable, which allows for its use in a large number of scenarios. This section provides configuration examples for the following typical use cases when dealing with distributed systems:

  • Large Data mode and Fast DDS over TCP. Describes how to configure Fast DDS to use the LARGE_DATA builtin transports mode. This mode enables efficient utilization of TCP transport without the need for constant reconfiguration during deployment changes. It optimizes communication performance for large data samples over lossy networks by employing a combination of UDP and TCP/SHM transports.

  • Fast DDS over WIFI. Presents a case where Discovery through multicast communication is a challenge. This example shows how to:

  • Well Known Network Deployments. Describes a situation where the entire entity network topology (Participants, Publishers, Subscribers, and their addresses and ports) are known beforehand. In these kind of environments, Fast DDS allows to completely avoid the discovery phase configuring a STATIC discovery mechanism.

  • Topics with many subscribers. In cases where there are many DataReaders subscribed to the same Topic, using multicast delivery can help reducing the overhead in the network and CPU.

  • Large Data Rates. Presents configuration options that can improve the performance in scenarios where the amount of data exchanged between a Publisher and a Subscriber is large, either because of the data size or because the message rate. The examples describe how to:

  • Real-time behavior. Describes the configuration options that allows using Fast DDS on a real-time scenario. The examples describe how to:

    • Configure memory management to avoid dynamic memory allocation (see Tuning allocations).

    • Limit the blocking time of API functions to have a predictable response time (see Non-blocking calls).

  • Reduce memory usage. For use cases with memory consumption constraints, Fast DDS can be configured to reduce memory footprint to a minimum by adjusting different QoS policies.

  • Zero-Copy communication. Under certain constraints, Fast DDS can provide application level communication between publishing and subscribing nodes avoiding any data copy during the process.

  • Unique network flows. This use case illustrates the APIs that allow for the request of unique network flows, and for the identification of those in use.

  • Dynamic network interfaces. If the network interfaces are expected to change while the application is running, Fast DDS provides an easy way of re-scanning the available interfaces and including them.

  • Statistics module. This use case explains how to enable the Statistics module within the monitored application, and how to create a statistics monitoring application.

  • ROS 2 using Fast DDS middleware. Since Fast DDS is the default middleware implementation in every OSRF Robot Operation System 2 (ROS 2) long term (LTS) releases and most of the non-LTS releases, this documentation includes a whole independent section to show the use of the library in ROS 2, and how to take full advantage of Fast DDS wide set of capabilities in a ROS 2 project.

  • How to use eProsima DDS Record and Replay (rosbag2 and DDS). Instructions on how to tune your application to be able to record and replay your DDS messages using ROS 2 rosbag2 package.

  • Request-Reply communication. Although Fast DDS provides a Publisher-Subscriber communication protocol, it offers a mechanism to use Request-Reply communications. This use case explains how to use the APIs to communicate two application using Request-Reply.

  • Remote type discovery and endpoint matching. This use case leverages the Remote Data Types Discovery to create endpoints and start communicating with remote discovered endpoints with previously unknown data types.