FlatData Latency

Concept

Connext 6 introduces two features - Zero Copy Transfer over Shared Memory and FlatData Language Binding. These features enable the middleware to reduce the number of copies involved in sending a sample, resulting in lower latencies. In the case of Zero Copy Transfer over Shared Memory, a fixed minimal latency is guaranteed regardless of the size of the sample.

To learn more about these two features, refer to the User's Manual and the FlatData section of the API Reference.

Example Description

This example demonstrates the benefits of Zero Copy Transfer over Shared Memory and FlatData Language Binding using a large-data ping/pong latency application. The applications are written in C++11 using the modern C++ API. However, the traditional C++ API supports both features as well.

CameraImage_publisher publishes the ping topic and subscribes to the pong topic; CameraImage_subscriber subscribes to the ping topic and publishes the pong topic. Both topics use the same type, CameraImage, containing a 25MB array.

Each application can be run in 4 different modes by using the -mode command-line parameter:

  • Mode 1 - FlatData
  • Mode 2 - Zero Copy
  • Mode 3 - FlatData + Zero Copy
  • Mode 4 - Regular DDS application

You can choose the same or a different mode for each application.

The applications can run on the same or different nodes, although the benefits of the Zero Copy Transfer over Shared Memory can be observed only when running on the same node.

The example application allows one-to-one tests and is not prepared to run multiple subscribers and/or publisher.

Download Example

Browse Example

Or browse it in GitHub.

Languages: