Isolating some publishers and suscriptors to localhost

4 posts / 0 new
Last post
Offline
Last seen: 6 years 2 months ago
Joined: 05/10/2016
Posts: 5
Isolating some publishers and suscriptors to localhost

Hi, big noob here.

I've been using RTI and so far it works very well, but there's something I'm not sure I'm doing properly. I have a local network with some computers (let's call them terminals) and a server. All the terminals run the same stack of processes. Those processes should communicate with each other (within their terminals) using DDS. The server also should communicate with one of the processes in each terminal via DDS.

To make this work, the server works at domain 0, and each terminal has its own domain where the processes work. Also, the process that should communicate with the server from each terminal has _two_ participants, one to communicate with its local domain, and one to communicate with domain 0.

The question is the following: am I doing it right? I cannot see a different way of "isolating" the processes within each terminal while also being able to communicate with the server. I'm not sure if having two participants in one application is correct or there's another way of doing this.

Any help will be appreciated!

Offline
Last seen: 6 years 2 months ago
Joined: 05/10/2016
Posts: 5

Ok I've just realized the existence of partitions. I guess that would be a better approach, am I right?

Gerardo Pardo's picture
Offline
Last seen: 3 weeks 6 days ago
Joined: 06/02/2010
Posts: 602

Depends on what you are trying to do. If you use Partitions then you only need one DomainParticipant which wil simplify yoru deployment and save resources.

On the other hand using differnt Domains IDs you will get true isolation meaning the DomainParticipant in different domains will not even discover each other, they will use different port numbers, threads, etc.

Gerardo

 

Offline
Last seen: 6 years 2 months ago
Joined: 05/10/2016
Posts: 5

Thanks for your answer Gerardo. Currently what I described as the "terminals" have several processes that share information using shared memory, which is usually populated by one of the processes from information received from the central server via TCP. There's a lot of infrastructure code and DDS would work beautifully here. 

That "true isolation" you mentioned is something we currently have right now, as the shared memory is what's currently used to share info between processes within one machine. Do you think that using partitions instead of domains would add too much unnecessary network traffic?