From 3b4af48490c13591c5f60d7b6f0a8561d42a3071 Mon Sep 17 00:00:00 2001 From: Mike English Date: Wed, 27 Nov 2024 10:58:43 -0500 Subject: [PATCH 1/8] First stab at a joining FETCH using new JOIN message --- draft-ietf-moq-transport.md | 56 +++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/draft-ietf-moq-transport.md b/draft-ietf-moq-transport.md index 7a38ff18c..828e77afd 100644 --- a/draft-ietf-moq-transport.md +++ b/draft-ietf-moq-transport.md @@ -1462,6 +1462,62 @@ A publisher MUST send fetched groups in group order, either ascending or descending. Within each group, objects are sent in Object ID order; subgroup ID is not used for ordering. +## JOIN + +A JOIN is a variant of FETCH that joins together with a SUBSCRIBE to provide a contiguous non-overlapping request for objects before and after LatestGroup LatestObject as determined by the receiving publisher. + +The format of JOIN is as follows: + +~~~ +JOIN Message { + Type (i) = 0x16, + Length (i), + Subscribe ID (i), + Subscriber Priority (8), + Group Order (8), + PreviousGroups (i), + Number of Parameters (i), + Parameters (..) ... +} +~~~ +{: #moq-transport-fetch-format title="MOQT JOIN Message"} + +* Subscribe ID: The Subscribe ID identifies a given fetch request. Subscribe ID +is a variable length integer that MUST be unique and monotonically increasing +within a session. + +* Track Namespace: Identifies the namespace of the track as defined in +({{track-name}}). + +* Track Name: Identifies the track name as defined in ({{track-name}}). + +* Subscriber Priority: Specifies the priority of a fetch request relative to +other subscriptions or fetches in the same session. Lower numbers get higher +priority. See {{priorities}}. + +* Group Order: Allows the subscriber to request Objects be delivered in +Ascending (0x1) or Descending (0x2) order by group. See {{priorities}}. +A value of 0x0 indicates the original publisher's Group Order SHOULD be +used. Values larger than 0x2 are a protocol error. + +* PreviousGroups: The number of groups prior to LatestGroup as determined for the SUBSCRIBE to FETCH + +* Parameters: The parameters are defined in {{version-specific-params}}. + +A publisher which receives a JOIN message should treat it as a FETCH with the following fields dynamically determined from the corresponding SUBSCRIBE: + +* Track Namespace: Same as in the corresponding SUBSCRIBE + +* Track Name: Same as in the corresponding SUBSCRIBE + +* StartGroup: LatestGroup as determined for the SUBSCRIBE minus PreviousGroups from the JOIN + +* StartObject: + +* EndGroup: LatestGroup as determined for the SUBSCRIBE minus 1 + +* EndObject: LatestObject as determined for the SUBSCRIBE minus 1 + ## FETCH_CANCEL {#message-fetch-cancel} A subscriber issues a `FETCH_CANCEL` message to a publisher indicating it is no From b4d9f306ef057cffafbaad4d952fa5a38cf540ad Mon Sep 17 00:00:00 2001 From: Mike English Date: Wed, 27 Nov 2024 11:52:25 -0500 Subject: [PATCH 2/8] Update draft-ietf-moq-transport.md Some notes on direction based on discussion with @wilaw --- draft-ietf-moq-transport.md | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/draft-ietf-moq-transport.md b/draft-ietf-moq-transport.md index 828e77afd..62ee7eda6 100644 --- a/draft-ietf-moq-transport.md +++ b/draft-ietf-moq-transport.md @@ -1475,13 +1475,15 @@ JOIN Message { Subscribe ID (i), Subscriber Priority (8), Group Order (8), - PreviousGroups (i), + Previous Group Count (i), Number of Parameters (i), Parameters (..) ... } ~~~ {: #moq-transport-fetch-format title="MOQT JOIN Message"} +* FetchType: + * Subscribe ID: The Subscribe ID identifies a given fetch request. Subscribe ID is a variable length integer that MUST be unique and monotonically increasing within a session. @@ -1500,11 +1502,11 @@ Ascending (0x1) or Descending (0x2) order by group. See {{priorities}}. A value of 0x0 indicates the original publisher's Group Order SHOULD be used. Values larger than 0x2 are a protocol error. -* PreviousGroups: The number of groups prior to LatestGroup as determined for the SUBSCRIBE to FETCH +* Previous Group Count: The number of groups to FETCH prior to the StartGroup of the corresponding SUBSCRIBE * Parameters: The parameters are defined in {{version-specific-params}}. -A publisher which receives a JOIN message should treat it as a FETCH with the following fields dynamically determined from the corresponding SUBSCRIBE: +A publisher which receives a FETCH message with a FetchType of 0x1 should treat it as a FETCH with the following fields dynamically determined from the corresponding SUBSCRIBE: * Track Namespace: Same as in the corresponding SUBSCRIBE @@ -1512,11 +1514,18 @@ A publisher which receives a JOIN message should treat it as a FETCH with the fo * StartGroup: LatestGroup as determined for the SUBSCRIBE minus PreviousGroups from the JOIN -* StartObject: +* StartObject: Always 0 + +* EndGroup: StartGroup of the corresponding SUBSCRIBE minus 1 (double check minus 1) -* EndGroup: LatestGroup as determined for the SUBSCRIBE minus 1 +* EndObject: StartObject of the corresponding SUBSCRIBE minus 1 (double check minus 1) -* EndObject: LatestObject as determined for the SUBSCRIBE minus 1 +TODO: + - merge with FETCH using FetchType + - table defining FetchTypes (Look at Subscribe FilterType for conventions) + - Error for Subscribe ID does not exist with FetchType 0x1 + - shift priority up into shared fields + - omit group order (for our first proposed FetchType) ## FETCH_CANCEL {#message-fetch-cancel} From dc5e3c14eff349e75903f515bf1348011d234643 Mon Sep 17 00:00:00 2001 From: Mike English Date: Tue, 3 Dec 2024 13:32:52 -0500 Subject: [PATCH 3/8] WIP --- draft-ietf-moq-transport.md | 115 ++++++++++++++++-------------------- 1 file changed, 50 insertions(+), 65 deletions(-) diff --git a/draft-ietf-moq-transport.md b/draft-ietf-moq-transport.md index 62ee7eda6..4b9649e87 100644 --- a/draft-ietf-moq-transport.md +++ b/draft-ietf-moq-transport.md @@ -1382,6 +1382,20 @@ objects within a track. The publisher responding to a FETCH is responsible for r all available Objects. If there are gaps between Objects, the publisher omits them from the fetch response. All omitted objects have status Object Not Available. +**Fetch Types** + +There are two types of Fetches: + +Standalone Fetch (0x1) : A Fetch of Objects performed indepdently of any Subscribe. + +Joining Fetch (0x2) : A Fetch joined together with a Subscribe. A Joining Fetch +shares the same Subscribe ID as an already-sent Subscribe. A publisher receiving a Joining +Fetch should use properties of the associated Subscribe to determine the Track Namespace, +Track, StartGroup, StartObject, EndGroup, and EndObject for the Joining Fetch such that it is +contiguous with the associated Subscribe and begins Previous Group Count prior. + +A Fetch Type other than the above MUST be treated as an error. + A publisher responds to a FETCH request with either a FETCH_OK or a FETCH_ERROR message. If it responds with FETCH_OK, the publisher creates a new unidirectional stream that is used to send the Objects. A relay MAY start sending objects immediately @@ -1401,34 +1415,46 @@ FETCH Message { Type (i) = 0x16, Length (i), Subscribe ID (i), - Track Namespace (tuple), - Track Name Length (i), - Track Name (..), Subscriber Priority (8), - Group Order (8), - StartGroup (i), - StartObject (i), - EndGroup (i), - EndObject (i), + Fetch Type (i), + [Track Namespace (tuple), + Track Name Length (i), + Track Name (..), + Group Order (8), + StartGroup (i), + StartObject (i), + EndGroup (i), + EndObject (i),] + [Previous Group Count (i),] Number of Parameters (i), Parameters (..) ... } ~~~ {: #moq-transport-fetch-format title="MOQT FETCH Message"} +Fields common to all Fetch Types: + * Subscribe ID: The Subscribe ID identifies a given fetch request. Subscribe ID is a variable length integer that MUST be unique and monotonically increasing -within a session. +within a session. For a Standalone Fetch a new Subscribe ID MUST be used. For +a Joining Fetch, the Subscribe ID MUST correspond to a Subscribe which has already +been sent. + +* Subscriber Priority: Specifies the priority of a fetch request relative to +other subscriptions or fetches in the same session. Lower numbers get higher +priority. See {{priorities}}. + +* Fetch Type: Identifies the type of Fetch, whether joining or standalone. + +* Parameters: The parameters are defined in {{version-specific-params}}. + +Fields present only for Standalone Fetch (0x1): * Track Namespace: Identifies the namespace of the track as defined in ({{track-name}}). * Track Name: Identifies the track name as defined in ({{track-name}}). -* Subscriber Priority: Specifies the priority of a fetch request relative to -other subscriptions or fetches in the same session. Lower numbers get higher -priority. See {{priorities}}. - * Group Order: Allows the subscriber to request Objects be delivered in Ascending (0x1) or Descending (0x2) order by group. See {{priorities}}. A value of 0x0 indicates the original publisher's Group Order SHOULD be @@ -1443,8 +1469,9 @@ used. Values larger than 0x2 are a protocol error. * EndObject: The end Object ID, plus 1. A value of 0 means the entire group is requested. -* Parameters: The parameters are defined in {{version-specific-params}}. +Field present only for Joining Fetch (0x2): +* Previous Group Count: The number of groups to Fetch prior to the StartGroup of the corresponding Subscribe Objects that are not yet published will not be retrieved by a FETCH. The latest available Object is indicated in the FETCH_OK, and is the last @@ -1462,53 +1489,9 @@ A publisher MUST send fetched groups in group order, either ascending or descending. Within each group, objects are sent in Object ID order; subgroup ID is not used for ordering. -## JOIN - -A JOIN is a variant of FETCH that joins together with a SUBSCRIBE to provide a contiguous non-overlapping request for objects before and after LatestGroup LatestObject as determined by the receiving publisher. - -The format of JOIN is as follows: - -~~~ -JOIN Message { - Type (i) = 0x16, - Length (i), - Subscribe ID (i), - Subscriber Priority (8), - Group Order (8), - Previous Group Count (i), - Number of Parameters (i), - Parameters (..) ... -} -~~~ -{: #moq-transport-fetch-format title="MOQT JOIN Message"} - -* FetchType: - -* Subscribe ID: The Subscribe ID identifies a given fetch request. Subscribe ID -is a variable length integer that MUST be unique and monotonically increasing -within a session. - -* Track Namespace: Identifies the namespace of the track as defined in -({{track-name}}). +A publisher which receives a Fetch message with a Fetch Type of 0x2 should treat it as a Fetch with the following fields dynamically determined from the corresponding Subscribe: -* Track Name: Identifies the track name as defined in ({{track-name}}). - -* Subscriber Priority: Specifies the priority of a fetch request relative to -other subscriptions or fetches in the same session. Lower numbers get higher -priority. See {{priorities}}. - -* Group Order: Allows the subscriber to request Objects be delivered in -Ascending (0x1) or Descending (0x2) order by group. See {{priorities}}. -A value of 0x0 indicates the original publisher's Group Order SHOULD be -used. Values larger than 0x2 are a protocol error. - -* Previous Group Count: The number of groups to FETCH prior to the StartGroup of the corresponding SUBSCRIBE - -* Parameters: The parameters are defined in {{version-specific-params}}. - -A publisher which receives a FETCH message with a FetchType of 0x1 should treat it as a FETCH with the following fields dynamically determined from the corresponding SUBSCRIBE: - -* Track Namespace: Same as in the corresponding SUBSCRIBE +* Track Namespace: Same as in the corresponding Subscribe * Track Name: Same as in the corresponding SUBSCRIBE @@ -1520,12 +1503,14 @@ A publisher which receives a FETCH message with a FetchType of 0x1 should treat * EndObject: StartObject of the corresponding SUBSCRIBE minus 1 (double check minus 1) +A Joining Fetch MUST be sent in ascending group order. + TODO: - - merge with FETCH using FetchType - - table defining FetchTypes (Look at Subscribe FilterType for conventions) - - Error for Subscribe ID does not exist with FetchType 0x1 - - shift priority up into shared fields - - omit group order (for our first proposed FetchType) + - [x] merge with FETCH using FetchType + - [x] define FetchTypes (Look at Subscribe FilterType for conventions) + - [ ] Error for Subscribe ID does not exist with FetchType 0x1 + - [x] shift priority up into shared fields + - [x] omit group order (for our first proposed FetchType) ## FETCH_CANCEL {#message-fetch-cancel} From 7b2461d2fb676ab2080d637712b3651e28b0fcab Mon Sep 17 00:00:00 2001 From: Mike English Date: Tue, 3 Dec 2024 14:03:26 -0500 Subject: [PATCH 4/8] Update draft-ietf-moq-transport.md --- draft-ietf-moq-transport.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draft-ietf-moq-transport.md b/draft-ietf-moq-transport.md index 4b9649e87..071a7f29f 100644 --- a/draft-ietf-moq-transport.md +++ b/draft-ietf-moq-transport.md @@ -1384,7 +1384,7 @@ fetch response. All omitted objects have status Object Not Available. **Fetch Types** -There are two types of Fetches: +There are two types of Fetch messages: Standalone Fetch (0x1) : A Fetch of Objects performed indepdently of any Subscribe. From 1e27204a48c53337a01ecff2e541a4f14f56df71 Mon Sep 17 00:00:00 2001 From: Mike English Date: Tue, 3 Dec 2024 14:52:51 -0500 Subject: [PATCH 5/8] Add Invalid Subscribe ID error --- draft-ietf-moq-transport.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/draft-ietf-moq-transport.md b/draft-ietf-moq-transport.md index 071a7f29f..c53ffbc0f 100644 --- a/draft-ietf-moq-transport.md +++ b/draft-ietf-moq-transport.md @@ -560,6 +560,8 @@ code, as defined below: |------|---------------------------| | 0x6 | Too Many Subscribes | |------|---------------------------| +| 0x7 | Invalid Subscribe ID | +|------|---------------------------| | 0x10 | GOAWAY Timeout | |------|---------------------------| @@ -579,6 +581,9 @@ code, as defined below: * Too Many Subscribes: The session was closed because the subscriber used a Subscribe ID equal or larger than the current Maximum Subscribe ID. +* Invalid Subscribe ID: The session was closed because the subscriber sent + a Joining Fetch with a Subscribe ID that does not exist. + * GOAWAY Timeout: The session was closed because the client took too long to close the session in response to a GOAWAY ({{message-goaway}}) message. See session migration ({{session-migration}}). From 04cc8cac1dd81d4a812d5fba9cfd7547772f8213 Mon Sep 17 00:00:00 2001 From: Mike English Date: Tue, 3 Dec 2024 15:52:46 -0500 Subject: [PATCH 6/8] Update draft-ietf-moq-transport.md --- draft-ietf-moq-transport.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draft-ietf-moq-transport.md b/draft-ietf-moq-transport.md index c53ffbc0f..355006415 100644 --- a/draft-ietf-moq-transport.md +++ b/draft-ietf-moq-transport.md @@ -1391,7 +1391,7 @@ fetch response. All omitted objects have status Object Not Available. There are two types of Fetch messages: -Standalone Fetch (0x1) : A Fetch of Objects performed indepdently of any Subscribe. +Standalone Fetch (0x1) : A Fetch of Objects performed independently of any Subscribe. Joining Fetch (0x2) : A Fetch joined together with a Subscribe. A Joining Fetch shares the same Subscribe ID as an already-sent Subscribe. A publisher receiving a Joining From b1e9e119a2a86085072ab6ab469e0077699f05db Mon Sep 17 00:00:00 2001 From: Mike English Date: Wed, 4 Dec 2024 09:42:21 -0500 Subject: [PATCH 7/8] Update draft-ietf-moq-transport.md --- draft-ietf-moq-transport.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draft-ietf-moq-transport.md b/draft-ietf-moq-transport.md index 355006415..85f018449 100644 --- a/draft-ietf-moq-transport.md +++ b/draft-ietf-moq-transport.md @@ -1443,7 +1443,7 @@ Fields common to all Fetch Types: is a variable length integer that MUST be unique and monotonically increasing within a session. For a Standalone Fetch a new Subscribe ID MUST be used. For a Joining Fetch, the Subscribe ID MUST correspond to a Subscribe which has already -been sent. +been sent. If a publisher receives a Joining Fetch with a Subscribe ID that does not correspond to an existing Subscribe, it MUST close the session with an Invalid Subscribe ID error. * Subscriber Priority: Specifies the priority of a fetch request relative to other subscriptions or fetches in the same session. Lower numbers get higher From 8410fb7dba5a0469a5e0165921a3c162758b1015 Mon Sep 17 00:00:00 2001 From: Mike English Date: Wed, 4 Dec 2024 09:44:25 -0500 Subject: [PATCH 8/8] reflow text --- draft-ietf-moq-transport.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/draft-ietf-moq-transport.md b/draft-ietf-moq-transport.md index 85f018449..b42eee224 100644 --- a/draft-ietf-moq-transport.md +++ b/draft-ietf-moq-transport.md @@ -1443,7 +1443,9 @@ Fields common to all Fetch Types: is a variable length integer that MUST be unique and monotonically increasing within a session. For a Standalone Fetch a new Subscribe ID MUST be used. For a Joining Fetch, the Subscribe ID MUST correspond to a Subscribe which has already -been sent. If a publisher receives a Joining Fetch with a Subscribe ID that does not correspond to an existing Subscribe, it MUST close the session with an Invalid Subscribe ID error. +been sent. If a publisher receives a Joining Fetch with a Subscribe ID that does +not correspond to an existing Subscribe, it MUST close the session with an +Invalid Subscribe ID error. * Subscriber Priority: Specifies the priority of a fetch request relative to other subscriptions or fetches in the same session. Lower numbers get higher