Skip to content

Commit 4d42a78

Browse files
authored
Allow the Track Alias to be selected by the publisher (#258)
Currently SUBSCRIBE_OK and OBJECT will race. If OBJECT wins (>50% chance for multi-threaded QUIC libraries), then the subscriber will receive an unknown OBJECT that needs to be buffered. Moving Track ID to SUBSCRIBE fixes this race, removes the need to buffer OBJECTs in the MoqT library, and simplifies the flow. See #145
2 parents 1416ad1 + 56e420a commit 4d42a78

File tree

1 file changed

+39
-30
lines changed

1 file changed

+39
-30
lines changed

draft-ietf-moq-transport.md

Lines changed: 39 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -400,19 +400,21 @@ Section 5}}).
400400
The application MAY use any error message and SHOULD use a relevant
401401
code, as defined below:
402402

403-
|------|--------------------|
404-
| Code | Reason |
405-
|-----:|:-------------------|
406-
| 0x0 | No Error |
407-
|------|--------------------|
408-
| 0x1 | Generic Error |
409-
|------|--------------------|
410-
| 0x2 | Unauthorized |
411-
|------|--------------------|
412-
| 0x3 | Protocol Violation |
413-
|------|--------------------|
414-
| 0x10 | GOAWAY Timeout |
415-
|------|--------------------|
403+
|------|-----------------------|
404+
| Code | Reason |
405+
|-----:|:----------------------|
406+
| 0x0 | No Error |
407+
|------|-----------------------|
408+
| 0x1 | Generic Error |
409+
|------|-----------------------|
410+
| 0x2 | Unauthorized |
411+
|------|-----------------------|
412+
| 0x3 | Protocol Violation |
413+
|------|-----------------------|
414+
| 0x4 | Duplicate Track Alias |
415+
|------|-----------------------|
416+
| 0x10 | GOAWAY Timeout |
417+
|------|-----------------------|
416418

417419
* No Error: The session is being terminated without an error.
418420

@@ -424,6 +426,9 @@ code, as defined below:
424426
* Protocol Violation: The remote endpoint performed an action that was
425427
disallowed by the specification.
426428

429+
* Duplicate Track Alias: The endpoint attempted to use a Track Alias
430+
that was already in use.
431+
427432
* GOAWAY Timeout: The session was closed because the client took too long to
428433
close the session in response to a GOAWAY ({{message-goaway}}) message.
429434
See session migration ({{session-migration}}).
@@ -862,8 +867,8 @@ OBJECT Message {
862867
~~~
863868
{: #moq-transport-object-format title="MOQT OBJECT Message"}
864869

865-
* Track Alias : The compressed full track name obtained as part of
866-
subscription and/or publish control message exchanges.
870+
* Track Alias :The track identifier as specified in the
871+
SUBSCRIBE message {{message-subscribe-req}}.
867872

868873
* Group ID : The object is a member of the indicated group ID
869874
{{model-group}} within the track.
@@ -931,6 +936,7 @@ The format of SUBSCRIBE is as follows:
931936
~~~
932937
SUBSCRIBE Message {
933938
Subscribe ID (i),
939+
Track Alias (i),
934940
Track Namespace (b),
935941
Track Name (b),
936942
StartGroup (Location),
@@ -942,18 +948,24 @@ SUBSCRIBE Message {
942948
~~~
943949
{: #moq-transport-subscribe-format title="MOQT SUBSCRIBE Message"}
944950

945-
* Track Namespace: Identifies the namespace of the track as defined in
946-
({{track-name}}).
947-
948-
* Track Name: Identifies the track name as defined in ({{track-name}}).
949-
950951
* Subscribe ID: The subscription identifier that is unique within the session.
951952
`Subscribe ID` is a monotonically increasing variable length integer which
952953
MUST not be reused within a session. `Subscribe ID` is used by subscribers and
953954
the publishers to identify a given subscription. Subscribers specify the
954955
`Subscribe ID` and it is included in the corresponding SUBSCRIBE_OK or
955956
SUBSCRIBE_ERROR messages.
956957

958+
* Track Alias: A session specific identifier for the track.
959+
Messages that reference a track, such as OBJECT ({{message-object}}),
960+
reference this Track Alias instead of the Track Name and Track Namespace to
961+
reduce overhead. If the Track Alias is already in use, the publisher MUST
962+
close the session with a Duplicate Track Alias error ({{session-termination}}).
963+
964+
* Track Namespace: Identifies the namespace of the track as defined in
965+
({{track-name}}).
966+
967+
* Track Name: Identifies the track name as defined in ({{track-name}}).
968+
957969
* StartGroup: The Location of the requested group. StartGroup's Mode MUST NOT be
958970
None.
959971

@@ -1042,9 +1054,6 @@ A SUBSCRIBE_OK control message is sent for successful subscriptions.
10421054
SUBSCRIBE_OK
10431055
{
10441056
Subscribe ID (i),
1045-
Track Namespace (b),
1046-
Track Name (b),
1047-
Track Alias (i),
10481057
Expires (i)
10491058
}
10501059
~~~
@@ -1057,11 +1066,6 @@ SUBSCRIBE_OK
10571066

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

1060-
* Track Alias: Session specific identifier that is used as an alias for the
1061-
Full Track Name in the Track Alias field of the OBJECT ({{message-object}})
1062-
message headers of the requested track. Track Aliases are shorter
1063-
than Full Track Names and thus reduce the overhead in OBJECT messages.
1064-
10651069
* Expires: Time in milliseconds after which the subscription is no
10661070
longer valid. A value of 0 indicates that the subscription stays active
10671071
until it is explicitly unsubscribed.
@@ -1078,6 +1082,7 @@ SUBSCRIBE_ERROR
10781082
Subscribe ID (i),
10791083
Error Code (i),
10801084
Reason Phrase (b),
1085+
Track Alias (i),
10811086
}
10821087
~~~
10831088
{: #moq-transport-subscribe-error format title="MOQT SUBSCRIBE_ERROR Message"}
@@ -1086,10 +1091,14 @@ SUBSCRIBE_ERROR
10861091

10871092
* Error Code: Identifies an integer error code for subscription failure.
10881093

1089-
* Reason Phrase Length: The length in bytes of the reason phrase.
1090-
10911094
* Reason Phrase: Provides the reason for subscription error.
10921095

1096+
* Track Alias: When Error Code is TBD, the subscriber SHOULD re-issue the
1097+
SUBSCRIBE with this Track Alias instead. If this Track Alias is already in use,
1098+
the receiver MUST close the connection with a Duplicate Track Alias error
1099+
({{session-termination}}).
1100+
TODO: Add a registry for subscribe error codes and make this field conditional.
1101+
10931102

10941103
## UNSUBSCRIBE {#message-unsubscribe}
10951104

0 commit comments

Comments
 (0)