Giter Club home page Giter Club logo

Comments (4)

eboasson avatar eboasson commented on September 28, 2024

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.

jwcesign avatar jwcesign commented on September 28, 2024

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.

eboasson avatar eboasson commented on September 28, 2024

@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

{ LEAF("DiffServField"), 1, "0", RELOFF(config_channel_listelem, diffserv_field), 0, uf_natint, 0, pf_int,
:

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.

thijsmie avatar thijsmie commented on September 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.