From 8af2bd4ce9edb9bd170da79500e12767d210c35d Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Mon, 21 Jul 2025 11:24:55 -0700 Subject: [PATCH 1/3] Add the ANNOUNCE_INIT message. --- draft-lcurley-moq-lite.md | 59 ++++++++++++++++++++++++++++++++------- 1 file changed, 49 insertions(+), 10 deletions(-) diff --git a/draft-lcurley-moq-lite.md b/draft-lcurley-moq-lite.md index e21038b..2115d72 100644 --- a/draft-lcurley-moq-lite.md +++ b/draft-lcurley-moq-lite.md @@ -23,7 +23,7 @@ informative: --- abstract -Moq-Lite is designed to fanout live content from publishers to any number of subscribers across the internet. +moq-lite is designed to fanout live content from publishers to any number of subscribers across the internet. 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. While designed for media, it is an agnostic transport, allowing relays and CDNs to forward content without knowledge of codecs, containers, or encryption keys. @@ -193,7 +193,7 @@ Otherwise, the server replies with a SESSION_SERVER message to complete the hand Afterwards, both endpoints SHOULD send SESSION_UPDATE messages, such as after a significant change in the session bitrate. This draft's version is combined with the constant `0xff0dad00`. -For example, moq-lite-draft-03 is identified as `0xff0dad03`. +For example, moq-lite-draft-04 is identified as `0xff0dad04`. ### Announce @@ -201,18 +201,23 @@ A subscriber can open a Announce Stream to discover broadcasts matching a prefix This is OPTIONAL and the application can determine track paths out-of-band. The subscriber creates the stream with a ANNOUNCE_PLEASE message. -The publisher replies with ANNOUNCE messages for any matching broadcasts. +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. + +The ANNOUNCE_INIT message contains an array of all currently active broadcast paths encoded as a suffix. +Each path in ANNOUNCE_INIT can be treated as if it were an ANNOUNCE message with status `active`. + +After ANNOUNCE_INIT, the publisher sends ANNOUNCE messages for any changes also encoded as a suffix. Each ANNOUNCE message contains one of the following statuses: - `active`: a matching broadcast is available. - `ended`: a previously `active` broadcast is no longer available. -Each broadcast starts as `ended` and MUST alternate between `active` and `ended`. +Each broadcast starts as `ended` (unless included in ANNOUNCE_INIT) and MUST alternate between `active` and `ended`. 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`. When the stream is closed, the subscriber MUST assume that all broadcasts are now `ended`. Path prefix matching and equality is done on a byte-by-byte basis. -There MAY be multiple Announce Streams, potentially containing overlapping prefixes, that get their own copy of each ANNOUNCE. +There MAY be multiple Announce Streams, potentially containing overlapping prefixes, that get their own ANNOUNCE_INIT and ANNOUNCE messages. ## Subscribe A subscriber can open a Subscribe Stream to request a Track. @@ -315,14 +320,43 @@ ANNOUNCE_PLEASE Message { **Broadcast Path Prefix**: Indicate interest for any broadcasts with a path that starts with this prefix. -The publisher MAY close the stream with an error code if the prefix is too expansive. -Otherwise, the publisher SHOULD respond with an ANNOUNCE message for any matching broadcasts. +The publisher MUST respond with an ANNOUNCE_INIT message containing any matching and active broadcasts, followed by ANNOUNCE messages for any updates. + + + +## ANNOUNCE_INIT +A publisher sends an ANNOUNCE_INIT message immediately after receiving an ANNOUNCE_PLEASE to communicate all currently active broadcasts that match the requested prefix. +Only the suffixes are encoded on the wire, as the full path can be constructed by prepending the requested prefix. + +This message is useful to avoid race conditions, as ANNOUNCE_INIT does not trickle in like ANNOUNCE messages. +For example, an API server that wants to list the current participants could issue an ANNOUNCE_PLEASE and immediately return the ANNOUNCE_INIT response. +Without ANNOUNCE_INIT, the API server would have use a timer to wait until ANNOUNCE to guess when all ANNOUNCE messages have been recieved. + +~~~ +ANNOUNCE_INIT Message { + Suffix Count (i), + [ + Broadcast Path Suffix (s), + ]... +} +~~~ + +**Suffix Count**: +The number of active broadcast path suffixes that follow. +This can be 0. + +**Broadcast Path Suffix**: +Each suffix is combined with the broadcast path prefix from ANNOUNCE_PLEASE to form the full broadcast path. +This all currently active broadcasts matching the prefix. ## ANNOUNCE -A publisher sends an ANNOUNCE message to advertise a broadcast in response to an ANNOUNCE_PLEASE. -Only the suffix is encoded on the wire, the full path is constructed by prepending the requested prefix. +A publisher sends an ANNOUNCE message to advertise a change in broadcast availability. +Only the suffix is encoded on the wire, as the full path can constructed by prepending the requested prefix. + +The status is relative to the ANNOUNCE_INIT and all prior ANNOUNCE messages combined. +A client MUST ONLY toggle the status, encoded on the wire so the receiver doesn't need to maintain a set of active broadcasts. ~~~ ANNOUNCE Message { @@ -425,8 +459,13 @@ An application specific payload. A generic library or relay MUST NOT inspect or modify the contents unless otherwise negotiated. - # Appendix A: Changelog + +## moq-lite-01 +- Added ANNOUNCE_INIT. + + +# Appendix B: Upstream Differences A quick comparison of moq-lite and moq-transport-10: ## Deleted Messages From f4c0449b942da6fe397f3fe0c9400ec454487d86 Mon Sep 17 00:00:00 2001 From: "claude[bot]" <209825114+claude[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 18:39:21 +0000 Subject: [PATCH 2/3] Fix typos and improve ANNOUNCE_INIT specification MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix grammar errors: ''recieved'' → ''received'', improve sentence clarity - Clarify ''toggle status'' as ''alternate between status values'' - Add guidance to prevent duplicate suffixes in ANNOUNCE_INIT - Add implementation guidance for resource limits Co-authored-by: kixelated --- draft-lcurley-moq-lite.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/draft-lcurley-moq-lite.md b/draft-lcurley-moq-lite.md index 2115d72..25fad0e 100644 --- a/draft-lcurley-moq-lite.md +++ b/draft-lcurley-moq-lite.md @@ -321,6 +321,7 @@ ANNOUNCE_PLEASE Message { Indicate interest for any broadcasts with a path that starts with this prefix. The publisher MUST respond with an ANNOUNCE_INIT message containing any matching and active broadcasts, followed by ANNOUNCE messages for any updates. +Implementations SHOULD consider reasonable limits on the number of matching broadcasts to prevent resource exhaustion. @@ -330,7 +331,7 @@ Only the suffixes are encoded on the wire, as the full path can be constructed b This message is useful to avoid race conditions, as ANNOUNCE_INIT does not trickle in like ANNOUNCE messages. For example, an API server that wants to list the current participants could issue an ANNOUNCE_PLEASE and immediately return the ANNOUNCE_INIT response. -Without ANNOUNCE_INIT, the API server would have use a timer to wait until ANNOUNCE to guess when all ANNOUNCE messages have been recieved. +Without ANNOUNCE_INIT, the API server would have use a timer to wait until ANNOUNCE to guess when all ANNOUNCE messages have been received. ~~~ ANNOUNCE_INIT Message { @@ -344,19 +345,20 @@ ANNOUNCE_INIT Message { **Suffix Count**: The number of active broadcast path suffixes that follow. This can be 0. +A publisher SHOULD NOT include duplicate suffixes in a single ANNOUNCE_INIT message. **Broadcast Path Suffix**: Each suffix is combined with the broadcast path prefix from ANNOUNCE_PLEASE to form the full broadcast path. -This all currently active broadcasts matching the prefix. +This includes all currently active broadcasts matching the prefix. ## ANNOUNCE A publisher sends an ANNOUNCE message to advertise a change in broadcast availability. -Only the suffix is encoded on the wire, as the full path can constructed by prepending the requested prefix. +Only the suffix is encoded on the wire, as the full path can be constructed by prepending the requested prefix. The status is relative to the ANNOUNCE_INIT and all prior ANNOUNCE messages combined. -A client MUST ONLY toggle the status, encoded on the wire so the receiver doesn't need to maintain a set of active broadcasts. +A client MUST ONLY alternate between status values (from active to ended or vice versa), encoded on the wire so the receiver doesn't need to maintain a set of active broadcasts. ~~~ ANNOUNCE Message { From 94c958ccbb6e9b22b04fd5a927faa0fe1719b5e6 Mon Sep 17 00:00:00 2001 From: "claude[bot]" <209825114+claude[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 20:14:29 +0000 Subject: [PATCH 3/3] Strengthen ANNOUNCE_INIT duplicate suffix requirement and simplify status alternation sentence - Change ''SHOULD NOT'' to ''MUST NOT'' for duplicate suffixes in ANNOUNCE_INIT - Remove design justification from status alternation requirement for clarity Co-authored-by: kixelated --- draft-lcurley-moq-lite.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/draft-lcurley-moq-lite.md b/draft-lcurley-moq-lite.md index 25fad0e..d10ee01 100644 --- a/draft-lcurley-moq-lite.md +++ b/draft-lcurley-moq-lite.md @@ -345,7 +345,7 @@ ANNOUNCE_INIT Message { **Suffix Count**: The number of active broadcast path suffixes that follow. This can be 0. -A publisher SHOULD NOT include duplicate suffixes in a single ANNOUNCE_INIT message. +A publisher MUST NOT include duplicate suffixes in a single ANNOUNCE_INIT message. **Broadcast Path Suffix**: Each suffix is combined with the broadcast path prefix from ANNOUNCE_PLEASE to form the full broadcast path. @@ -358,7 +358,7 @@ A publisher sends an ANNOUNCE message to advertise a change in broadcast availab Only the suffix is encoded on the wire, as the full path can be constructed by prepending the requested prefix. The status is relative to the ANNOUNCE_INIT and all prior ANNOUNCE messages combined. -A client MUST ONLY alternate between status values (from active to ended or vice versa), encoded on the wire so the receiver doesn't need to maintain a set of active broadcasts. +A client MUST ONLY alternate between status values (from active to ended or vice versa). ~~~ ANNOUNCE Message {