Skip to content

Commit 108ad08

Browse files
authored
Create a new top-level section for Subscribe and Fetch (#754)
These are the core functionality of MoQT, I think they deserve a section. I'll move more text into the section in a different PR, but I wanted to ensure I was going in the right direction.
2 parents 0737ed2 + 91a655f commit 108ad08

File tree

1 file changed

+39
-36
lines changed

1 file changed

+39
-36
lines changed

draft-ietf-moq-transport.md

Lines changed: 39 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,42 @@ and announcements. The client can choose to delay closing the session if it
628628
expects more OBJECTs to be delivered. The server closes the session with a
629629
'GOAWAY Timeout' if the client doesn't close the session quickly enough.
630630

631-
# Track Discovery and Retrieval {#track-discovery}
631+
# Retrieving Tracks with Subscribe and Fetch
632+
633+
The central interaction with a publisher is to send SUBSCRIBE and/or FETCH for
634+
a particular track. The subscriber expects to receive a SUBSCRIBE_OK/FETCH_OK
635+
and objects from the track.
636+
637+
A publisher MUST send exactly one SUBSCRIBE_OK or SUBSCRIBE_ERROR in response to
638+
a SUBSCRIBE. It MUST send exactly one FETCH_OK or FETCH_ERROR in response to a
639+
FETCH. The subscriber SHOULD close the session with a protocol error if it
640+
receives more than one.
641+
642+
A subscriber keeps SUBSCRIBE state until it sends UNSUBSCRIBE, or after receipt
643+
of a SUBSCRIBE_DONE or SUBSCRIBE_ERROR. Note that SUBSCRIBE_DONE does not
644+
usually indicate that state can immediately be destroyed, see
645+
{{message-subscribe-done}}.
646+
647+
A subscriber keeps FETCH state until it sends FETCH_CANCEL, receives
648+
FETCH_ERROR, or receives a FIN or RESET_STREAM for the FETCH data stream. If the
649+
data stream is already open, it MAY send STOP_SENDING for the data stream along
650+
with FETCH_CANCEL, but MUST send FETCH_CANCEL.
651+
652+
The Publisher can destroy subscription or fetch state as soon as it has received
653+
UNSUBSCRIBE or FETCH_CANCEL, respectively. It MUST reset any open streams
654+
associated with the SUBSCRIBE or FETCH. It can also destroy state after closing
655+
the FETCH data stream.
656+
657+
The publisher can immediately delete SUBSCRIBE state after sending
658+
SUBSCRIBE_DONE, but MUST NOT send it until it has closed all related streams. It
659+
can destroy all FETCH state after closing the data stream.
660+
661+
A SUBSCRIBE_ERROR or FETCH_ERROR indicates no objects will be delivered, and
662+
both endpoints can immediately destroy relevant state. Objects MUST NOT be sent
663+
for requests that end with an error.
664+
665+
666+
# Namespace Discovery and Routing Subscriptions {#track-discovery}
632667

633668
Discovery of MoQT servers is always done out-of-band. Namespace discovery can be
634669
done in the context of an established MoQT session.
@@ -641,7 +676,8 @@ publishers for a namespace.
641676

642677
The syntax of these messages is described in {{message}}.
643678

644-
## SUBSCRIBE_ANNOUNCES
679+
680+
## Subscribing to Announcements
645681

646682
If the subscriber is aware of a namespace of interest, it can send
647683
SUBSCRIBE_ANNOUNCES to publishers/relays it has established a session with. The
@@ -660,7 +696,7 @@ further publishers to contact.
660696
An UNSUBSCRIBE_ANNOUNCES withdraws a previous SUBSCRIBE_ANNOUNCES. It does
661697
not prohibit the receiver (publisher) from sending further ANNOUNCE messages.
662698

663-
## ANNOUNCE
699+
## Announcements
664700

665701
A publisher MAY send ANNOUNCE messages to any subscriber. An ANNOUNCE indicates
666702
to the subscriber where to route a SUBSCRIBE or FETCH for that namespace. A
@@ -698,44 +734,11 @@ not a full-fledged routing protocol and does not protect against loops and other
698734
phenomena. In particular, ANNOUNCE SHOULD NOT be used to find paths through
699735
richly connected networks of relays.
700736

701-
## SUBSCRIBE/FETCH
702-
703-
The central interaction with a publisher is to send SUBSCRIBE and/or FETCH for
704-
a particular track. The subscriber expects to receive a
705-
SUBSCRIBE_OK/FETCH_OK and objects from the track.
706-
707737
A subscriber MAY send a SUBSCRIBE or FETCH for a track to any publisher. If it
708738
has accepted an ANNOUNCE with a namespace that exactly matches the namespace for
709739
that track, it SHOULD only request it from the senders of those ANNOUNCE
710740
messages.
711741

712-
A publisher MUST send exactly one SUBSCRIBE_OK or SUBSCRIBE_ERROR in response to
713-
a SUBSCRIBE. It MUST send exactly one FETCH_OK or FETCH_ERROR in response to a
714-
FETCH. The subscriber SHOULD close the session with a protocol error if it
715-
receives more than one.
716-
717-
A subscriber keeps SUBSCRIBE state until it sends UNSUBSCRIBE, or after receipt
718-
of a SUBSCRIBE_DONE or SUBSCRIBE_ERROR. Note that SUBSCRIBE_DONE does not
719-
usually indicate that state can immediately be destroyed, see
720-
{{message-subscribe-done}}.
721-
722-
A subscriber keeps FETCH state until it sends FETCH_CANCEL, receives
723-
FETCH_ERROR, or receives a FIN or RESET_STREAM for the FETCH data stream. If the
724-
data stream is already open, it MAY send STOP_SENDING for the data stream along
725-
with FETCH_CANCEL, but MUST send FETCH_CANCEL.
726-
727-
The Publisher can destroy subscription or fetch state as soon as it has received
728-
UNSUBSCRIBE or FETCH_CANCEL, respectively. It MUST reset any open streams
729-
associated with the SUBSCRIBE or FETCH. It can also destroy state after closing
730-
the FETCH data stream.
731-
732-
The publisher can immediately delete SUBSCRIBE state after sending
733-
SUBSCRIBE_DONE, but MUST NOT send it until it has closed all related streams. It
734-
can destroy all FETCH state after closing the data stream.
735-
736-
A SUBSCRIBE_ERROR or FETCH_ERROR indicates no objects will be delivered, and
737-
both endpoints can immediately destroy relevant state. Objects MUST NOT be sent
738-
for requests that end with an error.
739742

740743
# Priorities {#priorities}
741744

0 commit comments

Comments
 (0)