Skip to content

Commit af5aa7c

Browse files
authored
Add Relative Past Group filter
1 parent 5411f1e commit af5aa7c

File tree

1 file changed

+22
-47
lines changed

1 file changed

+22
-47
lines changed

draft-ietf-moq-transport.md

Lines changed: 22 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -457,8 +457,8 @@ by doing a Fetch upstream, if necessary.
457457

458458
Applications that cannot produce Group IDs that increase with time are limited
459459
to the subset of MOQT that does not compare group IDs. Subscribers to these
460-
Tracks SHOULD NOT use range filters which span multiple Groups in FETCH or
461-
SUBSCRIBE. SUBSCRIBE and FETCH delivery use Group Order, so they could have
460+
Tracks SHOULD NOT use range filters which span multiple Groups in
461+
SUBSCRIBE. SUBSCRIBE uses Group Order, which could have
462462
an unexpected delivery order if Group IDs do not increase with time.
463463

464464
The amount of time elapsed between publishing an Object in Group ID N and in a
@@ -565,8 +565,8 @@ include:
565565

566566
The above list of conditions is not considered exhaustive.
567567

568-
When a subscriber detects a Malformed Track, it MUST UNSUBSCRIBE any
569-
subscription and FETCH_CANCEL any fetch for that Track from that publisher, and
568+
When a subscriber detects a Malformed Track, it MUST unsubscribe from any
569+
subscription for that Track from that publisher, and
570570
SHOULD deliver an error to the application. If a relay detects a Malformed
571571
Track, it MUST immediately terminate downstream subscriptions with PUBLISH_DONE
572572
and reset any fetch streams with Status Code `MALFORMED_TRACK`. Object(s)
@@ -818,8 +818,7 @@ The server sends a GOAWAY message, signaling the client to establish a new
818818
session and migrate any `Established` subscriptions. The GOAWAY message optionally
819819
contains a new URI for the new session, otherwise the current URI is
820820
reused. The server SHOULD close the session with `GOAWAY_TIMEOUT` after a
821-
sufficient timeout if there are still open subscriptions or fetches on a
822-
connection.
821+
sufficient timeout if there are still open subscriptions on a connection.
823822

824823
When the server is a subscriber, it SHOULD send a GOAWAY message to downstream
825824
subscribers prior to any UNSUBSCRIBE messages to upstream publishers.
@@ -935,9 +934,7 @@ response to a PUBLISH. The peer SHOULD close the session with a protocol error
935934
if it receives more than one.
936935

937936
A publisher MUST save the Largest Location communicated in PUBLISH or
938-
SUBSCRIBE_OK when establishing a subscription. This value can be used in a
939-
Joining FETCH (see {{joining-fetches}}) at any time while the subscription is
940-
active.
937+
SUBSCRIBE_OK when establishing a subscription.
941938

942939
All `Established` subscriptions have a Forward State which is either 0 or 1.
943940
The publisher does not send Objects if the Forward State is 0, and does send them
@@ -1036,6 +1033,11 @@ to network reordering or prioritization, relays can receive Objects with
10361033
Locations smaller than `Largest Object` after the SUBSCRIBE is processed, but
10371034
these Objects do not pass the Largest Object filter.
10381035

1036+
Relative Past Group (0x5): The number of Groups in the past is specified explicitly.
1037+
The filter Start Location is `{Largest Object.Group - NumGroups, 0}`. There is no
1038+
End Group - the subscription is open ended. A NumGroups value of 0 starts the
1039+
subscription at at the current Group.
1040+
10391041
Next Group Start (0x1): The filter Start Location is `{Largest Object.Group + 1,
10401042
0}` and `Largest Object` is communicated in SUBSCRIBE_OK. If no content has been
10411043
delivered yet, the filter Start Location is {0, 0}. There is no End Group -
@@ -1067,8 +1069,7 @@ request an existing Group or wait for a future Group. Different applications
10671069
will have different approaches for when to begin a new Group.
10681070

10691071
To join a Track at a past Group, the subscriber sends a SUBSCRIBE with Filter
1070-
Type `Largest Object` followed by a Joining FETCH (see {{joining-fetches}}) for
1071-
the intended start Group, which can be relative. To join a Track at the next
1072+
Type `Relative Past Group`. To join a Track at the next
10721073
Group, the subscriber sends a SUBSCRIBE with Filter Type `Next Group Start`.
10731074

10741075
#### Dynamically Starting New Groups
@@ -1093,27 +1094,6 @@ Another possible subscriber pattern is to send a SUBSCRIBE with Filter Type
10931094
DYNAMIC_GROUPS in SUBSCRIBE_OK will indicate if the publisher supports dynamic
10941095
groups. A publisher that does will begin the next group as soon as practical.
10951096

1096-
## Fetch State Management
1097-
1098-
The publisher MUST send exactly one FETCH_OK or REQUEST_ERROR in response to a
1099-
FETCH.
1100-
1101-
A subscriber keeps FETCH state until it sends FETCH_CANCEL, receives
1102-
REQUEST_ERROR, or receives a FIN or RESET_STREAM for the FETCH data stream. If the
1103-
data stream is already open, it MAY send STOP_SENDING for the data stream along
1104-
with FETCH_CANCEL, but MUST send FETCH_CANCEL.
1105-
1106-
The Publisher can destroy fetch state as soon as it has received a
1107-
FETCH_CANCEL. It MUST reset any open streams associated with the FETCH. It can
1108-
also destroy state after closing the FETCH data stream.
1109-
1110-
It can destroy all FETCH state after closing the data stream with a FIN.
1111-
1112-
A REQUEST_ERROR indicates that both endpoints can immediately destroy state.
1113-
Since a relay can start delivering FETCH Objects from cache before determining
1114-
the result of the request, some Objects could be received even if the FETCH
1115-
results in error.
1116-
11171097

11181098
# Namespace Discovery {#track-discovery}
11191099

@@ -1379,17 +1359,17 @@ deduplicate Objects before forwarding, subject to implementation constraints.
13791359

13801360
## Subscriber Interactions
13811361

1382-
Subscribers request Tracks by sending a SUBSCRIBE (see
1383-
{{message-subscribe-req}}) or FETCH (see {{message-fetch}}) control message for
1384-
each Track of interest. Relays MUST ensure subscribers are authorized to access
1385-
the content associated with the Track. The authorization information can be part
1386-
of request itself or part of the encompassing session. The specifics of how a
1387-
relay authorizes a user are outside the scope of this specification.
1362+
Subscribers request Tracks by sending a SUBSCRIBE (see {{message-subscribe-req}})
1363+
control message on a new bidirectional stream for each Track of interest.
1364+
Relays MUST ensure subscribers are authorized to access the content associated
1365+
with the Track. The authorization information can be part of request itself or
1366+
part of the encompassing session. The specifics of how a relay authorizes a user
1367+
are outside the scope of this specification.
13881368

13891369
The relay MUST have an `Established` upstream subscription before sending
13901370
SUBSCRIBE_OK in response to a downstream SUBSCRIBE. If a relay does not have
1391-
sufficient information to send a FETCH_OK immediately in response to a FETCH, it
1392-
MUST withhold sending FETCH_OK until it does.
1371+
sufficient information to send a SUBSCRIBE_OK, itMUST withhold sending
1372+
SUBSCRIBE_OK until it does.
13931373

13941374
Publishers maintain a list of `Established` downstream subscriptions for
13951375
each Track. Relays use the Track Alias ({{track-alias}}) of an incoming Object
@@ -1598,10 +1578,6 @@ The following Message Types are defined:
15981578
|-------|-----------------------------------------------------|
15991579
| 0xB | PUBLISH_DONE ({{message-publish-done}}) |
16001580
|-------|-----------------------------------------------------|
1601-
| 0x16 | FETCH ({{message-fetch}}) |
1602-
|-------|-----------------------------------------------------|
1603-
| 0x18 | FETCH_OK ({{message-fetch-ok}}) |
1604-
|-------|-----------------------------------------------------|
16051581
| 0xD | TRACK_STATUS ({{message-track-status}}) |
16061582
|-------|-----------------------------------------------------|
16071583
| 0x6 | PUBLISH_NAMESPACE ({{message-pub-ns}}) |
@@ -1833,7 +1809,7 @@ any other relevant information.
18331809
#### MAX CACHE DURATION Parameter {#max-cache-duration}
18341810

18351811
The MAX_CACHE_DURATION parameter (Parameter Type 0x04) MAY appear in a PUBLISH,
1836-
SUBSCRIBE_OK, FETCH_OK or REQUEST_OK (in response to TRACK_STATUS) message.
1812+
SUBSCRIBE_OK, or REQUEST_OK (in response to TRACK_STATUS) message.
18371813

18381814
It is an integer expressing
18391815
the number of milliseconds an Object can be served from a cache. If present, the
@@ -2312,8 +2288,7 @@ There are 4 types of subscriptions:
23122288
Code | Subscription Type
23132289
0x0 | Only newly published Objects
23142290
0x1 | Only previously published Objects
2315-
0x2 | All Objects, relative to Largest Object
2316-
0x3 | All Objects, with an absolute start
2291+
0x2 | All previously and newly published Objects
23172292

23182293
An endpoint that receives a Subscription Type greater than 0x3 MUST close
23192294
the session with a `PROTOCOL_VIOLATION`.

0 commit comments

Comments
 (0)