Search code examples
linuxtcpudpdata-distribution-serviceopendds

multiple ports being used in UDP transport of RTI connext DDS?


What is the advantage of having multiple ports being used in UDP transport of RTI connext DDS whereas only one port is being used in TCP/IP of RTI connext DDS??


Solution

  • The UDP port mapping is defined by the OMG RTPS DDS Interoperability Wire Protocol Specification (http://www.omg.org/spec/DDSI-RTPS/), Platform Specific Model (PSM) : UDP/IP.

    There are a few advantages/requirements that justify using different ports for discovery and data traffic. The most relevant ones are:

    • Traffic differentiation: using different ports makes easier to identify different kinds of traffic. This is useful for both debugging (e.g., using wireshark), and for applying a different treatment to discovery and user data traffic.
    • Parallelism: by using multiple ports it is possible to parallelize the processing and generation of discovery and user data traffic. This is critical in some environments that have strict latency requirements for the user data traffic.

    RTI Connext TCP Transport design meets those two requirements, but it has an additional requirement:

    • NAT support: TCP Transport should be easy to configure in NAT environments.

    RTI Connext TCP Transport supports a mode where it opens only one server port for accepting all the connections (on the configured server_bind_port) needed for communicating two Participants. This way, it is compatible with NAT environments where only the Participant running the RTI TCP server has a publicly reachable address and port. Then, the Participants running RTI TCP clients will just open connections to that server.

    Note that even if RTI TCP Transport opens just one server port/socket, the server only uses that socket for accepting connections. RTI TCP Transport is still opening a different connection for handling each traffic kind and direction (incoming/outcoming discovery, incoming/outcoming user data). Parallelism requirement is still met.

    About traffic differentiation, RTI TCP Transport adds additional headers to the RTPS traffic, so it can be easily identified on the wire.

    Note this is specific to RTI, as currently there is no specification for an OMG TCP PSM model, nonetheless it is currently on the works by the OMG.