i am a student and am currently working on ways to transfer a file over DDS. i have run dds version 6.3 on ubuntu terminal and successfully published and subscribed. the issue is i want to edit the message and similarly i want to transfer a file in a message. is there anyone who can help me? it would greatly be appreciated
1 Answers
This answer is not opensplice specific, it is generic DDS.
- There is no concept of editing a "message". There are no messages (this is in the DDS concept/terminology space). A "sent packet of information" is on a Topic, and is either an Instance of that topic, or a Sample of an Instance of that Topic, if the Topic is a Keyed Topic.
You are not sending a message, you are publishing an instance. If you want to edit the instance, you do so and publish it again. This re-published instance may be from the original publisher entity, or it might be from a subscriber who has received it, has edited it, and then republished it.
- If you want to transfer a file, use a file transfer program (ftp, tftp, sftp, etc). Certainly consider using DDS as the controller for this process (system A needs a file maintained by system B. System A publishes a request, system B sets up and fires off an sftp transfer of the file, then publishes a 'job complete' instance.
pseudo idl:
enum ObjectiveState {
OS_Desire, // "I need this"
OS_Can, // "I am able to supply this"
OS_Can_Not, // "I am not able to supply this"
OS_In_Process, // "I am doing this"
OS_Complete, // "I did this"
OS_Failed, // "Tried, but unable to complete, try again maybe?"
OS_PermanentFail // "Tried, but can't complete."
};
struct FileTxReq {
long long reqid; //@key
DestinationNode dest; // idl not supplied, some GUID thing
string<256> sourceUri;
string<256> destUri;
ObjectiveState state;
};
System A would then publish on the FileRequestTopic a sample:
reqid: 0x1234
dest: {systemA}
sourceUri: "/store/publicfiles/theImageFile.jpg"
destUri: "/Users/me/drop/theImageFile.jpg"
state: OS_Desire
System B would subscribe to FileRequestTopic because it has a File store. It looks for, finds the uri that was requested, and publishes
reqid: 0x1234 (note this is the same reqid as received)
dest: {systemA} (note this is also copied from the received instance)
sourceUri: "/store/publicfiles/theImageFile.jpg" (also the same)
destUri: "/Users/me/drop/theImageFile.jpg" (also the same)
state: OS_Can
System B starts the sftp transfer and publishes as above, but with state now "OS_In_Process". When the sftp is complete, it publishes an "OS_Complete" (or one of the two "OS_Failed" states) sample.
I realize this is a year old question, but it might still be helpful for people to get their heads around how things can be done using DDS, or how things are looked at in the DDS concept space.

- 996
- 5
- 20