Replies: 1 comment 3 replies
-
|
@lminiero just wanted to share our implementation of using picoqcui for WT and raw QUIC here https://github.com/Quicr/libquicr/blob/main/src/transport_picoquic.cpp |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
before moving to the questions, a bit of context...
In the past year and a half, I've done a deep dive in QUIC, and as a result of that I ended up writing a new very homemade QUIC stack, on top of which I then scaffolded basic WebTransport support, and support for RoQ (RTP Over QUIC) and MoQ (Media Over QUIC), as real-time media was indeed what I wanted to play with. This ended up in a library I called imquic, which has been fine as a testbed for the functional aspects of the different protocols, but has always been quite frail at the foundation, because of my homemade QUIC stack.
I knew I had to switch that part out and leverage a much more robust implementation instead, and since so many people recommended picoquic, I decided to give it a go. I was expecting a steep learning curve, mostly because the APIs are not really documented, but the guidance provided in the documentation made it pretty easy to first build some prototypes to familiarize with the APIs, and then figure out how to integrate picoquic in my library with as little disruption as possible.
Long story short, I got to a point where I could remove my old existing stack and have higher "levels" rely on picoquic instead, all while keeping my library API pretty much untouched, but there are a few things that I'm still unsure about, mostly due to features my library provided that I'm not sure I can 100% duplicate via picoquic too. I'll mention a few different things, so if opening separate discussions for each of them is more appropriate, please do let me know.
-fPIC support
As I mentioned, I'm writing a library, which means that if I want to use picoquic, it needs to be built with
-fPIC. Is there any way to configure that using the existing build scripts without modifying the cmake file? At the moment, that's the way I do that, as I prepared a patch file for the purpose:but that's probably not a very robust way of doing that, since the cmake file may change in the future in ways that could break my patch.
CONNECTION_CLOSE reason
There doesn't seem to be a way to provide (or be notified about) a CONNECTION_CLOSE reason string, in picoquic. Is that intended, or am I missing some ways this can indeed be done? An inspection of the code didn't seem to unveil anything. While I understand reason strings are not strictly speaking necessary, I've found them useful so far, especially during MoQ interop sessions with other implementations where the same error code may be triggered by different root causes that a reason string may help identify.
WebTransport and protocols
I haven't done a deep dive of the WebTransport support provided by picoquic in picohttp yet. In order to keep things simple in this first integration, I've only done an integration at the QUIC level, and then for WebTransport I'm relying on the stack I had written in my own library instead, which means that when
h3is negotiated I have my own library code to deal with theSETTINGS,CONNECT,STREAMprefixes etc. I'd like in a second stage to be able to rely on picoquic's WebTransport layer too (especially considering it would give me generic HTTP/3 support as well, whereas now I only doCONNECT), but from what I see there are a couple of areas I'm not sure the existing code covers.My stack allows negotiating raw QUIC and WebTransport at the same time both for clients and for servers, while the documentation seems to only mention this possibility for servers. Is that something that is actually possible for clients too?
Another question is related to the ability to negotiate protocols in WebTransport, which is a feature MoQ actually relies on to negotiate the specific draft version that will be used on the wire. This WebTransport protocol negotiation happens via headers exchanged in the
CONNECTand its200, a bit like you currently negotiate ALPNs via TLS. Assuming picoquic doesn't have native support for this, is there enough flexibility to inject custom headers and process custom ones so that this can be dealt with at an application level?QLOG support
In my library, I implemented a support for QLOG that was meant to be transversal to the different layers you use in the connection. This means that, for the same connection and in the same QLOG file, you could log QUIC events, WebTransport events, and MoQ events by adding the related schemas and intertwining log items coming from different layers. Besides, QLOG generation supports both pure JSON (generating a JSON file at the end) and sequential JSON (where you write individual lines as they happen, for live inspection of the QLOG files).
Seeing how picoquic implements QLOG, it became clear I could not really do that anymore. I can still create my own QLOG files for layers I control myself (http3, roq, moq), but not for QUIC itself, since picoquic has its own optimized mechanism for collecting those. I guess my main questions about this are:
That's all
Apologies for the wall of text, but I wanted to try and collect all the feedback I had while it was still fresh in my mind, since just today I finished a first "working" integration where most things work as before. I plan to do more tests and studying in the next few days/weeks (especially considering I still haven't addressed how to handle, e.g., flow control or congestion from an application perspective), so in case I come up with more doubts I'll make sure to open a separate discussion for those.
Beta Was this translation helpful? Give feedback.
All reactions