I've played with the RTI DDS publisher/subscriber examples on my computer with no problem. I'd like to try to run publisher and subscriber on different ip network. By going through the RTI instructions and online tutorials, I haven't really come across to anything tells me how to setup the ip address using the toolkit module. Should I configure this in "domainParticipantQoSProfile" or "Domain ID". Is there an simple example demonstrating the configuration?
Solved! Go to Solution.
I actually had this same question, although I haven't set it up before. When I was researching this, on page 3-3 of the Getting Started Guide it states:
"Note: Under the DDS publish/subscribe paradigm, knowing the location of the distributed applications is handled by the middleware. In this example, we are running both the RTI Connext DDS Write String Example.vi and the RTI Connext DDS Read String Example.vi on the same computer, using the Shared Memory transport for inter-application communication. However, if you were to run these examples on different computers (with a functional LAN connection), DDS would automatically handle the communication across the network."
This makes me believe that 1) you need an active connection between the two different network (i.e. a bridge of some kind) and 2) you will need some middle person software allowing the instrument to be visible. I believe this is more of a 'networking' question, but what I believe you will need to do is to setup the middleware to make the instrument visible on the other network and then setup the participant on that network.
I'll keep digging along with you. My current reading's are here!
That's a great start, Bear! I know the whole RTI business is based on the "smart routing" and we don't have to do much work finding the nodes. But as a non-expert on middleware, I don't know what information we need. Your quote "However, if you were to run these examples on different computers (with a functional LAN connection), DDS would automatically handle the communication across the network." It should find the other node "automatically". Too bad I don't have a 2nd Labview computer handy, I'm trying to setup another one and see how it works...
Thanks, also keep it updated with your findings please.
So, in my use, I know that when you are on the same network, that line/statement is true. It is when you are on two networks that the statement doesn't apply. Just wanted to clarify that!
Also, I believe this is the exact information you need!
DDS sends discovery information to the Initial Peers an application has. By default, these Initial Peers will be pointing to the multicast address. This means that if two applications are on the same network they will discover each other by default. However, if these applications are on different networks we need to configure the Initial Peers manually. We can do it by adding the IP of the machine in a different network to the list of Initial Peers.
These Initial Peers can be configured in different ways:
Have a look at the following solution which shows how to set the Initial Peers using the three methods mentioned above: Configure RTI Connext DDS to not Use Multicast.
My recommendation is to set the NDDS_DISCOVERY_PEERS environment variable to point to the IP address in the other network. Although if you are using a specific QoS profile that you have created, you may want to add the initial peers information in the QoS profile. In the "Chapter 5 - Loading Quality of Service Profiles" you can find information about how to load custom QoS profiles.
Note: if you are setting the NDDS_DISCOVERY_PEERS environment variable, you have to make sure that the instance of LabVIEW has loaded the environment variable. Eg: if you set the environment variable from a command prompt you have to run LabVIEW from that command prompt.
You only need to set the Initial Peers in one machine to have communication, but bear in mind the following (A machine with default Initial Peers, B machine with more Initial Peers):
So you may want to run the application with the Initial Peers the last one. If you set the Initial Peers in both machines, you don't need to care about it.
If you want to know how discovery works, click here.
Let me know if you have any problems to configure the Initial Peers.
I hope this helps,
Thanks for the thorough explanation. I've read all the references you provided and I think I understand how it works in principle. The steps involve disable multicasting using the XML file provided in the link (or similar), and use NDDS_DISCOVERY_PEERS to refer to the new QoS xml file, which has the Initial Peers defined within.
As an engineer, not really a programmer. I think what I prefer to see in the future development of the LabVIEW toolkit is to incorporate this function into a LabVIEW module if possible. If you or experts in the field can provide some LabVIEW examples demonstrating the function, that will be even more fantastic!
You can set the NDDS_DISCOVERY_PEERS environment variable to point directly to you initial peers (without changing anything in the XML QoS profile).
About disabling multicast, we can have both, multicast and unicast to a single machine. Eg.
This will use multicast and also unicast to the machine in the IP 10.10.1.1, and you can add more initial peers if you need (separated by semicolons ';').
About the QoS, that is a different way of doing the same thing.
We will look into the possibility of adding a subVI to configure it