Comments (3)
Hi,
You are entirely correct that with ~40kB every 20ms there should no packet loss over the loopback interface, and that, from some point onward, everything is received is also indicated by the "out of order" count remaining at 0.
So if I were to hazard a guess, it would be that typically the first batch of samples doesn't make it. Even though the publisher waits until it has discovered the reader, that in itself does not mean the reader has discovered the writer. Both need to have happened for the data to be delivered.
For best-effort data β "unreliable" it used to be called when I started working, a far more honest term β there is not much you can do about it. However, even for volatile, reliable data, this can be an issue. In that case, the writer will store the data in its WHC and advertise its existence in the Heartbeat messages, but the reader will ignore all this data as it really is historical data from its perspective. While arguably correct, it is counter-intuitive, and that always is a bad thing if the intuitive behaviour would also be correct.
If instead the reader were to simply request everything that's advertised, and for some reason the writer has a lot of data in its history (it could be a transient-local writer, but it is also possible for volatile writers if there are other readers around), the behaviour would not only be counter-intuitive, but also incorrect.
I am pretty sure I know a way that's within the allowed behaviour of the DDSI specification, and that is for a writer to send a Heartbeat specifically to a newly matched reader, indicating from what the first sequence number is that the writer has written, or will write, since discovering that reader. The information is available internally, the only problem is communicating it. But it seems to me that if that Heartbeat simply avoids advertises anything published later, it would be conforming and the reader would be able to use this information to start delivering samples from the sequence number one would expect it to. The behaviour would then perhaps have to treat Cyclone slightly differently from the other DDS implementations, but that's definitely feasible.
Long story short: can you verify that it is always the first samples that are missing?
P.S. There is no easy fix at application level. Of course one can build a protocol on top of DDS to ensure the matching has completed on both sides, but that's not a very sensible approach. In practice a short sleep will do, but in the long run, for reliable data it will have to be a fix at protocol level, perhaps the one I outlined, and for best-effort data, I don't think there's any solution.
P.P.S. Since one should only use best-effort when one can afford to lose data, it should not be an issue.
from cyclonedds.
Nice answer. "Even though the publisher waits until it has discovered the reader, that in itself does not mean the reader has discovered the writer. Both need to have happened for the data to be delivered." I agree with this opinion.
from cyclonedds.
No further comments for a long time, so closing.
from cyclonedds.
Related Issues (20)
- CycloneDDS and eProsima Micro XRCE-DDS Communication in ROS2 HOT 6
- Allow inconsistent about DurabilityService QoS HOT 1
- Is there an implementation of Shared memory that does not through Iceoryx HOT 1
- Does CycloneDDS automatically group subscribers into multicast groups based on topic?
- Deserialization of sample failed due to reasons unknown, possibly related to a sequence HOT 29
- Two processes with the same language can communicate, but two processes with two different languages ββcannot communicate HOT 4
- How to subscribe to multiple topics?
- The dds_get_matched_subscription_data function be called in publication_matched listener, It can't get proxy reader's information HOT 3
- Malformed packets when streaming large messages over Ethernet HOT 5
- The frequency of subscription topic triggering is inconsistent with the frequency of publishing
- Provide Documentation to toggle between xcdr1 and xcdr2 ? HOT 2
- Checking handshake of a "topic" in a network? HOT 2
- How to config dds if using VLAN? HOT 1
- How to communicate with ROS2 and cyclonedds? HOT 1
- Does Data(M) carry unregister dispose information? what is the scenarios? HOT 1
- Questition: what is the ddsi2 participant for ?
- Undefined reference to MODULE_TOPIC_desc when building with C++ in CycloneDDS 0.10.5 HOT 1
- Confusion regarding DDS_DOMAIN_DEFAULT HOT 2
- Allow colon and period in topic names HOT 2
- Binding to INADDR_ANY even when configured for loopback triggers the Windows firewall
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cyclonedds.