You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: draft-lcurley-moq-lite.md
+51-10Lines changed: 51 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ informative:
23
23
24
24
--- abstract
25
25
26
-
Moq-Lite is designed to fanout live content from publishers to any number of subscribers across the internet.
26
+
moq-lite is designed to fanout live content from publishers to any number of subscribers across the internet.
27
27
Liveliness is achieved by using QUIC to prioritize the most important content, potentially starving or dropping other content, to avoid head-of-line blocking while respecting encoding dependencies.
28
28
While designed for media, it is an agnostic transport, allowing relays and CDNs to forward content without knowledge of codecs, containers, or encryption keys.
29
29
@@ -193,26 +193,31 @@ Otherwise, the server replies with a SESSION_SERVER message to complete the hand
193
193
Afterwards, both endpoints SHOULD send SESSION_UPDATE messages, such as after a significant change in the session bitrate.
194
194
195
195
This draft's version is combined with the constant `0xff0dad00`.
196
-
For example, moq-lite-draft-03 is identified as `0xff0dad03`.
196
+
For example, moq-lite-draft-04 is identified as `0xff0dad04`.
197
197
198
198
199
199
### Announce
200
200
A subscriber can open a Announce Stream to discover broadcasts matching a prefix.
201
201
This is OPTIONAL and the application can determine track paths out-of-band.
202
202
203
203
The subscriber creates the stream with a ANNOUNCE_PLEASE message.
204
-
The publisher replies with ANNOUNCE messages for any matching broadcasts.
204
+
The publisher replies with an ANNOUNCE_INIT message containing all currently active broadcasts that currently match the prefix, followed by ANNOUNCE messages for any changes.
205
+
206
+
The ANNOUNCE_INIT message contains an array of all currently active broadcast paths encoded as a suffix.
207
+
Each path in ANNOUNCE_INIT can be treated as if it were an ANNOUNCE message with status `active`.
208
+
209
+
After ANNOUNCE_INIT, the publisher sends ANNOUNCE messages for any changes also encoded as a suffix.
205
210
Each ANNOUNCE message contains one of the following statuses:
206
211
207
212
- `active`: a matching broadcast is available.
208
213
- `ended`: a previously `active` broadcast is no longer available.
209
214
210
-
Each broadcast starts as `ended` and MUST alternate between `active` and `ended`.
215
+
Each broadcast starts as `ended` (unless included in ANNOUNCE_INIT) and MUST alternate between `active` and `ended`.
211
216
The subscriber MUST reset the stream if it receives a duplicate status, such as two `active` statuses in a row or an `ended` without `active`.
212
217
When the stream is closed, the subscriber MUST assume that all broadcasts are now `ended`.
213
218
214
219
Path prefix matching and equality is done on a byte-by-byte basis.
215
-
There MAY be multiple Announce Streams, potentially containing overlapping prefixes, that get their own copy of each ANNOUNCE.
220
+
There MAY be multiple Announce Streams, potentially containing overlapping prefixes, that get their own ANNOUNCE_INIT and ANNOUNCE messages.
216
221
217
222
## Subscribe
218
223
A subscriber can open a Subscribe Stream to request a Track.
@@ -315,14 +320,45 @@ ANNOUNCE_PLEASE Message {
315
320
**Broadcast Path Prefix**:
316
321
Indicate interest for any broadcasts with a path that starts with this prefix.
317
322
318
-
The publisher MAY close the stream with an error code if the prefix is too expansive.
319
-
Otherwise, the publisher SHOULD respond with an ANNOUNCE message for any matching broadcasts.
323
+
The publisher MUST respond with an ANNOUNCE_INIT message containing any matching and active broadcasts, followed by ANNOUNCE messages for any updates.
324
+
Implementations SHOULD consider reasonable limits on the number of matching broadcasts to prevent resource exhaustion.
325
+
326
+
327
+
328
+
## ANNOUNCE_INIT
329
+
A publisher sends an ANNOUNCE_INIT message immediately after receiving an ANNOUNCE_PLEASE to communicate all currently active broadcasts that match the requested prefix.
330
+
Only the suffixes are encoded on the wire, as the full path can be constructed by prepending the requested prefix.
331
+
332
+
This message is useful to avoid race conditions, as ANNOUNCE_INIT does not trickle in like ANNOUNCE messages.
333
+
For example, an API server that wants to list the current participants could issue an ANNOUNCE_PLEASE and immediately return the ANNOUNCE_INIT response.
334
+
Without ANNOUNCE_INIT, the API server would have use a timer to wait until ANNOUNCE to guess when all ANNOUNCE messages have been received.
335
+
336
+
~~~
337
+
ANNOUNCE_INIT Message {
338
+
Suffix Count (i),
339
+
[
340
+
Broadcast Path Suffix (s),
341
+
]...
342
+
}
343
+
~~~
344
+
345
+
**Suffix Count**:
346
+
The number of active broadcast path suffixes that follow.
347
+
This can be 0.
348
+
A publisher MUST NOT include duplicate suffixes in a single ANNOUNCE_INIT message.
349
+
350
+
**Broadcast Path Suffix**:
351
+
Each suffix is combined with the broadcast path prefix from ANNOUNCE_PLEASE to form the full broadcast path.
352
+
This includes all currently active broadcasts matching the prefix.
320
353
321
354
322
355
323
356
## ANNOUNCE
324
-
A publisher sends an ANNOUNCE message to advertise a broadcast in response to an ANNOUNCE_PLEASE.
325
-
Only the suffix is encoded on the wire, the full path is constructed by prepending the requested prefix.
357
+
A publisher sends an ANNOUNCE message to advertise a change in broadcast availability.
358
+
Only the suffix is encoded on the wire, as the full path can be constructed by prepending the requested prefix.
359
+
360
+
The status is relative to the ANNOUNCE_INIT and all prior ANNOUNCE messages combined.
361
+
A client MUST ONLY alternate between status values (from active to ended or vice versa).
326
362
327
363
~~~
328
364
ANNOUNCE Message {
@@ -425,8 +461,13 @@ An application specific payload.
425
461
A generic library or relay MUST NOT inspect or modify the contents unless otherwise negotiated.
426
462
427
463
428
-
429
464
# Appendix A: Changelog
465
+
466
+
## moq-lite-01
467
+
- Added ANNOUNCE_INIT.
468
+
469
+
470
+
# Appendix B: Upstream Differences
430
471
A quick comparison of moq-lite and moq-transport-10:
0 commit comments