I am using OpenDDS with C#. I developed two applications one for publisher and one for subscriber. I am able to run the applications in the same machine and there is no problem but I want to know if it is possible to run the publisher and subscriber in different machines in a network? If it is possible, could anyone tell me how?
posted on Tuesday, July 06, 2010 - 07:03 am
If your machines are on the same subnet, and the machines can receive eachothers broadcast messages, then the default config file that comes with your OpenSplice bundle (ospl.xml) will be sufficient to do the job. Just start opensplice on both nodes using this config file (make sure the environment variable OSPL_URI points to this default config file) and then start your publisher on one node and your subscriber on the other node.
If everything goes the way it should, you should see both nodes running a networking service (named 'networking' on Linux and 'networking.EXE' on windows) that should transmit the messages using broadcast from your publisher to your subsciber. Your applicaions themselves do not need to do anything special to enable networking.
Hope that helps.
posted on Wednesday, July 07, 2010 - 01:31 pm
Thank you for response.
I have just tried publisher and subcribers in different machines and everything is alright.
I want to ask another question. I created a data structure to share between nodes. I am writing 5 instances of that data structure from publisher and in the subscriber I am reading 5 instances with correct values and 5 instances with null values(only key value is correct) in a "while(true)" loop using "take" method of data reader.
Why does it take instances with null values? Is it possible to ignore that incorrect data?
Hi Emre, please check-our new OpenSplice specific forum at http://forums.opensplice.org and/or subscribe to our developer-mailing lists at www.opensplice.org as this is a common question related to receiving so-called 'invalid-samples' that are created to notify a datareader of unregister/dispose events (that are characterized by an instance-state change only and don't have 'real data' with them) in cases where applications have performed take() operations. We do have a QoS policy to prevent this from happening.