-
Notifications
You must be signed in to change notification settings - Fork 86
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
Webtransport #183
Webtransport #183
Conversation
Hi again. We were just in a discussion about forking and implementing webtransport per #71 here over at https://github.com/AmbientRun What are your plans moving forwards and for the API? I would like to help with this as much as I can. Dropping the webtransport protocol draft for good measure https://datatracker.ietf.org/doc/html/draft-ietf-webtrans-http3/ Furthermore, there is an implementation in python and go already, so may serve as inspiration. python sample: https://github.com/GoogleChrome/samples/blob/gh-pages/webtransport/webtransport_server.py |
Hey @ten3roberts !!! Let's do this! I am familiar with aioquic, I came from that lib but had to abandon it because I encountered many leaks, you are right, as of now it is kind of the "reference" implementation for server side webtransport. So how about this: Implement the bare minimal changes in this MR so that we end up with a webtransport server that works as an echo server and we can call from https://security-union.github.io/yew-webtransport/ Yew WebTransport client. Right now I am looking at the new frame types that we have to add, tonight (Eastern time) I will break this down into tasks, we can tag team this project if you are interested 😄 btw I looked around the Ambient Run multiplayer game engine and it looks awesome!! @griffobeid just what we were talking about!! |
Thanks for starting this effort! I haven't kept track of the spec, so I wanted to ask: how much if it is a protocol on top of http3? Is it like websockets? Where it just uses some generic mechanism and otherwise is implemented on top (and this could be a separate library)? Maybe just a new setting, like we did with "extended connect" in h2? Or does it need a lot of integration? |
Hey @seanmonstar it is extremely similar to websockets. regarding settings, yes!! there are a couple new settings that the standard introduces like |
My idea is to have a After awaiting the Thoughts? @darioalessandro I could work on the uni and bi streams of the protocol. Are you going to add me as a contributor to your fork or what is the best way to go about it? |
On a further note: Should we expose a This goes on with my previous comment about the session struct, rather than baking *WebTransport` events into the other existing http/3 events such as requests. |
h3/src/connection.rs
Outdated
@@ -109,6 +109,12 @@ where | |||
settings | |||
.insert(SettingId::MAX_HEADER_LIST_SIZE, max_field_section_size) | |||
.map_err(|e| Code::H3_INTERNAL_ERROR.with_cause(e))?; | |||
settings.insert(SettingId::ENABLE_CONNECT_PROTOCOL, 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
attempt to send the webtransport headers on the server side
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to know the release time of the webtransport server. I am really looking forward to your project
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @redoriental thanks for reaching out!!
I encourage you to try out the h3-webtransport crate by installing it from this branch by adding this to your cargo dependencies:
futures = "0.3"
h3-webtransport = { git= "https://github.com/security-union/h3.git", rev = "f4e83fb9be28ef3ea99e5feed725550f0169e5c2" }
that way you wont have to wait for this PR to be merged.
We are currently working on separating h3 and h3-webtransport, and based on the ongoing discussions, it appears that this process may take some time.
The nature of open-source development can result in a slower pace, as contributors often have limited time to dedicate, and individuals from diverse backgrounds, opinions and cultures must come to a consensus on various objectives. However, rest assured that we will ultimately deliver a well-organized and efficient webtransport server!
|
Thanks, you too.
PS: My timezone is Z+0200 and will be working days between roughly 9am-5am |
|
Hi, I don't want to mix everything up here, but I would like to share my thoughts. I think it would be best to only implement http/3 in the h3 crate itself without extensions and only implement necessary parts to support extensions implemented in a separate crate (maybe For WebTransport there are 2 Protocols needed. Http-Datagrams and WebTransport itself. I think both could be in a separate crate each. I didn’t thought about this too much, so I maybe didn’t see some obvious problems with this proposal or there might be a better solution. |
Well, I think if there's another protocol upcoming, then that's the time we'd separate things and make a general extension mechanism. For now it's ok to include WebTransport but maybe behind a feature flag. |
Hey @Ruben2424 @inflation !! Thank you so much for your feedback. I discussed with @ten3roberts and we are happy to move this to a different crate after we get it to work and just including the bare minimal in this repo. also, thank you for mentioning #159 ! |
I can't thing of a reason to put traits behind a feature flag. But I do not have much experience with those traits so I might missed something. What do you think @seanmonstar |
@Ruben2424 I have now fixed all of your suggestions, moved config to a separate file, and fixed the msrv. Can we re-run the CI? Is there anything more or could this be merged? I am going to be available going onwards and will be able to fix and submit PR if any issue arises. |
Getting an error about section-3.1 not exiting in the duvet report, but the link works. Not sure if I've missed anything, I tried adding the link to the rfc in the |
It seems to be as the link is not an RFC editor link. I removed the only offending section link for now. The CI should now be all green |
Could we get a final CI and review? Is there anything more to address that I have missed? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all the great work!
In my opinion this is ready to merge now.
I would like to wait with merging until @seanmonstar approved this too.
Btw, if you have a specific recommendation to keep imports as private as possible let me know. I am also happy to keep webtransport as a module within h3 until we figure out how to split it. I would like to ship it as soon as possible without creating too much tech debt |
I have some early ideas about creating one or multiple Then only the traits and parameter types would need to be public and all of the internal structure could be private. But that are just some early ideas from my side that might not work well. In my opinion this should be explored after this PR was merged. |
Sgtm let's go 🙌🙌🙌 |
I migrated my project to this PR and it works great. I was using a quiche fork, but things started to get hairy without async support. Thank you for the hard work! One problem I'm running into is access to the underlying QUIC library. I'd like to use SendStream.set_priority and eventually Connection.congestion_state. Any suggestions? |
Hi @kixelated , You can try to |
Hey @Ruben2424, thanks for the tip. I'll make an issue for |
@seanmonstar can we have another review please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the work you've done since I last reviewed is fantastic. It feels much more resilient to newer changes, and that "extending" is opt-in is excellent. Really great work! And thank you Ruben, your reviews helped accomplish that too!
I left some final thoughts inline, just a couple this time. They follow the same theme: protect the library from needing breaking changes, so we can optimize and change internals later.
@seanmonstar I have now addressed your thoughts, could we run the CI once more? Let me know what you think |
Perhaps out of scope for the current PR, but would it be possible to later include a web transport client example to connect to the web transport server example? Something similar to the basic JavaScript client at https://googlechrome.github.io/samples/webtransport/client.html, as I'd like to add some additional system integration tests that don't always need a browser. Thanks for this awesome work! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ship it!
(Is there anything else before we click merge?)
@seanmonstar I think that there will be follow up PRs to polish this, imo this is good enough 🙌 |
* Initial Webtransport support (hyperium#183) Co-authored-by: Tei Roberts <[email protected]> Co-authored-by: Dario Lencina <[email protected]> * Fix `cargo doc` warning (hyperium#193) * chore: ensure no changes were missed from renamed files * fix: certificate generation and instructions * fix: feature snuck in during merge --------- Co-authored-by: Dario A Lencina-Talarico <[email protected]> Co-authored-by: Dario Lencina <[email protected]> Co-authored-by: Chrislearn Young <[email protected]>
Hi friends:
@ten3roberts and I are taking on adding this feature, we are not sure if we will keep it here or move it to a separate crate, but this works!!
I already added webtransport support to web apps written in rust via wasm-bindgen: rustwasm/wasm-bindgen#3344
Reddit demanded it: https://www.reddit.com/r/rust/comments/11rfes0/comment/jc8kyax/?utm_source=share&utm_medium=web2x&context=3
Work left