DDS on network - configuration

Hi,

 

I'm using RTI DDS.

I want to use it in network.

How can I configure DDS and applications?

 

Thx in advance

NDDS_DISCOVERY_PEERS problem

I have tried to set the NDDS_DISCOVERY_PEERS enivorment variable to 127.0.0.1.  The exact syntax I use in my bash_profile is:

NDDS_DISCOVERY_PEERS=3@builtin.udpv4://127.0.0.1

export NDDS_DISCOVERY_PEERS

I am using the Hello_simple code that came with the RTI DDS tars.  I can start the two examples fine without a problem, but they don't communicate.  I changed the first line to below and it worked fine:

NDDS_DISCOVERY_PEERS=3@builtin.shmem://

Did I get the syntax wrong?  I am using CentOS 5.2 unplugged and only have the loop back address.

Thanks for any help, Tim

Of course you have to be

Of course you have to be sure that your OS support multicast and that both your OS and your network are correctly configured to allow multicast messages. If for some reason discovery  is not happening you can alway set list of peers using one of the way explained in section 12.2 of the RTI_DDS_UserManual , for example by setting the NDDS_DISCOVERY_PEERS environment variable in the same shell where you are going to run the app. writing assignment

Re: NDDS_DISCOVERY_PEERS problem

This is the expected behavior. It is because if the shared memory transport is enabled (which is the default configuration) than we do not enable the loopback. This avoids duplicate messages in the case where applications are running on the same physical computer.

This is explained in the manual. On version RTI DDS 4.5 it is in section "13.6.1 Notes Regarding Loopback and Shared Memory"

So if your computer is disconnected from the network and you want to communicate on the same host and not use shared memory you need to do two things:

1) set (as you were doing)  NDDS_DISCOVERY_PEERS=3@builtin.udpv4://127.0.0.1

2) disable the shared memory transport. You can do this using the TransportBuiltinQosPolicy which you can modify programmatically or with the XML configuration file 

But I am curious why you would want to use loopback in this situation rather than the default shared memory transport...

-Gerardo


RE: DDS on network - configuration

 

Well,

i believe you are running a publisher and a subscriber in the same machine and now you want to run them in two different machines. 

If this is correct you do not have to configure much. RTI DDS is an actual peer to peer system so you don't need any daemon or service running somewhere that has to be configured and your application doesn't need to know where to point. Each node in your system will be discovered automatically thanks to the discovery protocol.

From the RTI_DDS_UserManual:

 

Discovery is the behind-the-scenes way in which RTI Data Distribution Service objects (DomainParticipants, DataWriters, and DataReaders) on different nodes find out about each other. Each DomainParticipant maintains a database of information about all the active DataReaders and DataWriters that are in the same domain. This database is what makes it possible for DataWriters and DataReaders to communicate. To create and refresh the database, each application follows a common discovery process

 

By Default RTI DDS will try to discovery other entities using multicast. If for some reason this is not happening you can alway set list of peers using one of the way explained in section 12.2, for example by setting the NDDS_DISCOVERY_PEERS environment variable.

 

My suggestion is to first try just by running the pub and the sub: if this doesn't work just set the environment variable and try again.

 

--

Gianpiero

 

Hello Gianpiero, I am trying

Hello Gianpiero, 

I am trying to do the same as the author in the opening post - Instead of having the publisher and subscriber on the same machine, I have set up a network between two computers (I have confirmed the network is working as I have been able to ping data back and forth) and I want one computer to act as the publisher and the other as the subscriber. 

If I understand correctly, I only need to have RTI - DDS up and running on the two machines and they will automatically find each other ? 

Sree 

RE:

Hi Sree,

I am really sorry for the late answer. Anyway the answer to your question is yes. RTI DDS is a truly peer to peer system and doesn't need centralized daemon in order to work.

As I said by Default RTI DDS will try to discovery other entities using multicast.

Of course you have to be sure that your OS support multicast and that both your OS and your network are correctly configured to allow multicast messages. If for some reason discovery  is not happening you can alway set list of peers using one of the way explained in section 12.2 of the RTI_DDS_UserManual , for example by setting the NDDS_DISCOVERY_PEERS environment variable in the same shell where you are going to run the app. 

Sorry again for the delay. Feel free to ask again if you need more help: this time i will try to be more responsive.

 

--

Gianpiero