WebRTC and QUIC: how hard can it be? @ RTC.ON 2024
LorenzoMiniero
355 views
58 slides
Sep 12, 2024
Slide 1 of 58
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
About This Presentation
Slides for my "WebRTC and QUIC: how hard can it be?" presentation at the RTC.ON 2024 event.
They describe my efforts studying and prototyping QUIC, to then move to WebTransport and ways to do real-time media over QUIC. It focuses specifically on RTP Over QUIC (RoQ) and Media Over QUIC (Mo...
Slides for my "WebRTC and QUIC: how hard can it be?" presentation at the RTC.ON 2024 event.
They describe my efforts studying and prototyping QUIC, to then move to WebTransport and ways to do real-time media over QUIC. It focuses specifically on RTP Over QUIC (RoQ) and Media Over QUIC (MoQ), documenting my attempts to get them to "talk" to WebRTC with the help of Janus.
Size: 6.02 MB
Language: en
Added: Sep 12, 2024
Slides: 58 pages
Slide Content
WebRTC and QUIC: how hard can it be?
Lorenzo Miniero RTC.ON @ Krakow September 12, 2024
Who am I?
Lorenzo Miniero
•Ph.D @ UniNA
•Chairman @ Meetecho
•Main author of Janus
Contacts and info
•[email protected]
•https://fosstodon.org/@lminiero
•https://www.meetecho.com
•https://lminiero.it
Just a few words on Meetecho
•Co-founded in 2009 as an academic spin-off
•University research efforts brought to the market
•Completely independent from the University
•Focus on real-time multimedia applications
•Strong perspective on standardization and open source
•Several activities
•Consulting services
•Commercial support and Janus licenses
•Streaming of live events (IETF, ACM, etc.)
•Proudly brewed in sunny Napoli, Italy
Nice recent picture from Napoli...
... with a few familiar faces!
QUIC has been on my mind for a while...
What’s QUIC and why does it matter?
What’s QUIC and why does it matter?
Learning about QUIC
•Spread over different RFCs
•https://datatracker.ietf.org/doc/html/rfc8999
•https://datatracker.ietf.org/doc/html/rfc9000
•https://datatracker.ietf.org/doc/html/rfc9001
•https://datatracker.ietf.org/doc/html/rfc9002
•Many related efforts
•https://datatracker.ietf.org/doc/html/rfc9114
•https://datatracker.ietf.org/doc/html/rfc9204
•https://datatracker.ietf.org/doc/html/rfc9221
•https://datatracker.ietf.org/doc/html/draft-ietf-webtrans-http3
(WebTransport)
•...
Learning about QUIC
•Spread over different RFCs
•https://datatracker.ietf.org/doc/html/rfc8999
•https://datatracker.ietf.org/doc/html/rfc9000
•https://datatracker.ietf.org/doc/html/rfc9001
•https://datatracker.ietf.org/doc/html/rfc9002
•Many related efforts
•https://datatracker.ietf.org/doc/html/rfc9114
•https://datatracker.ietf.org/doc/html/rfc9204
•https://datatracker.ietf.org/doc/html/rfc9221
•https://datatracker.ietf.org/doc/html/draft-ietf-webtrans-http3
(WebTransport)
•...
Learning about QUIC
•Many existing implementations
•https://github.com/ngtcp2/ngtcp2
•https://github.com/private-octopus/picoquic
•https://github.com/litespeedtech/lsquic
•https://github.com/aiortc/aioquic
•https://github.com/google/quiche
•https://github.com/cloudflare/quiche
•https://github.com/quic-go/quic-go
•...
•Incredibly useful blog posts!
•https://www.andy-pearce.com/blog/posts/2023/Mar/http3-in-practice-quic/
•https://www.andy-pearce.com/blog/posts/2023/Apr/http3-in-practice-http3/
Learning about QUIC
•Many existing implementations
•https://github.com/ngtcp2/ngtcp2
•https://github.com/private-octopus/picoquic
•https://github.com/litespeedtech/lsquic
•https://github.com/aiortc/aioquic
•https://github.com/google/quiche
•https://github.com/cloudflare/quiche
•https://github.com/quic-go/quic-go
•...
•Incredibly useful blog posts!
•https://www.andy-pearce.com/blog/posts/2023/Mar/http3-in-practice-quic/
•https://www.andy-pearce.com/blog/posts/2023/Apr/http3-in-practice-http3/
Implementing a QUIC stack from scratch
Spoiler alert: not that easy...
https://www.meetecho.com/blog/quic-journey/
Starting from the basics
•Started with a basic parser
•Familiarize with varint, connection IDs, QUIC transport parameters, header
protection, ACK, message framing, etc.
•Moved to a basic hardcoded server
•Figure out (levels of) encryption, new messages, STREAM, etc.
•Understanding the way buffering/chunking works for STREAM
•Generalized the server and started the client side
•Slightly different things clients and servers have to do
•Super simple demos againstaioquic
•DoQ (DNS over QUIC) demo apps very helpful
Starting from the basics
•Started with a basic parser
•Familiarize with varint, connection IDs, QUIC transport parameters, header
protection, ACK, message framing, etc.
•Moved to a basic hardcoded server
•Figure out (levels of) encryption, new messages, STREAM, etc.
•Understanding the way buffering/chunking works for STREAM
•Generalized the server and started the client side
•Slightly different things clients and servers have to do
•Super simple demos againstaioquic
•DoQ (DNS over QUIC) demo apps very helpful
Starting from the basics
•Started with a basic parser
•Familiarize with varint, connection IDs, QUIC transport parameters, header
protection, ACK, message framing, etc.
•Moved to a basic hardcoded server
•Figure out (levels of) encryption, new messages, STREAM, etc.
•Understanding the way buffering/chunking works for STREAM
•Generalized the server and started the client side
•Slightly different things clients and servers have to do
•Super simple demos againstaioquic
•DoQ (DNS over QUIC) demo apps very helpful
Starting from the basics
•Started with a basic parser
•Familiarize with varint, connection IDs, QUIC transport parameters, header
protection, ACK, message framing, etc.
•Moved to a basic hardcoded server
•Figure out (levels of) encryption, new messages, STREAM, etc.
•Understanding the way buffering/chunking works for STREAM
•Generalized the server and started the client side
•Slightly different things clients and servers have to do
•Super simple demos againstaioquic
•DoQ (DNS over QUIC) demo apps very helpful
Adding support for WebTransport
A simple interop demo
A simple interop demo
Having a look at RTP Over QUIC (RoQ)
•IETF is defining how to transport RTP on top of QUIC
•https://datatracker.ietf.org/doc/draft-ietf-avtcore-rtp-over-quic/
•Using QUIC, there are things we can (or have to) do differently
•No need for SRTP, QUIC is already encrypted
•Some feedback RTCP provides QUIC can already give us
•QUIC has integrated BWE as well
•We need framing for RTP packets (as in TCP)
•Multiplexing has interesting opportunities too
•Can multiplex multiple sessions over the same QUIC connection (Flow ID)
•Multiplexing can be done in different ways (DATAGRAM vs. STREAM(s))
Having a look at RTP Over QUIC (RoQ)
•IETF is defining how to transport RTP on top of QUIC
•https://datatracker.ietf.org/doc/draft-ietf-avtcore-rtp-over-quic/
•Using QUIC, there are things we can (or have to) do differently
•No need for SRTP, QUIC is already encrypted
•Some feedback RTCP provides QUIC can already give us
•QUIC has integrated BWE as well
•We need framing for RTP packets (as in TCP)
•Multiplexing has interesting opportunities too
•Can multiplex multiple sessions over the same QUIC connection (Flow ID)
•Multiplexing can be done in different ways (DATAGRAM vs. STREAM(s))
Having a look at RTP Over QUIC (RoQ)
•IETF is defining how to transport RTP on top of QUIC
•https://datatracker.ietf.org/doc/draft-ietf-avtcore-rtp-over-quic/
•Using QUIC, there are things we can (or have to) do differently
•No need for SRTP, QUIC is already encrypted
•Some feedback RTCP provides QUIC can already give us
•QUIC has integrated BWE as well
•We need framing for RTP packets (as in TCP)
•Multiplexing has interesting opportunities too
•Can multiplex multiple sessions over the same QUIC connection (Flow ID)
•Multiplexing can be done in different ways (DATAGRAM vs. STREAM(s))
A step further: Media Over QUIC (MoQ)
•Low-latency media delivery solution for ingest/distribution of media
•https://datatracker.ietf.org/group/moq/about/
•Publisher/Subscriber kind of approach
•Possible roles arePublisher,SubscriberandPubSub
•Not that far from a cascaded SFU, if you’re familiar with WebRTC
•MoQ transport on top of QUIC or WebTransport
•Encryption via QUIC, but E2EE encryption possible too
•Independent of media formats (can transport anything media)
•Support for relays, caching and replication points
A step further: Media Over QUIC (MoQ)
•Low-latency media delivery solution for ingest/distribution of media
•https://datatracker.ietf.org/group/moq/about/
•Publisher/Subscriber kind of approach
•Possible roles arePublisher,SubscriberandPubSub
•Not that far from a cascaded SFU, if you’re familiar with WebRTC
•MoQ transport on top of QUIC or WebTransport
•Encryption via QUIC, but E2EE encryption possible too
•Independent of media formats (can transport anything media)
•Support for relays, caching and replication points
A step further: Media Over QUIC (MoQ)
•Low-latency media delivery solution for ingest/distribution of media
•https://datatracker.ietf.org/group/moq/about/
•Publisher/Subscriber kind of approach
•Possible roles arePublisher,SubscriberandPubSub
•Not that far from a cascaded SFU, if you’re familiar with WebRTC
•MoQ transport on top of QUIC or WebTransport
•Encryption via QUIC, but E2EE encryption possible too
•Independent of media formats (can transport anything media)
•Support for relays, caching and replication points
The simplest architecture diagram
Something a bit more complex
Objects, Groups and Tracks
Implementation status
•Different implementations (sometimes different MoQT versions)
•https://github.com/kixelated/moq-rs
•https://github.com/facebookexperimental/moxygen
•https://github.com/Quicr/libquicr
•https://github.com/facebookexperimental/moq-encoder-player
•https://github.com/kota-yata/media-over-quic-experiment
•https://github.com/mengelbart/gst-moq-app
•Regular interop tests as part of the MoQ WG
•Current interop matrix discussed at IETF 120
•No report sent for my implementation yet (hopefully soon!)
Implementation status
•Different implementations (sometimes different MoQT versions)
•https://github.com/kixelated/moq-rs
•https://github.com/facebookexperimental/moxygen
•https://github.com/Quicr/libquicr
•https://github.com/facebookexperimental/moq-encoder-player
•https://github.com/kota-yata/media-over-quic-experiment
•https://github.com/mengelbart/gst-moq-app
•Regular interop tests as part of the MoQ WG
•Current interop matrix discussed at IETF 120
•No report sent for my implementation yet (hopefully soon!)
MoQ @ IETF 120
MoQ @ IETF 120
MoQ @ IETF 120
Prototyping MoQ
•Integrating MoQ (both -03 and -04) in my test library itself
•Leverages library core and events
•Exposes MoQ-specific APIs to end user
•Different demo applications for testing
•imquic-moq-pub: basic MoQ publisher (same as Luke’smoq-clock)
•imquic-moq-sub: basic MoQ subscriber (different formats)
•imquic-moq-relay: relay stub (doesn’t do anything meaningful yet)
•Janus QUIC plugin: gatewaying of MoQ pub/sub to WebRTC (using LOC)
•A few interop tests for validation
•Luke’smoq-rs(clock, relay, subscribing to MP4 video)
•Meta’s implementations (using relay, translating encoder/sender)
Prototyping MoQ
•Integrating MoQ (both -03 and -04) in my test library itself
•Leverages library core and events
•Exposes MoQ-specific APIs to end user
•Different demo applications for testing
•imquic-moq-pub: basic MoQ publisher (same as Luke’smoq-clock)
•imquic-moq-sub: basic MoQ subscriber (different formats)
•imquic-moq-relay: relay stub (doesn’t do anything meaningful yet)
•Janus QUIC plugin: gatewaying of MoQ pub/sub to WebRTC (using LOC)
•A few interop tests for validation
•Luke’smoq-rs(clock, relay, subscribing to MP4 video)
•Meta’s implementations (using relay, translating encoder/sender)
Prototyping MoQ
•Integrating MoQ (both -03 and -04) in my test library itself
•Leverages library core and events
•Exposes MoQ-specific APIs to end user
•Different demo applications for testing
•imquic-moq-pub: basic MoQ publisher (same as Luke’smoq-clock)
•imquic-moq-sub: basic MoQ subscriber (different formats)
•imquic-moq-relay: relay stub (doesn’t do anything meaningful yet)
•Janus QUIC plugin: gatewaying of MoQ pub/sub to WebRTC (using LOC)
•A few interop tests for validation
•Luke’smoq-rs(clock, relay, subscribing to MP4 video)
•Meta’s implementations (using relay, translating encoder/sender)
Next steps
•ALOTstill to do
•QUIC stack itself is incomplete (took some shortcuts to get here)
•Retransmissions and flow/congestion control still missing
•Keep up to date with MoQ
•Working group isveryactive
•Specification changes often, thanks to feedback from implementations
•Release all this as open source, of course
•The library needs improvement and documentation
•Hopefully we’ll get there soon, stay tuned for that!
•Testing testing testing!
•Interop (for everything, from QUIC to MoQ) will be fundamental
Next steps
•ALOTstill to do
•QUIC stack itself is incomplete (took some shortcuts to get here)
•Retransmissions and flow/congestion control still missing
•Keep up to date with MoQ
•Working group isveryactive
•Specification changes often, thanks to feedback from implementations
•Release all this as open source, of course
•The library needs improvement and documentation
•Hopefully we’ll get there soon, stay tuned for that!
•Testing testing testing!
•Interop (for everything, from QUIC to MoQ) will be fundamental
Next steps
•ALOTstill to do
•QUIC stack itself is incomplete (took some shortcuts to get here)
•Retransmissions and flow/congestion control still missing
•Keep up to date with MoQ
•Working group isveryactive
•Specification changes often, thanks to feedback from implementations
•Release all this as open source, of course
•The library needs improvement and documentation
•Hopefully we’ll get there soon, stay tuned for that!
•Testing testing testing!
•Interop (for everything, from QUIC to MoQ) will be fundamental
Next steps
•ALOTstill to do
•QUIC stack itself is incomplete (took some shortcuts to get here)
•Retransmissions and flow/congestion control still missing
•Keep up to date with MoQ
•Working group isveryactive
•Specification changes often, thanks to feedback from implementations
•Release all this as open source, of course
•The library needs improvement and documentation
•Hopefully we’ll get there soon, stay tuned for that!
•Testing testing testing!
•Interop (for everything, from QUIC to MoQ) will be fundamental