Causal Ordering in DDS PreviousNext
Data Distribution Service (DDS) Forum > DDS Technical Forum >
Next message Goktug F. Gokdogan  posted on Tuesday, March 24, 2009 - 03:48 pm
I asked about this in a previous discussion about ordering, but unfortunately there was no response.

If we consider the following scenario where A , B and C are different participants:

(Dashes are the time line increasing towards right-hand side direction)

A writes 'x' at some time. B processes the sample and writes 'y'. The third participant, C, first receives the sample y (which is caused by x) and then receives the sample x.

Looking from C's perspective; How would C know that it did not yet receive the 'x', when 'y' is received?
In the literature, the relation between x and y is called a "happens before" relationship and the problem is known as the causality error. (various algorithms cope with this problem, like 'vector time').

Time-stamps (alone) seem to be useless in this scenario as the third receiver does not know how long to wait and see if another sample is coming after on_data_available call? The way using source timestamps is to receive all updates and let them be sorted by DDS, right?
Next message Maverick  posted on Saturday, March 28, 2009 - 03:27 am
I guess the situation you have considered could be solved if you model your data properly. Is C supposed to receive both x and y? I dont see why it should be receiving both. If say, C expects to see both x and y, then why not have B append x to the data it publishes and publish say z that contains x and y. That way C can co-relate y for an x.
Next message Goktug F. Gokdogan  posted on Monday, March 30, 2009 - 07:40 pm
Thank you for your response.

I think of possibility to embed related data to y. If this data is compact (ex. a small data like a coordinate) then it is an effective solution.
But the relation spans more than one topic and/or related data is not compact then the types will get dirty.

I think about a more general solution based on identification of samples by the senders. If the sender attaches a sequence number to 'x', B can put the last received sequence number of 'x' in 'y', so that C can detect the not received sample and wait for it.

Before going into this kind of solutions, I was just wondering if I missed something in DDS.
Back to top
Add Your Message Here
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Options: Post as "Anonymous"
Enable HTML code in message
Automatically activate URLs in message