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 Priority and Group Send Order to SUBSCRIBE, clarify Publisher Priority #470

Merged
merged 39 commits into from
Jul 3, 2024
Merged
Changes from 3 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
e43f244
Add Priority and Delivery Order to SUBSCRIBE, clarify Publisher Priority
ianswett Jun 22, 2024
0d45b9d
Merge branch 'main' into ianswett-uber-priority
ianswett Jun 22, 2024
c1346ec
More text on relays going upstream
ianswett Jun 22, 2024
31b0ba2
Update draft-ietf-moq-transport.md
ianswett Jun 22, 2024
0b693ae
Fix references to priority-congestion
ianswett Jun 22, 2024
f1b88f4
Update draft-ietf-moq-transport.md
ianswett Jun 22, 2024
f5043c6
Update draft-ietf-moq-transport.md
ianswett Jun 22, 2024
3c0f6e5
Update draft-ietf-moq-transport.md
ianswett Jun 22, 2024
9097d73
Update draft-ietf-moq-transport.md
ianswett Jun 22, 2024
81c6a32
Update draft-ietf-moq-transport.md
ianswett Jun 22, 2024
9fc4721
Update draft-ietf-moq-transport.md
ianswett Jun 22, 2024
619bc11
Update draft-ietf-moq-transport.md
ianswett Jun 22, 2024
436605f
Update draft-ietf-moq-transport.md
ianswett Jun 22, 2024
081554d
Update draft-ietf-moq-transport.md
ianswett Jun 22, 2024
a085820
Move Subscriber Priority to be a field, not an optional param
ianswett Jun 22, 2024
441ecf0
Rename Priority to Publisher Priority
ianswett Jun 23, 2024
a97a91f
Update draft-ietf-moq-transport.md
ianswett Jun 23, 2024
7ddfd11
Update draft-ietf-moq-transport.md
ianswett Jun 23, 2024
1bd6788
Update draft-ietf-moq-transport.md
ianswett Jun 24, 2024
c04f70e
Add a statement about the control stream and priorities.
ianswett Jun 25, 2024
6804eca
Merge branch 'main' into ianswett-uber-priority
ianswett Jun 26, 2024
8d41133
Move the SHOULD
ianswett Jun 26, 2024
b6ec889
Update draft-ietf-moq-transport.md
ianswett Jun 26, 2024
73376b3
Rename Delivery Order to Group Order
ianswett Jun 26, 2024
13d2e4c
0x0 means use the publisher's Group Order
ianswett Jun 26, 2024
751c65e
Add Group Order to SUBSCRIBE_OK
ianswett Jun 26, 2024
a6ed5ef
Add Group Order to SUBSCRIBE_UPDATE
ianswett Jun 27, 2024
a2a29de
stream or datagram header
ianswett Jul 1, 2024
09e6d8e
afrind suggestion
ianswett Jul 1, 2024
74ca340
Remove empty section
ianswett Jul 1, 2024
e32a488
Update draft-ietf-moq-transport.md
ianswett Jul 1, 2024
4da15a1
Reprioritization is implementation-specific
ianswett Jul 1, 2024
779ddae
Group Order cannot be changed in SUBSCRIBE_UPDATE
ianswett Jul 1, 2024
cc451f2
Update draft-ietf-moq-transport.md
ianswett Jul 1, 2024
d366503
Elaborate on upstream subscriptions
ianswett Jul 1, 2024
37fa963
Namespace concerns
ianswett Jul 1, 2024
0d351ff
Update draft-ietf-moq-transport.md
ianswett Jul 1, 2024
c528c9c
Remove Group Order from SUBSCRIBE_UPDATE
ianswett Jul 2, 2024
fd21a0d
Clarify how subscriptions share a connection
ianswett Jul 2, 2024
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
153 changes: 50 additions & 103 deletions draft-ietf-moq-transport.md
Original file line number Diff line number Diff line change
Expand Up @@ -534,101 +534,32 @@ expects more OBJECTs to be delivered. The server closes the session with a
'GOAWAY Timeout' if the client doesn't close the session quickly enough.


# Prioritization and Congestion Response {#priority-congestion}

TODO: This is a placeholder section to capture details on how the MOQT
protocol deals with prioritization and congestion overall.

This section is expected to cover details on:

- Prioritization Schemes.
- Congestion Algorithms and impacts.
- Mapping considerations for one object per stream vs multiple objects
per stream.
- Considerations for merging multiple streams across domains onto single
connection and interactions with specific prioritization schemes.

## Order Priorities and Options

At the point of this writing, the working group has not reached
consensus on several important goals, such as:

* Ensuring that objects are delivered in the order intended by the
emitter
* Allowing nodes and relays to skip or delay some objects to deal with
congestion
* Ensuring that emitters can accurately predict the behavior of relays
* Ensuring that when relays have to skip and delay objects belonging to
different tracks that they do it in a predictable way if tracks are
explicitly coordinated and in a fair way if they are not.

The working group has been considering two alternatives: marking objects
belonging to a track with an explicit "send order"; and, defining
algorithms combining tracks, priorities and object order within a
group. The two proposals are listed in {{send-order}} and
{{ordering-by-priorities}}. We expect further work before a consensus
is reached.

### Proposal - Send Order {#send-order}

Media is produced with an intended order, both in terms of when media
should be presented (PTS) and when media should be decoded (DTS). As
stated in the introduction, the network is unable to maintain this
ordering during congestion without increasing latency.

The encoder determines how to behave during congestion by assigning each
object a numeric send order. The send order SHOULD be followed when
possible, to ensure that the most important media is delivered when
throughput is limited. Note that the contents within each object are
still delivered in order; this send order only applies to the ordering
between objects.

A publisher MUST send each object over a dedicated stream. The library
should support prioritization ({{priority-congestion}}) such that
streams are transmitted in send order.

A subscriber MUST NOT assume that objects will be received in send order,
for the following reasons:

* Newly encoded objects can have a smaller send order than outstanding
objects.
* Packet loss or flow control can delay the send of individual streams.
* The publisher might not support stream prioritization.

TODO: Refer to Congestion Response and Prioritization Section for
further details on various proposals.

### Proposal - Ordering by Priorities {#ordering-by-priorities}

Media is produced as a set of layers, such as for example low definition
and high definition, or low frame rate and high frame rate. Each object
belonging to a track and a group has two attributes: the object-id, and
the priority (or layer).

When nodes or relays have to choose which object to send next, they
apply the following rules:

* within the same group, objects with a lower priority number (e.g. P1)
are always sent before objects with a numerically greater priority
number (e.g., P2)
* within the same group, and the same priority level, objects with a
lower object-id are always sent before objects with a higher
object-id.
* objects from later groups are normally always sent before objects of
previous groups.

The latter rule is generally agreed as a way to ensure freshness, and to
recover quickly if queues and delays accumulate during a congestion
period. However, there may be cases when finishing the transmission of
an ongoing group results in better user experience than strict adherence
to the freshness rule. We expect that that the working group will
eventually reach consensus and define meta data that controls this
behavior.

There have been proposals to allow emitters to coordinate the allocation
of layer priorities across multiple coordinated tracks. At this point,
these proposals have not reached consensus.
# Priorities {#priorities}

MoQ priorities allow a subscriber and original publisher to influence
the transmission order of Objects within a session in the presence of
congestion.

The subscriber can indicate the priority of a subscription via the
SUBSCRIBER_PRIORITY param and the original publisher indicates priority
in every stream header.

The publisher SHOULD respect the subscriber and publisher's priorities.

In addition, the SUBSCRIBE specifies a Delivery Order of either
ianswett marked this conversation as resolved.
Show resolved Hide resolved
'Ascending' or 'Descending', which indicates whether the lowest or
highest Group Id SHOULD be delivered first when multiple Groups are
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is only true when groups have the same priority, since we're allowing the publisher priority to change per stream.

ianswett marked this conversation as resolved.
Show resolved Hide resolved
available to send.
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems slightly under specified. If a last mile relay received two different values in both SUBSCRIBE and SUBSCRIBE_OK, we need to say which one takes priority. We agreed on the end subscriber would take priority so this should have a bit more text to say value in SUBSCRIBE overrides in value in SUBSCRIBE_OK.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point, I rewrote this paragraph to better match the current framing.


Within the same group, and the same priority level,
objects with a lower Object Id are always sent before objects with a
higher Object Id, regardless of the specified delivery_order.

Relays SHOULD NOT directly use SUBSCRIBER_PRIORITY or Delivery Order
ianswett marked this conversation as resolved.
Show resolved Hide resolved
from incoming subscriptions for upstream subscriptions. Relays use of
SUBSCRIBER_PRIORITY for upstream subscriptions is based on
a number of factors specific to it, such as the populatity of the
ianswett marked this conversation as resolved.
Show resolved Hide resolved
content or policy.
ianswett marked this conversation as resolved.
Show resolved Hide resolved
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 should add the note on publisher preference here too

Copy link
Collaborator

Choose a reason for hiding this comment

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

@suhasHere : what's your suggestion? Something like:

In the absence of other specific reasons, relays SHOULD give all upstream subscriptions equal priority

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm hesitant to spend text telling relays what to do, since they'll do what they want in reality. Telling them what not to do because it's a footgun seems more valuable.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I expanded the sentence a bit more to note that a relay can use a single Subscriber Priority value for all upstream subscriptions.


# Relays {#relays-moq}

Expand All @@ -638,6 +569,10 @@ similar in functionality to Content Delivery Networks
(CDNs). Additionally, relays serve as policy enforcement points by
validating subscribe and publish requests at the edge of a network.

Relays are not required to cache Objects, but relays need to have
Copy link
Collaborator

Choose a reason for hiding this comment

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

A proxy is a relay too.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The intent of this sentence is to make it clear that they're different. Which I think is useful, because proxies typically have substantially different functionality.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Why can't a relay be a 1:1 relay? I'd just chop the sentence at

Relays are not required to cache Objects

The recently merged terminology says

Relay: An entitly that is both a Publisher and a Subscriber, but not the Original Publisher or End Subscriber.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This gets a bit off topic, but I think the more important property of a relay is that it republishes tracks from an upstream publisher without modification. I think there may be another entity we could define which could consume one or more tracks from upstream publishers and act as the original publisher for some new tracks (e.g. in the case of "manifest manipulation" use cases at the edge), but I think that's something we should discuss separately.

Copy link
Collaborator

Choose a reason for hiding this comment

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

As for this bit of text, I'm fine with it either way. To me, it makes explicit that relays may optionally be relatively stateless fan out nodes without any significant local caches, so long as they still allow downstream subscribers to subscribe to tracks from an upstream publisher.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Based on the definition, I'll shorten this sentence and clarify some other text.

the ability to distribute one upstream subscription to multiple
downstream subscriptions.

## Subscriber Interactions

Subscribers interact with the Relays by sending a SUBSCRIBE
Expand Down Expand Up @@ -885,6 +820,13 @@ 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.

#### SUBSCRIBER_PRIORITY Parameter

The SUBSCRIBER_PRIORITY parameter (key 0x03) allows a subscriber to specify the
priority of a subscription relative to other subscriptions in the same session.
Lower numbers get higher priority and values range from 0 to 255 inclusive.
More details on priorities are documented in {{}}
ianswett marked this conversation as resolved.
Show resolved Hide resolved

## CLIENT_SETUP and SERVER_SETUP {#message-setup}

The `CLIENT_SETUP` and `SERVER_SETUP` messages are the first messages exchanged
Expand Down Expand Up @@ -1039,6 +981,7 @@ SUBSCRIBE Message {
Track Alias (i),
Track Namespace (b),
Track Name (b),
Delivery Order (8),
ianswett marked this conversation as resolved.
Show resolved Hide resolved
Filter Type (i),
[StartGroup (i),
StartObject (i)],
Expand Down Expand Up @@ -1068,6 +1011,10 @@ close the session with a Duplicate Track Alias error ({{session-termination}}).

* Track Name: Identifies the track name as defined in ({{track-name}}).

* Delivery Order: Requests Objects for the subscription be delievered in
Ascending (0x0) or Descending (0x1) order. See {{priorities}}.
ianswett marked this conversation as resolved.
Show resolved Hide resolved
Values larger than 0x1 are a protocol error.
ianswett marked this conversation as resolved.
Show resolved Hide resolved

* Filter Type: Identifies the type of filter, which also indicates whether
the StartGroup/StartObject and EndGroup/EndObject fields will be present.
See ({{sub-filter}}).
Expand Down Expand Up @@ -1252,8 +1199,8 @@ A canonical MoQ Object has the following information:
IDs starts at 0, increasing sequentially for each object within the
group.

* Object Send Order: An integer indicating the object send order
{{send-order}} or priority {{ordering-by-priorities}} value.
* Priority: An 8 bit integer indicating the publisher's priority for the Object
ianswett marked this conversation as resolved.
Show resolved Hide resolved
{{priorities}}.

* Object Forwarding Preference: An enumeration indicating how a publisher sends
an object. The preferences are Track, Group, Object and Datagram. An Object
Expand Down Expand Up @@ -1334,7 +1281,7 @@ OBJECT_STREAM Message {
Track Alias (i),
Group ID (i),
Object ID (i),
Object Send Order (i),
Priority (8),
Object Status (i),
Object Payload (..),
}
Expand Down Expand Up @@ -1371,7 +1318,7 @@ OBJECT_DATAGRAM Message {
Track Alias (i),
Group ID (i),
Object ID (i),
Object Send Order (i),
Priority (8),
Object Status (i),
Object Payload (..),
}
Expand Down Expand Up @@ -1403,7 +1350,7 @@ stream header.
STREAM_HEADER_TRACK Message {
Subscribe ID (i)
Track Alias (i),
Object Send Order (i),
Priority (8),
}
~~~
{: #stream-header-track-format title="MOQT STREAM_HEADER_TRACK Message"}
Expand Down Expand Up @@ -1442,8 +1389,8 @@ have the `Object Send Order` specified in the stream header.
STREAM_HEADER_GROUP Message {
Subscribe ID (i),
Track Alias (i),
Group ID (i)
Object Send Order (i)
Group ID (i),
Priority (8),
}
~~~
{: #stream-header-group-format title="MOQT STREAM_HEADER_GROUP Message"}
Expand Down Expand Up @@ -1478,7 +1425,7 @@ Sending a track on one stream:
STREAM_HEADER_TRACK {
Subscribe ID = 1
Track Alias = 1
Object Send Order = 0
Priority = 0
}
{
Group ID = 0
Expand All @@ -1504,7 +1451,7 @@ STREAM_HEADER_GROUP {
Subscribe ID = 2
Track Alias = 2
Group ID = 0
Object Send Order = 0
Priority = 0
}
{
Object ID = 0
Expand Down
Loading