Skip to content

Commit d00301f

Browse files
committed
Last touch ups.
1 parent aeb7f5a commit d00301f

1 file changed

Lines changed: 35 additions & 32 deletions

File tree

draft-lcurley-moq-transfork.md

Lines changed: 35 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,21 @@ The draft supports multiple different approaches, but it does so by leaving impo
4848
In our RUSH to standardize a protocol, the QUICR solutions have led to WARP in ideals.
4949

5050
This fork is meant to be constructive; an alternative vision.
51-
However, we've been arguing about some of these issues for years now and I don't expect that will change any time soon.
51+
We've been arguing about some of these issues for years now and I don't expect that will change any time soon.
5252
I'd like to try leading by example, demonstrating that it's possible to simplify the protocol and still support a documented set of use-cases.
5353

5454
Here's an overview of the notable differences between MoqTransport and MoqTransfork:
5555

5656
## Object Model
57-
The object model is an abstraction exposed to the application outlining how the transport is used.
57+
The object model is an abstraction exposed to the application, forming the basis of the transport API.
5858

59-
The MoqTransport object model vaguely maps to media concepts, where `group = GoP` and `object = frame`.
60-
However, this causes my biggest complaint with the draft: the properties of the object model change dynamically based on the publisher's "delivery preference" as there's no agreed upon way to utilize QUIC.
61-
This creates a lot of complexity and edge cases as the meaning of a track/group/object will subtly change at runtime based on the application.
59+
The MoqTransport object model vaguely maps to media concepts, where a Group is a Video GoP and an Object is a Video Frame.
60+
However, there's no agreed upon way to utilize QUIC, leading to the compromise that the publisher chooses a "delivery preference" for each track.
61+
As a the result the properties of the object model change dynamically at runtime, as the properties of a QUIC stream (or datagram) are moved between a track, group, or object.
62+
The number of permutations quickly becomes unmanageable and every conversion has to be caveated with "when using a stream per X".
6263

6364
The MoqTransfork object model is instead static and maps directly to QUIC.
64-
A Group is always an ordered set of bytes, although it may be served via a QUIC stream or datagram depending on the subscription.
65+
A Group is always an ordered set of bytes, served via a QUIC stream or datagram depending on the subscription.
6566
This simplification is able to support all of the documented use-cases; see the Appendix.
6667

6768
## Prioritization
@@ -80,10 +81,10 @@ However when there are multiple conflicting viewers, then a relay should use the
8081
At the core of any transport are control messages.
8182

8283
MoqTransport control messages are fine, but have the potential for head-of-line blocking as they share a single stream.
83-
There's also just a lot of messages for errors and state transitions such as `UNSUBSCRIBE`, `SUBSCRIBE_ERROR`, `SUBSCRIBE_DONE`, etc.
84+
There's also just a lot of messages for state transitions such as `UNSUBSCRIBE`, `SUBSCRIBE_ERROR`, `SUBSCRIBE_DONE`, etc.
8485

85-
MoqTransfork continues the trend of leveraging QUIC with separate control streams, such as one stream per subscription.
86-
These control streams are terminated when endpoints close or reset (including an error code) the stream, directly leveraging QUIC's stream state machine.
86+
MoqTransfork continues the trend of leveraging QUIC with separate control streams, like one stream per subscription.
87+
These control streams are terminated when endpoints close or reset (including an error code) the stream in order to directly leverage QUIC's stream state machine.
8788
This removes any messages that start with `UN` or end with `_DONE`, `_ERROR`, `_RESET`, etc.
8889

8990
## Byte Offsets
@@ -94,7 +95,7 @@ This is an okay approach, however it results in redownloading partial objects an
9495

9596
MoqTransfork instead utilizes FETCH to serve incomplete Groups starting at a byte offset.
9697
QUIC streams are tail dropped when reset so there's no need for a more complex mechanism.
97-
This also allows an advanced relay to forward STREAM frames directly.
98+
This means a relay doesn't need to parse frame/object boundaries and it can even forward STREAM frames out-of-order.
9899

99100
## Datagrams
100101
Datagrams are useful when payloads are small, overhead is important, and the desired latency is below the RTT.
@@ -104,13 +105,13 @@ This can work for real-time viewers but results in a poor experience for higher
104105

105106
MoqTransfork instead lets the subscriber indicate if it wants to receive a subscription via streams or datagrams.
106107
Datagrams should only be used when Groups are smaller than the MTU and the desired latency is smaller than the RTT.
107-
If so, Groups via datagrams may be silently dropped for whatever reason, saving a few bytes on the wire (~10 per Group) which is desirable for audio use-cases.
108+
In doing so, Groups sent via datagrams may be silently dropped for whatever reason, saving a few bytes on the wire (~10 per Group) which is desirable for audio use-cases.
108109

109110
## Use-Cases
110-
It's boring, but you should write down what you're trying to accomplish before you start writing a protocol.
111+
It's boring, but you should write down what you're trying to accomplish before you start designing a protocol especially by committee.
111112

112113
MoqTransport is intentionally vague and doesn't mention any use-cases.
113-
This has caused unnecessary or incomplete features, as it's impossible to argue against a feature or suggest alternatives "some application might need it".
114+
This has caused unnecessary or incomplete features, as it's impossible to argue against a feature or suggest alternatives when "some application might need it".
114115

115116
MoqTransfork instead includes an Appendix contains a number of media use-cases and recommended approaches that are by no means required or comprehensive.
116117
This also serves to illustrate the careful layering of Media over QUIC which has otherwise not been documented.
@@ -144,7 +145,6 @@ Each subscription is scoped to a single Track and starts/ends at a Group boundar
144145
A subscriber chooses the priority of each subscription, dictating which Track arrives first during congestion.
145146

146147
There is currently no way to discover tracks within a broadcast; it must be negotiated out-of-band.
147-
For example, a `catalog` track that lists all other tracks and their association.
148148

149149
### Group
150150
A Group is an ordered stream of Frames within a Track.
@@ -157,7 +157,9 @@ A Frame is a payload of bytes within a Group.
157157

158158
Frames currently only provides framing, hence the name.
159159
Framing is useful in some applications but can also be redundant or increase memory usage, as the size must be known upfront.
160-
This will be removed in a future version of the draft, delegated to a higher layer.
160+
161+
Frame will be removed in a future version of the draft and delegated to a higher layer.
162+
However, it's useful when being compared to an Object in MoqTransport.
161163

162164
## Streams vs Datagrams
163165
MoqTransfork supports two primary methods of transmitting data: QUIC streams and datagrams.
@@ -172,7 +174,6 @@ Each Group MUST have an upfront size that is smaller than network MTU, limiting
172174
These restrictions allow the Group to be delivered with less overhead than a stream (~10 bytes per group) which is significant for some real-time use-cases.
173175

174176
A subscriber is responsible for choosing if a subscription is served via streams or datagrams.
175-
The publisher MUST support both modes for all tracks.
176177

177178
# Workflow
178179
This section outlines the flow of messages within a MoqTransfork session.
@@ -187,7 +188,7 @@ The client opens the Session Stream and sends a SESSION_CLIENT message and the s
187188
## Bidirectional Streams
188189
Bidirectional streams are primarily used for control streams.
189190

190-
Note that QUIC bidirectional streams have both a send and recv direction can be closed or reset (with an error code) independently.
191+
Note that QUIC bidirectional streams have both a send and recvieve direction that can be closed or reset (with an error code) independently.
191192
This is used to indicate completion or errors respectively.
192193

193194
The first byte of each stream indicates the Stream Type.
@@ -224,7 +225,7 @@ The session remains active until the Session Stream is closed or reset by either
224225

225226
### Announce
226227
A publisher can open an Announce Stream to advertise a broadcast.
227-
This is optional, as the subscriber can determine the broadcast name out-of-band.
228+
This is optional, as the application determine the broadcast name out-of-band.
228229

229230
The publisher MUST start the stream with an ANNOUNCE message.
230231
The subscriber MUST reply with an ANNOUNCE_OK message or reset the stream.
@@ -238,29 +239,22 @@ A subscriber can open a Subscribe Stream to request a named track within a broad
238239
The Stream Type indicates if the subscription is served via QUIC streams or datagrams.
239240

240241
The SUBSCRIBE message contains a requested Broadcast and Track.
241-
It also contains prioritization information and a range of Groups, which MAY be updated by the subscriber via a SUBSCRIBE_UPDATE message.
242+
It also contains prioritization information and a range of Groups, all of which MAY be updated by the subscriber via a SUBSCRIBE_UPDATE message.
242243
The subscription is active until the either endpoint closes or resets the stream.
243244

244245
The subscriber MUST start a Info Stream with a SUBSCRIBE message followed by any number SUBSCRIBE_UPDATE messages.
245-
The publisher MUST reply with an INFO message followed by any number of GROUP_DROPPED messages (streams only), or reset the stream.
246+
The publisher MUST reply with an INFO message followed by any number of GROUP_DROPPED messages (streams only).
247+
A publisher MAY reset the stream at any point if it is unable to serve the subscription.
246248

247-
**When QUIC streams are used**, the publisher MUST transmit a complete Group Stream or a GROUP_DROPPED message for each Group within the range.
249+
**When QUIC streams are used**, the publisher MUST transmit a complete Group Stream or a GROUP_DROPPED message for each Group within the subscription range.
248250
This means the publisher MUST transmit a GROUP_DROPPED if a Group Stream is reset.
249251
The subscriber SHOULD close the subscription when all GROUP and GROUP_DROP messages have been received, and the publisher MAY close the subscription after all messages have been acknowledged.
250252

251-
**When QUIC datagrams are used**, the publisher MAY transmit a Group/Frame Datagram for each Group within the range.
253+
**When QUIC datagrams are used**, the publisher MAY transmit a Group/Frame Datagram for each Group within the subscription range.
252254
The publisher MUST NOT transmit a GROUP_DROPPED message.
253255
The publisher SHOULD close the subscription after all Group/Frame Datagrams have been transmitted, and the subscriber MAY close the subscription after all Groups have been received.
254256

255257

256-
### Info
257-
A subscriber can open an Info Stream to request information about a track.
258-
This is not necessary for a subscription, as SUBSCRIBE will trigger an INFO reply.
259-
260-
The subscriber MUST start the stream with a INFO_REQUEST message.
261-
The publisher MUST reply with an INFO message or reset the stream.
262-
Both endpoints MUST close the stream afterwards.
263-
264258
### Fetch
265259
A subscriber can open a Fetch Stream to receive a single Group at a specified offset.
266260
This is primarily used to recover from an abrupt stream termination, causing the truncation of a Group.
@@ -271,6 +265,15 @@ The publisher MUST reply with a GROUP message followed by the rest of a Group St
271265
The fetch is active until both endpoints close the stream, or either endpoint resets the stream.
272266

273267

268+
### Info
269+
A subscriber can open an Info Stream to request information about a track.
270+
This is not often necessary as SUBSCRIBE will trigger an INFO reply.
271+
272+
The subscriber MUST start the stream with a INFO_REQUEST message.
273+
The publisher MUST reply with an INFO message or reset the stream.
274+
Both endpoints MUST close the stream afterwards.
275+
276+
274277
## Unidirectional
275278
Unidirectional streams are used for subscription data.
276279

@@ -315,7 +318,7 @@ This saves 1-2 bytes by skipping the FRAME header when there's a only single Fra
315318
This section covers the encoding of each message.
316319

317320
Note that none of these message have a type identifier.
318-
Valid messages are determined by the stream type and state.
321+
The message is determined by the stream type and the current state.
319322

320323
## SESSION_CLIENT
321324
TODO copy from moq-transport.
@@ -534,7 +537,7 @@ FRAME Message {
534537

535538
**Payload**:
536539
An application specific payload.
537-
A MoqTransfork library MUST NOT inspect or modify the contents unless otherwise negotiated.
540+
A generic library or relay MUST NOT inspect or modify the contents unless otherwise negotiated.
538541

539542

540543
# Appendix: Media Use-Cases

0 commit comments

Comments
 (0)