DDS(Data Distribution Service)

Introduction to DDS

  DDS (Data Distribution Service) is a new generation of distributed real-time communication middleware protocol. It adopts a publish/subscribe architecture, is data-centric, and provides rich QoS (Quality of Service) service quality policies to ensure real-time, efficient and flexible data distribution. DDS was early used in U.S. Navy systems to solve software compatibility issues in the complex network environment of warship systems. In the automotive field, DDS is also cited in Adaptive AUTOSAR as one of the optional communication methods. In addition, in the field of robot development, ROS2 also introduces DDS middleware as the basis for information transmission.

Basic principles of DDS

  The basic principle of DDS is to solve the consistency problem of heterogeneous data. In DDS, data is stored in the memory of each application software using DDS, rather than being stored centrally in a central node. Data is generated in real time at the origin and consumed at the receiving end in real time. DDS uses a publish/subscribe model, where the originator publishes data, and subscribers subscribe to interesting data based on their own interests. DDS provides a flexible data distribution mechanism, allowing various components in heterogeneous systems to obtain and share data in real time, thereby maintaining data consistency.

Common types of DDS

  The specification of DDS is published by OMG (Object Management Group). OMG is an international, open, non-profit technical standards alliance that aims to formulate enterprise integration standards and provide technical standard support for various industries. Currently, there are a variety of DDS implementations and products to choose from, including the following common DDS types:
  1.RTI Connext DDS: RTI Connext DDS is a mature and widely used DDS implementation that provides powerful real-time data distribution and Integration capabilities.
  2.OpenDDS: OpenDDS is an open source DDS implementation developed and maintained by OCI (Object Computing, Inc.) and has good scalability and compatibility.
  3.PrismTech Vortex DDS: PrismTech Vortex DDS is a high-performance, reliable DDS implementation with low latency and high throughput.
  4.eProsima Fast DDS: eProsima Fast DDS is a fast, open source DDS implementation suitable for edge computing and IoT applications.

C++ implements open source DDS middleware

  Download and install eProsima Fast DDS: Visit eProsima's official website (https://www.eprosima.com/), download the Fast DDS version applicable to your operating system, and install it according to the installation guide.
  Define IDL file: Create an IDL file to describe the message type. Define the structure, fields and other related properties of the message in the IDL file.
  Generate DDS code: Use the tools provided by eProsima Fast DDS (such as fastddsgen) to generate C++ code based on the IDL file. The generated code includes the message's data structure and serialization/deserialization methods.
  Create a message subscriber (Subscriber): In C++ code, use the API of eProsima Fast DDS to create a message subscriber object. Subscribers will be used to subscribe to DDS topics and receive corresponding messages.
  Implement a message callback function: Define a message callback function for the subscriber, which will be called when a new message is received. Process the received message in the callback function, such as parsing the message content, executing business logic, etc.
  Run the message subscription function: Compile and run the C++ program to ensure that the eProsima Fast DDS library and the generated DDS code are correctly linked and called. The program will start and start subscribing to the DDS topic. When a new message arrives, the message callback function will be triggered.

  eProsima Fast DDS installation: https://blog.csdn.net/CHALLENG_EVERYTHING/article/details/119970979
Open source eProsima Fast DDS: https://github.com/eProsima/Fast-DDS-monitor

Reference link

Distributed real-time communication - https://zhuanlan.zhihu.com/p/192981171
Introduction and use of Fast DDS - https://blog.csdn.net/xllhd100s/article/details/113472321
The most complete open source DDS middleware -FastDDS—— https://blog.csdn.net/qq_27865227/article/details/121617520
DDS (eprosima.com)

The research on the content of this article comes from my friend FLQ, which is recorded here to prevent subsequent reference.

Guess you like

Origin blog.csdn.net/gls_nuaa/article/details/132571813