Comments (4)
The "network channel" bit really means using separate transmit and receive paths for different priority bands. If you look at the code, it can have a tev
(timed event) thread per "channel" for handling all background work, and a dq
(delivery queue) thread for pushing data asynchronously into the reader history cache. The code actually matches proxy writers with these delivery queues based on the transport priority.
There are a few things that need to be done for this to be really useful. Firstly, there's a problem in that currently the only way to get data out is for the application thread to push it out, and that it always leaves the node via a single socket. There is no queueing, no asynchronous publisher mode, effectively no latency budget. This makes it kinda hard to do any interesting priority-based scheduling.
The sensible solution is to use an asynchronous publishing mode (still to be implemented), perhaps by default when the latency budget is greater than 0. That way, you can let the writer put the data in a priority queue for a "channel" and have another thread drain the queue. If you'd use a different socket per channel, so much the better, because you'd avoid the high-priority data being stuck (for however short a time) behind lower priority data in the socket's transmit buffer.
On the receiving end, you need multiple sockets for the same reason; and really also multiple receive threads that take data from these sockets. Now, obviously it can handle multiple receive threads already, and sockets are really low-level things that affect few parts of the code. So using different sockets and multiple receive threads is "just" a matter of a bit of administration.
As the discovery protocol allows you to override the default addresses for individual readers and the topic QoS has a transport priority field, you could choose the socket/port based on the channel that matches with the readers topic QoS and advertise that. Then way, if the writer follows the same topic priority setting, the data will end up in the right socket and be handled by the right thread; and if it doesn't follow it, the data will still arrive and still be delivered, but after taking the "wrong" route through the receive path.
The above is pretty trivial to do if you are ok with a less than optimal implementation — say, not use multiple sockets and just a single receive thread — and it gets progressively harder the nicer you make it (not much of a surprise there, I suppose) but I don't think it is really hard to do all this. I think there'd also be a nice opportunity to integrate what are "network partitions" into this; so that you can also map to threads/sockets on topic or partition names instead of priorities.
from cyclonedds.
Hi,
In RTI specification, it said it used the TOS of IPv4 to implement PRIORITY
, and why not implement in this why for cycloneDDS?
from cyclonedds.
@jwcesign, excellent question :) Obviously, the answer is that IPv4 TOS should be used as well. I think all the other points I made are important because without those details you are not actually in full control over the entire data path, but yes ... stupid oversight of mine.
The more so because there is this
cyclonedds/src/core/ddsi/src/q_config.c
Line 361 in 4223fff
This element describes the DiffServ setting the channel will apply to the networking messages. This parameter determines the value of the diffserv field of the IP version 4 packets sent on this channel which allows QoS setting to be applied to the network traffic send on this channel.
That's part of the network channel stuff in the code, and so at the moment it just sits there doing nothing ...
from cyclonedds.
While we don't have network channels still, the question of how they work is answered, thus this can be relegated to the knowledge base 😄.
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.