Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MAX_SUBSCRIBE_ID to limit number of subscriptions #491

Merged
merged 16 commits into from
Aug 26, 2024
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 45 additions & 8 deletions draft-ietf-moq-transport.md
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,8 @@ code, as defined below:
|------|---------------------------|
| 0x5 | Parameter Length Mismatch |
|------|---------------------------|
| 0x6 | Too Many Subscribes |
|------|---------------------------|
| 0x10 | GOAWAY Timeout |
|------|---------------------------|

Expand All @@ -501,6 +503,9 @@ code, as defined below:
* Duplicate Track Alias: The endpoint attempted to use a Track Alias
that was already in use.

* Too Many Subscribes: The session was closed because the subscriber used
a Subscribe ID larger than the current Maximum Subscribe ID.
ianswett marked this conversation as resolved.
Show resolved Hide resolved

* 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}}).
Expand Down Expand Up @@ -848,13 +853,22 @@ it can appear. If it appears in some other type of message, it MUST be ignored.
Note that since Setup parameters use a separate namespace, it is impossible for
these parameters to appear in Setup messages.

#### AUTHORIZATION INFO Parameter {#authorization-info}
#### AUTHORIZATION INFO {#authorization-info}

AUTHORIZATION INFO parameter (key 0x02) identifies a track's authorization
information in a SUBSCRIBE or ANNOUNCE message. This parameter is populated for
cases where the authorization is required at the track level. The value is an
ASCII string.

#### MAX_SUBSCRIBE_ID {#max-subscribe-id}

The MAX_SUBSCRIBE_ID parameter (key 0x03) communicates an initial value for
the Maximum Subscribe ID the peer can use when making subscriptions.
If not specified, the peer MUST NOT create subscriptions. Subscribers (0x02)
MUST NOT specify a MAX_SUBSCIBE_ID, because the role indicates it cannot
handle subscriptions.


## CLIENT_SETUP and SERVER_SETUP {#message-setup}

The `CLIENT_SETUP` and `SERVER_SETUP` messages are the first messages exchanged
Expand Down Expand Up @@ -1022,17 +1036,17 @@ SUBSCRIBE Message {
~~~
{: #moq-transport-subscribe-format title="MOQT SUBSCRIBE Message"}

* Subscribe ID: The subscription identifier that is unique within the session.
`Subscribe ID` is a monotonically increasing variable length integer which
MUST not be reused within a session. `Subscribe ID` is used by subscribers and
the publishers to identify a given subscription. Subscribers specify the
`Subscribe ID` and it is included in the corresponding SUBSCRIBE_OK or
SUBSCRIBE_ERROR messages.
* Subscribe ID: The subscriber specified identifier used to manage a
subscription. `Subscribe ID` is a variable length integer that MUST be
unique and monotonically increasing within a session and MUST be less
than the session's Maximum Subscribe ID.

* Track Alias: A session specific identifier for the track.
Messages that reference a track, such as OBJECT ({{message-object}}),
reference this Track Alias instead of the Track Name and Track Namespace to
reduce overhead. If the Track Alias is already being used for a different track, the publisher MUST close the session with a Duplicate Track Alias error ({{session-termination}}).
reduce overhead. If the Track Alias is already being used for a different
track, the publisher MUST close the session with a Duplicate Track Alias
error ({{session-termination}}).

* Track Namespace: Identifies the namespace of the track as defined in
({{track-name}}).
Expand Down Expand Up @@ -1620,6 +1634,29 @@ message in this track.
* Final Object: The largest Object ID sent by the publisher in an OBJECT
message in the `Final Group` for this track.

## MAX_SUBSCRIBE_ID {#message-max-subscribe-id}

A publisher sends a MAX_SUBSCRIBE_ID message to increase the number of
subscriptions a subscriber can create within a session.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i wonder if we need to add a non-normative note on what a publisher would like to do this and how do they pick such an value. I do understand that this is very application/implementation specific, however, a few notes on reasons causing the below will be beneficial ( can be in appendix too )

  • choosing a value for it
  • updating the value


The Maximum Subscribe Id MUST only increase within a session, and
receipt of a MAX_SUBSCRIBE_ID message with an equal or smaller Subscribe ID
value is a 'Protocol Violation'.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a subscriber received MAX_SUBSCRIBE_ID with value lesser than previous MAX_SUBSCRIBE_ID sent by the publisher, are we saying here that the subscriber needs to close the session ? I am not sure if that is feasible to do or can be enforced.


~~~
MAX_SUBSCRIBE_ID
{
Subscribe ID (i),
}
~~~
{: #moq-transport-max-subscribe-id format title="MOQT MAX_SUBSCRIBE_ID Message"}

* Subscribe ID: The maximum valid Subscribe ID for the session. If a Subscribe ID
ianswett marked this conversation as resolved.
Show resolved Hide resolved
equal or larger than this is used in any message, including SUBSCRIBE,
the publisher MUST close the session with an error of 'Too Many Subscribes'.
More on Subscribe ID in {{message-subscribe-req}}.


## ANNOUNCE {#message-announce}

The publisher sends the ANNOUNCE control message to advertise where the
Expand Down
Loading