Skip to content

Commit af6e9dc

Browse files
authored
Change SUBSCRIBE_UPDATE to REQUEST_UPDATE and expand ability to update (#1332)
This creates a mechanism to refresh auth credentials for PUBLISH, SUBSCRIBE_NAMESPACE and PUBLISH_NAMESPACE. A side-effect is that it allows the subscriber to change the priority of a FETCH (we closed #1204 already but this would address it). If we decide to address #1270, this will help. Fixes: #1267 Fixes: #1204
2 parents 347db21 + af0cdc5 commit af6e9dc

File tree

1 file changed

+66
-64
lines changed

1 file changed

+66
-64
lines changed

draft-ietf-moq-transport.md

Lines changed: 66 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,7 @@ initiates a subscription to a track by sending the SUBSCRIBE message.
914914
The publisher either accepts or rejects the subscription using
915915
SUBSCRIBE_OK or REQUEST_ERROR. Once either of these sequences is
916916
successful, the subscription moves to the `Established` state and can
917-
be updated by the subscriber using SUBSCRIBE_UPDATE. Either endpoint
917+
be updated by the subscriber using REQUEST_UPDATE. Either endpoint
918918
can terminate an `Established` subscription, moving it to the
919919
`Terminated` state. The subscriber terminates a subscription in the
920920
`Pending (Subscriber)` or `Established` states using
@@ -941,7 +941,7 @@ REQUEST_ERROR | SUBSCRIBE_OK | | PUBLISH_OK | REQUEST_ERROR
941941
| V V |
942942
| +-------------+ |
943943
| | Established | ------+
944-
| | | | SUBSCRIBE_UPDATE
944+
| | | | REQUEST_UPDATE
945945
| +-------------+ <-----+
946946
| | | |
947947
+---- UNSUBSCRIBE | | PUBLISH_DONE ----+
@@ -966,7 +966,7 @@ All `Established` subscriptions have a Forward State which is either 0 or 1.
966966
The publisher does not send Objects if the Forward State is 0, and does send them
967967
if the Forward State is 1. The initiator of the subscription sets the initial
968968
Forward State in either PUBLISH or SUBSCRIBE. The subscriber can send PUBLISH_OK
969-
or SUBSCRIBE_UPDATE to update the Forward State. Control messages, such as
969+
or REQUEST_UPDATE to update the Forward State. Control messages, such as
970970
PUBLISH_DONE ({{message-publish-done}}) are sent regardless of the forward state.
971971

972972
Either endpoint can initiate a subscription to a track without exchanging any
@@ -1107,7 +1107,7 @@ One possible subscriber pattern is to SUBSCRIBE to a Track using Filter Type
11071107
`Largest Object` and observe the `Largest Location` in the response. If the
11081108
Object ID is below the application's threshold, the subscriber sends a FETCH for
11091109
the beginning of the Group. If the Object ID is above the threshold and the
1110-
Track supports dynamic groups, the subscriber sends a SUBSCRIBE_UPDATE message with the
1110+
Track supports dynamic groups, the subscriber sends a REQUEST_UPDATE message with the
11111111
NEW_GROUP_REQUEST parameter equal to the Largest Location's Group, plus one (see
11121112
{{new-group-request}}).
11131113

@@ -1250,7 +1250,7 @@ A lower priority number indicates higher priority; the highest priority is 0.
12501250

12511251
`Subscriber Priority` is a priority number associated with an individual
12521252
request. It is specified in the SUBSCRIBE or FETCH message, and can be
1253-
updated via SUBSCRIBE_UPDATE message. The subscriber priority of an individual
1253+
updated via REQUEST_UPDATE message. The subscriber priority of an individual
12541254
schedulable object is the subscriber priority of the request that caused that
12551255
object to be sent. When subscriber priority is changed, a best effort SHOULD be
12561256
made to apply the change to all objects that have not been scheduled, but it is
@@ -1430,7 +1430,7 @@ multiple subscribers request the same Track. Subscription aggregation
14301430
allows relays to make only a single upstream subscription for the
14311431
Track. The published content received from the upstream subscription
14321432
request is cached and shared among the pending subscribers.
1433-
Because SUBSCRIBE_UPDATE only allows narrowing a subscription, relays that
1433+
Because MOQT restricts widening a subscription, relays that
14341434
aggregate upstream subscriptions can subscribe using the Largest Object
14351435
filter to avoid churn as downstream subscribers with disparate filters
14361436
subscribe and unsubscribe from a Track.
@@ -1505,7 +1505,7 @@ one publisher is available, the Relay MAY send the FETCH to any of them.
15051505
When a Relay receives an authorized SUBSCRIBE for a Track with one or more
15061506
`Established` upstream subscriptions, it MUST reply with SUBSCRIBE_OK. If the
15071507
SUBSCRIBE has Forward State=1 and the upstream subscriptions are in Forward
1508-
State=0, the Relay MUST send SUBSCRIBE_UPDATE with Forward=1 to all publishers.
1508+
State=0, the Relay MUST send REQUEST_UPDATE with Forward=1 to all publishers.
15091509
If there are no `Established` upstream subscriptions for the requested Track, the Relay
15101510
MUST send a SUBSCRIBE request to each publisher that has published the
15111511
subscription's namespace or prefix thereof. If the SUBSCRIBE has Forward=1,
@@ -1619,7 +1619,7 @@ The following Message Types are defined:
16191619
|-------|-----------------------------------------------------|
16201620
| 0x4 | SUBSCRIBE_OK ({{message-subscribe-ok}}) |
16211621
|-------|-----------------------------------------------------|
1622-
| 0x2 | SUBSCRIBE_UPDATE ({{message-subscribe-update}}) |
1622+
| 0x2 | REQUEST_UPDATE ({{message-request-update}}) |
16231623
|-------|-----------------------------------------------------|
16241624
| 0xA | UNSUBSCRIBE ({{message-unsubscribe}}) |
16251625
|-------|-----------------------------------------------------|
@@ -1663,7 +1663,7 @@ ongoing requests, and supports the endpoint's ability to limit the concurrency
16631663
and frequency of requests. Request IDs for one endpoint increment independently
16641664
from those sent by the peer endpoint. The client's Request ID starts at 0 and
16651665
are even and the server's Request ID starts at 1 and are odd. The Request ID
1666-
increments by 2 with each FETCH, SUBSCRIBE, SUBSCRIBE_UPDATE,
1666+
increments by 2 with each FETCH, SUBSCRIBE, REQUEST_UPDATE,
16671667
SUBSCRIBE_NAMESPACE, PUBLISH, PUBLISH_NAMESPACE or TRACK_STATUS request.
16681668
Other messages with a Request ID field reference the Request ID of another
16691669
message for correlation. If an endpoint receives a Request ID that is not valid
@@ -1711,7 +1711,7 @@ these parameters to appear in Setup messages.
17111711
#### AUTHORIZATION TOKEN Parameter {#authorization-token}
17121712

17131713
The AUTHORIZATION TOKEN parameter (Parameter Type 0x03) MAY appear in a
1714-
CLIENT_SETUP, SERVER_SETUP, PUBLISH, SUBSCRIBE, SUBSCRIBE_UPDATE,
1714+
CLIENT_SETUP, SERVER_SETUP, PUBLISH, SUBSCRIBE, REQUEST_UPDATE,
17151715
SUBSCRIBE_NAMESPACE, PUBLISH_NAMESPACE, TRACK_STATUS or FETCH message. This
17161716
parameter conveys information to authorize the sender to perform the operation
17171717
carrying the parameter.
@@ -1894,7 +1894,8 @@ The subscription has Publisher Priorty 128 if this parameter is omitted.
18941894
#### SUBSCRIBER PRIORITY Parameter {#subscriber-priority}
18951895

18961896
The SUBSCRIBER_PRIORITY parameter (Parameter Type 0x20) MAY appear in a
1897-
SUBSCRIBE, SUBSCRIBE_UPDATE, PUBLISH_OK or FETCH message. It is an
1897+
SUBSCRIBE, FETCH, REQUEST_UPDATE (for a subscription or FETCH),
1898+
PUBLISH_OK message. It is an
18981899
integer expressing the priority of a subscription relative to other
18991900
subscriptions and fetch responses in the same session. Lower numbers get higher
19001901
priority. See {{priorities}}. The range is restricted to 0-255. If a
@@ -1925,7 +1926,7 @@ REQUEST_OK, PUBLISH or FETCH, the receiver uses Ascending (0x1).
19251926
#### SUBSCRIPTION FILTER Parameter {#subscription-filter}
19261927

19271928
The SUBSCRIPTION_FILTER parameter (Parameter Type 0x21) MAY appear in a
1928-
SUBSCRIBE, PUBLISH_OK or SUBSCRIBE_UPDATE message. It is a
1929+
SUBSCRIBE, PUBLISH_OK or REQUEST_UPDATE (for a subscription) message. It is a
19291930
length-prefixed Subscription Filter (see {{subscription-filters}}). If the
19301931
length of the Subscription Filter does not match the parameter length, the
19311932
publisher MUST close the session with `PROTOCOL_VIOLATION`.
@@ -1943,9 +1944,9 @@ or UNSUBSCRIBE, depending on its role. This value is advisory and the sender
19431944
can terminate the subscription prior to or after the expiry time.
19441945

19451946
The receiver of the parameter can extend the subscription by sending a
1946-
SUBSCRIBE_UPDATE (TODO: SUBSCRIPTION_UPDATE). If the receiver of the parameter
1947+
REQUEST_UPDATE. If the receiver of the parameter
19471948
has one or more updated AUTHORIZATION_TOKENs, it SHOULD include those in the
1948-
SUBSCRIBE_UPDATE. Relays that send this parameter and applications that receive
1949+
REQUEST_UPDATE. Relays that send this parameter and applications that receive
19491950
it MAY introduce jitter to prevent many endpoints from updating
19501951
simultaneously.
19511952

@@ -1955,7 +1956,7 @@ does not expire or expires at an unknown time.
19551956
#### LARGEST OBJECT Parameter {#largest-param}
19561957

19571958
The LARGEST_OBJECT parameter (Parameter Type 0x9) MAY appear in SUBSCRIBE_OK,
1958-
PUBLISH or in REQUEST_OK (in response to SUBSCRIBE_UPDATE or TRACK_STATUS). It is a
1959+
PUBLISH or in REQUEST_OK (in response to REQUEST_UPDATE or TRACK_STATUS). It is a
19591960
length-prefixed Location structure (see {{location-structure}}) containing the
19601961
largest Location in the Track observed by the sending endpoint (see
19611962
{{subscription-filters}}. If Objects have been published on this Track the
@@ -1967,13 +1968,13 @@ any Objects in the Track.
19671968
#### FORWARD Parameter
19681969

19691970
The FORWARD parameter (Parameter Type 0x10) MAY appear in SUBSCRIBE,
1970-
SUBSCRIBE_UPDATE, PUBLISH, PUBLISH_OK and
1971+
REQUEST_UPDATE (for a subscription), PUBLISH, PUBLISH_OK and
19711972
SUBSCRIBE_NAMESPACE. It is a variable length integer specifying the
19721973
Forwarding State on affected subscriptions (see {{subscriptions}}). The
19731974
allowed values are 0 (don't forward) or 1 (forward). If an endpoint receives a
19741975
value outside this range, it MUST close the session with `PROTOCOL_VIOLATION`.
19751976

1976-
If the parameter is omitted from SUBSCRIBE_UPDATE, the value for the
1977+
If the parameter is omitted from REQUEST_UPDATE, the value for the
19771978
subscription remains unchanged. If the parameter is omitted from any other
19781979
message, the default value is 1.
19791980

@@ -1982,7 +1983,7 @@ message, the default value is 1.
19821983
The DYNAMIC_GROUPS parameter (parameter type 0x30) MAY appear in PUBLISH or
19831984
SUBSCRIBE_OK. The allowed values are 0 or 1. When the value is 1, it indicates
19841985
that the subscriber can request the Original Publisher to start a new Group
1985-
by including the NEW_GROUP_REQUEST parameter in PUBLISH_OK or SUBSCRIBE_UPDATE
1986+
by including the NEW_GROUP_REQUEST parameter in PUBLISH_OK or REQUEST_UPDATE
19861987
for this Track. If an endpoint receives a value larger than 1, it MUST close
19871988
the session with `PROTOCOL_VIOLATION`.
19881989

@@ -1993,10 +1994,10 @@ subscribers.
19931994
#### NEW GROUP REQUEST Parameter {#new-group-request}
19941995

19951996
The NEW_GROUP_REQUEST parameter (parameter type 0x32) MAY appear in PUBLISH_OK,
1996-
SUBSCRIBE or SUBSCRIBE_UPDATE. It is an integer representing the largest Group
1997+
SUBSCRIBE or REQUEST_UPDATE for a subscription. It is an integer representing the largest Group
19971998
ID in the Track known by the subscriber, plus 1. A value of 0 indicates that the
19981999
subscriber has no Group information for the Track. A subscriber MUST NOT send
1999-
this parameter in PUBLISH_OK or SUBSCRIBE_UPDATE if the publisher did not
2000+
this parameter in PUBLISH_OK or REQUEST_UPDATE if the publisher did not
20002001
include DYNAMIC_GROUPS=1 when establishing the subscription. A subscriber MAY
20012002
include this parameter in SUBSCRIBE without foreknowledge of support. If the
20022003
original publisher does not support dynamic Groups, it ignores the parameter in that
@@ -2016,7 +2017,7 @@ A relay that receives a NEW_GROUP_REQUEST for a Track without an `Established`
20162017
subscription MUST include the NEW_GROUP_REQUEST when subscribing upstream.
20172018

20182019
A relay that receives a NEW_GROUP_REQUEST for an `Established` subscription with a
2019-
value of 0 or a value larger than the Largest Group MUST send a SUBSCRIBE_UPDATE
2020+
value of 0 or a value larger than the Largest Group MUST send a REQUEST_UPDATE
20202021
including the NEW_GROUP_REQUEST to the publisher unless:
20212022

20222023
1. The Track does not support dynamic Groups
@@ -2229,7 +2230,7 @@ REQUESTS_BLOCKED Message {
22292230

22302231
## REQUEST_OK {#message-request-ok}
22312232

2232-
The REQUEST_OK message is sent to a response to SUBSCRIBE_UPDATE, TRACK_STATUS,
2233+
The REQUEST_OK message is sent to a response to REQUEST_UPDATE, TRACK_STATUS,
22332234
SUBSCRIBE_NAMESPACE and PUBLISH_NAMESPACE requests. The unique request ID in the
22342235
REQUEST_OK is used to associate it with the correct type of request.
22352236

@@ -2413,64 +2414,65 @@ SUBSCRIBE_OK Message {
24132414

24142415
* Track Extensions : A sequence of Extension Headers. See {{extension-headers}}.
24152416

2416-
## SUBSCRIBE_UPDATE {#message-subscribe-update}
2417+
## REQUEST_UPDATE {#message-request-update}
24172418

2418-
A subscriber sends a SUBSCRIBE_UPDATE to a publisher to modify an existing
2419-
subscription.
2420-
2421-
When a subscriber decreases the Start Location of the Subscription Filter
2422-
(see {{subscription-filters}}), the Start Location can be smaller than the Track's
2423-
Largest Location, similar to a new Subscription. FETCH can be used to retrieve
2424-
any necessary Objects smaller than the current Largest Location.
2425-
2426-
When a subscriber increases the End Location, the Largest Object at
2427-
the publisher might already be larger than the previous End Location. This will
2428-
create a gap in the subscription. The REQUEST_OK in response to the
2429-
SUBSCRIBE_UPDATE will include the LARGEST_OBJECT parameter, and the subscriber
2430-
can issue a FETCH to retrieve the omitted Objects, if any.
2431-
2432-
When a subscriber narrows their subscription (increase the Start Location and/or
2433-
decrease the End Group), it might still receive Objects outside the
2434-
new range if the publisher sent them before the update was processed.
2435-
2436-
The receiver of a SUBSCRIBE_UPDATE MUST respond with exactly one REQUEST_OK
2437-
or REQUEST_ERROR message indicating if the update was successful. When an
2438-
update is unsuccessful, the publisher MUST also terminate the subscription with
2439-
PUBLISH_DONE with error code `UPDATE_FAILED`.
2419+
The sender of a request (SUBSCRIBE, PUBLISH, FETCH, TRACK_STATUS,
2420+
PUBLISH_NAMESPACE, SUBSCRIBE_NAMESPACE) can later send a REQUEST_UPDATE to
2421+
modify it. A subscriber can also send REQUEST_UPDATE to modify parameters of a
2422+
subscription established with PUBLISH.
24402423

2441-
Like SUBSCRIBE, End Group MUST be greater than or equal to the Group specified
2442-
in `Start`.
2424+
The receiver of a REQUEST_UPDATE MUST respond with exactly one REQUEST_OK
2425+
or REQUEST_ERROR message indicating if the update was successful.
24432426

2444-
If a parameter previously set on the subscription in `SUBSCRIBE`, `PUBLISH_OK`
2445-
or `SUBSCRIBE_UPDATE` is not present in `SUBSCRIBE_UPDATE`, its value remains
2446-
unchanged.
2427+
If a parameter previously set on the request is not present in
2428+
`REQUEST_UPDATE`, its value remains unchanged.
24472429

2448-
There is no mechanism to remove a parameter from a subscription.
2430+
There is no mechanism to remove a parameter from a request.
24492431

2450-
The format of SUBSCRIBE_UPDATE is as follows:
2432+
The format of REQUEST_UPDATE is as follows:
24512433

24522434
~~~
2453-
SUBSCRIBE_UPDATE Message {
2435+
REQUEST_UPDATE Message {
24542436
Type (i) = 0x2,
24552437
Length (16),
24562438
Request ID (i),
2457-
Subscription Request ID (i),
2439+
Existing Request ID (i),
24582440
Number of Parameters (i),
24592441
Parameters (..) ...
24602442
}
24612443
~~~
2462-
{: #moq-transport-subscribe-update-format title="MOQT SUBSCRIBE_UPDATE Message"}
2444+
{: #moq-transport-request-update-format title="MOQT REQUEST_UPDATE Message"}
24632445

24642446
* Request ID: See {{request-id}}.
24652447

2466-
* Subscription Request ID: The Request ID of the SUBSCRIBE
2467-
({{message-subscribe-req}}) this message is updating. This MUST match an
2468-
existing Request ID. The publisher MUST close the session with `
2469-
`PROTOCOL_VIOLATION` if the subscriber specifies an invalid Subscription
2470-
Request ID.
2448+
* Existing Request ID: The Request ID of the request this message is
2449+
updating. This MUST match the Request ID of an existing request. The
2450+
receiver MUST close the session with `PROTOCOL_VIOLATION` if the sender
2451+
specifies an invalid Existing Request ID, or if the parameters included
2452+
in the REQUEST_UPDATE are invalid for the type of request being modified.
24712453

24722454
* Parameters: The parameters are defined in {{version-specific-params}}.
24732455

2456+
### Updating Subscriptions
2457+
2458+
When a subscriber decreases the Start Location of the Subscription Filter
2459+
(see {{subscription-filters}}), the Start Location can be smaller than the Track's
2460+
Largest Location, similar to a new Subscription. FETCH can be used to retrieve
2461+
any necessary Objects smaller than the current Largest Location.
2462+
2463+
When a subscriber increases the End Location, the Largest Object at
2464+
the publisher might already be larger than the previous End Location. This will
2465+
create a gap in the subscription. The REQUEST_OK in response to the
2466+
REQUEST_UPDATE will include the LARGEST_OBJECT parameter, and the subscriber
2467+
can issue a FETCH to retrieve the omitted Objects, if any.
2468+
2469+
When a subscriber narrows their subscription (increase the Start Location and/or
2470+
decrease the End Group), it might still receive Objects outside the
2471+
new range if the publisher sent them before the update was processed.
2472+
2473+
When a subscription
2474+
update is unsuccessful, the publisher MUST also terminate the subscription with
2475+
PUBLISH_DONE with error code `UPDATE_FAILED`.
24742476

24752477
## UNSUBSCRIBE {#message-unsubscribe}
24762478

@@ -2665,8 +2667,8 @@ MALFORMED_TRACK (0x12):
26652667
{{malformed-tracks}}).
26662668

26672669
UPDATE_FAILED (0x8):
2668-
: SUBSCRIBE_UPDATE failed on this subscription (see
2669-
{{message-subscribe-update}}).
2670+
: REQUEST_UPDATE failed on this subscription (see
2671+
{{message-request-update}}).
26702672

26712673
## FETCH {#message-fetch}
26722674

@@ -2938,7 +2940,7 @@ Relays without an `Established` subscription MAY forward TRACK_STATUS to one or
29382940
publishers, or MAY initiate a subscription (subject to authorization) as
29392941
described in {{publisher-interactions}} to determine the response. The publisher
29402942
does not send PUBLISH_DONE for this request, and the subscriber cannot send
2941-
SUBSCRIBE_UPDATE or UNSUBSCRIBE.
2943+
REQUEST_UPDATE or UNSUBSCRIBE.
29422944

29432945
## PUBLISH_NAMESPACE {#message-pub-ns}
29442946

@@ -3489,7 +3491,7 @@ not limited to:
34893491
* An Object in an open Subgroup exceeding its Delivery Timeout
34903492
* Early termination of subscription due to an UNSUBSCRIBE message
34913493
* A publisher's decision to end the subscription early
3492-
* A SUBSCRIBE_UPDATE moving the subscription's End Group to a smaller Group or
3494+
* A REQUEST_UPDATE moving the subscription's End Group to a smaller Group or
34933495
the Start Location to a larger Location
34943496
* Omitting a Subgroup Object due to the subcriber's Forward State
34953497

0 commit comments

Comments
 (0)