Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement stream prioritization #165

Open
Ralith opened this Issue Jan 2, 2019 · 9 comments

Comments

Projects
None yet
5 participants
@Ralith
Copy link
Collaborator

Ralith commented Jan 2, 2019

A QUIC implementation SHOULD provide ways in which an application can indicate the relative priority of streams

Stream priority could be indicated with a u32i32, associated with every send-capable stream. A stream's priority could be used as the key for a priority queue taking the place of the current Retransmits::stream field, with Connection::next_packet Connection::poll_transmit always selecting the pending stream frame with the largest priority to send next.

@bIgBV

This comment has been minimized.

Copy link

bIgBV commented Jan 6, 2019

Hi! I'd like to try my hand at this. I've been going over the protocol document (https://quicwg.org/base-drafts/draft-ietf-quic-transport.html) and will hit you guys up in the gitter chat with the questions I have.

@douglascaetano

This comment has been minimized.

Copy link

douglascaetano commented Mar 6, 2019

Hi everyone. @bIgBV, do you have any estimate on when you'll finish this implementation? We'll require prioritization for one of our projects. Thanks!

@bIgBV

This comment has been minimized.

Copy link

bIgBV commented Mar 6, 2019

@douglascaetano I couldn't work on for a while now as my semester turned out to be more involved that I first expected.

I think I might be able to pick it up again in a few weeks, but I am not sure what the timeline to completion might look like.

@djc

This comment has been minimized.

Copy link
Owner

djc commented Mar 7, 2019

@douglascaetano can you say more about your project and/or the timeline for which you'd need this?

@ustulation

This comment has been minimized.

Copy link
Contributor

ustulation commented Mar 8, 2019

@djc The project is MaidSAFE - A p-2-p completely decentralised and autonomous system, in which users (clients) can create accounts to log into and store data. It's not a block chain as that wouldn't scale. MaidSAFE nodes are called vaults and people who run them are farmers who earn/farm cryptocurrency - safe-coin. More info in the link above.

So with that intro, our bottommost layer is as expected an IP Networking layer and we are in the process of switching over from TCP to a UDP based protocol as that is just better in so many aspects for NAT Traversal and p-2-p in general. QUIC seems the next de-facto one atop UDP with all the reliability, security, congestion control etc., so we are actively looking into going 100% QUIC and since we are Rust Backend, quinn appears to be the best way to go.

One of the features we have are message priorities that we handle ourselves with priority queues and all. With QUIC that should become redundant if stream prioritisation is introduced in quinn at which point the app layer can choose different streams according to message importance over a single (QUIC) connection to the peer. I guess it should take us a sometime to reach there though as we are only just starting to look into this (and currently porting from pure mio to tokio based eventloops and all). So maybe after 2 or 3 weeks we would get to a place where it would be lovely to have this stream prioritisation available. That's the ideal scenario ofc. but just to give an idea of the whole thing since you ask.

Thanks for your (and others involved) efforts though and we are highly looking forward to using quinn :)

@djc

This comment has been minimized.

Copy link
Owner

djc commented Mar 8, 2019

@ustulation sounds great! Given the timing, you may want to take over this issue from @bIgBV to get your thing working, though we don't need to decide that at this point. @bIgBV I hope that's okay with you, we can likely find you something else to work on!

@bIgBV

This comment has been minimized.

Copy link

bIgBV commented Mar 9, 2019

@djc of course!

@ustulation

This comment has been minimized.

Copy link
Contributor

ustulation commented Mar 12, 2019

Ah we are highly resource constraint just now and speeding through our various pending milestones so i doubt we will be able to invest time in quinn src code and QUIC ref docs to do it right away. If anyone wants to take it up pls do so. If we eventually come around to doing this and no one has done it by then, we'll ping ofc and let yous know. Thanks !

@Ralith

This comment has been minimized.

Copy link
Collaborator Author

Ralith commented Mar 12, 2019

Just for peoples' reference, this feature doesn't actually require close attention to the QUIC specification: an implementation is permitted to use whatever logic it likes to decide what to send first, and whatever interface it likes to expose this functionality to applications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.