Multi transport-plugin

9 posts / 0 new
Last post
Offline
Last seen: 1 day 1 hour ago
Joined: 01/13/2016
Posts: 58
Multi transport-plugin

Hi  everyone,

       i have three Apps(named A, B and C for example) and a custom transport-plugin. now  i want the data transfer between B and C use custom transport-plugin, data transer between A and B or A and C use UDP, how can i config the USER_QOS_PROFILES.xml?

       thanks for any help.

Gerardo Pardo's picture
Offline
Last seen: 10 hours 51 min ago
Joined: 06/02/2010
Posts: 601

Are the communications B<->C,  A<->B, and A<->C all using the same Topic?

If the answer is yes, then I think you cannot get exactly what you are asking for. If the answer is no, then maybe...

The reason is this. You can only control the transports that are enabled for a specific DataWriter or DataReader. This is done using the TRANSPORT_SELECTION Qos Policy. Using this policy (via USER_QOS_PROFILES.xml or any other means) allows you to select the subset of the transports installed in the DomainParticipant that the DataWriter or DataReader will use.

When a DataWriter matches a DataReader on a Topic, RTI Connext DDS figures out which transports the DataWriter and DataReader have both in common. It then will send data over "all the transports that both have in common"  there are some built-in exceptions for this, for example if both have the built-in shared-memory transport then that one is the only one used. But for UDP and Custom transports the rule is that if both DataWriter and DataReader can use it, then both will be used...

Therefore in your situation if  you want B<->C have to use CustomTransport, then B and C must both enable the CustomTransport. Since you want A<->B to use UDP, then both must enable UDP and likewise for A,->C to use UDP both must enable UDP.  

This adds up to saying that all A, B, and C must enable UDP and in addition B, and C (but not A) must enable CustomTransport.

Given that setup you will have:

B<->C will transfer data over both CustomTransport and UDP

A<->B will  transfer data over UDP only (because A does not have custom transport)

A<->C will  transfer data over UDP only (because A does not have custom transport)

However if these are using different Topics, then the different DataWriters and DataReaders can be configured with different transports and there may be a way to get whet you asked for... Does it make sense?

Gerardo

 

 

Offline
Last seen: 1 day 1 hour ago
Joined: 01/13/2016
Posts: 58

thanks for your answers.

All the communications B<->C,  A<->B, and A<->C are the same topic.

and what i want to do is like you say

B<->C will transfer data over both CustomTransport and UDP

A<->B will  transfer data over UDP only (because A does not have custom transport)

A<->C will  transfer data over UDP only (because A does not have custom transport)

and still i wonder that if B and C enalbe UDP and custom transport-plugin, how can i make sure that which one the communication between B and C use, the  UDP or custom transport-plugin?

 

Gerardo Pardo's picture
Offline
Last seen: 10 hours 51 min ago
Joined: 06/02/2010
Posts: 601

Hi,

In the above situation data between B and C will be sent over both transports UDP and the CustomTransport plugin. If Connext DDS has two transport paths between a DataWriter (B) and a DataReader (C) it will use both of them (the only exeption is when one of the transports is shared memory).  You cannot change this behavior in Connext DDS 5.2 (or earlier).  We have some new features in the pipeline that may change soem aspects of this in Connext 5.3 but currently it is a built-in behavior that cannot be changed. 

Note that just because data is being sent over two transports (UDP and Custom) it does not mean the application will see any duplicates. The fact that these are two copies of the same data samples is internally detected by Connext DDS and one of the samples is automatically dropped.

Gerardo

 

Offline
Last seen: 1 day 1 hour ago
Joined: 01/13/2016
Posts: 58

thanks again,

but still i have questions. if the two transports between B and C has different communication rate, does the datawriter will automatically use the quicker one?

rip
rip's picture
Offline
Last seen: 10 hours 49 min ago
Joined: 04/06/2012
Posts: 324

It uses both.  The sample that arrives via the faster channel will be registered.  When the same sample arrives via the slower channel the Reader will note that it has already been received, and so it will be discarded by the Reader.

If the faster channel copy of the sample gets lost enroute, the slower channel's version of it will be registered.

Offline
Last seen: 1 day 1 hour ago
Joined: 01/13/2016
Posts: 58

thanks for rip, can we simply think that the real-time performance is better when it uses both then any one of them?

rip
rip's picture
Offline
Last seen: 10 hours 49 min ago
Joined: 04/06/2012
Posts: 324

well, philosophically, please first define real-time for you.

Sending via both implies that a sample won't need to be repaired as often (if reliable) or is maybe more likely to get through (if best effort).

How it affects your system has too many variables to be able to answer.  So, I rely on the Support Engineer's Fallback Answer:

 

It depends.

 

Offline
Last seen: 1 day 1 hour ago
Joined: 01/13/2016
Posts: 58

thanks, i got it.