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

Clarify subscribe / annouce interaction #525

Merged
merged 41 commits into from
Sep 20, 2024
Merged
Changes from 4 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
ef4e97b
start changes for announce
fluffy Sep 12, 2024
b9eb195
cleanup
fluffy Sep 12, 2024
983221b
add gracefull behavior
fluffy Sep 13, 2024
bae358d
clean up
fluffy Sep 13, 2024
9975e17
Merge branch 'main' into anc1
ianswett Sep 16, 2024
bc2bbd5
Editorial update to "Graceful Publisher Network Switchover"
ianswett Sep 16, 2024
d566967
Update draft-ietf-moq-transport.md
ianswett Sep 16, 2024
f48aadd
Update draft-ietf-moq-transport.md
ianswett Sep 16, 2024
206a023
Update draft-ietf-moq-transport.md
ianswett Sep 16, 2024
155cc70
Update draft-ietf-moq-transport.md
ianswett Sep 16, 2024
edde941
Update draft-ietf-moq-transport.md
ianswett Sep 16, 2024
5964caa
Update draft-ietf-moq-transport.md
ianswett Sep 16, 2024
252c203
Update draft-ietf-moq-transport.md
ianswett Sep 16, 2024
e7b3cc5
Update draft-ietf-moq-transport.md
ianswett Sep 16, 2024
2dbe780
Update draft-ietf-moq-transport.md
ianswett Sep 16, 2024
1e960a9
Merge branch 'main' into anc1
ianswett Sep 18, 2024
bd7003c
Update draft-ietf-moq-transport.md
fluffy Sep 18, 2024
4e3a0d4
Update draft-ietf-moq-transport.md
fluffy Sep 18, 2024
837408d
Update draft-ietf-moq-transport.md
fluffy Sep 18, 2024
365fb5a
Update draft-ietf-moq-transport.md
fluffy Sep 18, 2024
92da76a
Update draft-ietf-moq-transport.md
fluffy Sep 18, 2024
9a33793
Update draft-ietf-moq-transport.md
fluffy Sep 18, 2024
e7612b9
update handing of duplicats
fluffy Sep 18, 2024
50e5abd
Merge remote-tracking branch 'origin/anc1' into anc1
fluffy Sep 18, 2024
a8ca0c1
update to deal with all data cached case
fluffy Sep 18, 2024
4484de4
clean up ending of subscribes in relay
fluffy Sep 18, 2024
a4303a2
Update draft-ietf-moq-transport.md
fluffy Sep 18, 2024
d28baa5
Update draft-ietf-moq-transport.md
fluffy Sep 18, 2024
790c700
Update draft-ietf-moq-transport.md
ianswett Sep 18, 2024
263c6d1
Update draft-ietf-moq-transport.md
ianswett Sep 18, 2024
5de4ee8
Update draft-ietf-moq-transport.md
ianswett Sep 18, 2024
2c5397e
Update draft-ietf-moq-transport.md
ianswett Sep 18, 2024
08b9e0e
Update draft-ietf-moq-transport.md
ianswett Sep 18, 2024
8c8875a
Minor update
ianswett Sep 18, 2024
6e84e0a
Merge branch 'main' into anc1
ianswett Sep 18, 2024
38e0456
Merge branch 'main' into anc1
ianswett Sep 19, 2024
2cc1034
Update draft-ietf-moq-transport.md
ianswett Sep 20, 2024
5be3af3
Update draft-ietf-moq-transport.md
ianswett Sep 20, 2024
9708a36
Rewrite based on Alan's comment
ianswett Sep 20, 2024
f15edfa
Update draft-ietf-moq-transport.md
ianswett Sep 20, 2024
24c43db
Merge branch 'main' into anc1
ianswett Sep 20, 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
83 changes: 77 additions & 6 deletions draft-ietf-moq-transport.md
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,16 @@ subscribers for each track. Each new OBJECT belonging to the
track within the subscription range is forwarded to each active
subscriber, dependent on the congestion response. A subscription
remains active until the publisher of the track terminates the
track with a SUBSCRIBE_DONE (see {{message-subscribe-done}}).
track with a SUBSCRIBE_DONE (see {{message-subscribe-done}}). A
ianswett marked this conversation as resolved.
Show resolved Hide resolved
caching relay saves objects to its cache identified by the object's
fulltrackname, group ID and object ID. Relays MUST be
fluffy marked this conversation as resolved.
Show resolved Hide resolved
ready to process objects for the same fulltrackname from
multiple publishers and the objects received are forwarded
to active matching subscribers. If multiple objects are received
fluffy marked this conversation as resolved.
Show resolved Hide resolved
with the same fulltrackname, group ID and object ID - a caching
Relays MUST drop the received objects as duplicate if there exists
already an object with the matching fulltrackame, group ID and
object ID, in its cache.
fluffy marked this conversation as resolved.
Show resolved Hide resolved
fluffy marked this conversation as resolved.
Show resolved Hide resolved

Objects MUST NOT be sent for unsuccessful subscriptions, and if a subscriber
receives a SUBSCRIBE_ERROR after receiving objects, it MUST close the session
Expand Down Expand Up @@ -759,24 +768,47 @@ SUBSCRIBE_DONE, as defined below:
| 0x6 | Expired |
|------|---------------------------|

### Graceful Publisher Relay Switchover

This section describes non normative behavior that a subscriber MAY
choose to implement to allow for a better users experience when a relay
sends them a GOAWAY.

When a subscriber receives the GOAWAY message, it starts of the process
ianswett marked this conversation as resolved.
Show resolved Hide resolved
of connecting to the new relay and sending the SUBSCRIBE requests for
all it's active subscriptions to the new relay. The new relay will send a
ianswett marked this conversation as resolved.
Show resolved Hide resolved
response to the subscribes and once this has happened, the subscription
to the old relay can be stopped with an UNSUBSCRIBE.
fluffy marked this conversation as resolved.
Show resolved Hide resolved


## Publisher Interactions

Publishing through the relay starts with publisher sending ANNOUNCE
control message with a `Track Namespace` ({{model-track}}).
The annouce allows the relays to know which publisher to forward a
fluffy marked this conversation as resolved.
Show resolved Hide resolved
SUBSCRIBE to.

Relays MUST ensure that publishers are authorized by:

- Verifying that the publisher is authorized to publish the content
associated with the set of tracks whose Track Namespace matches the
announced namespace. Specifics of where the authorization happens,
either at the relays or forwarded for further processing, depends on
the way the relay is managed and is application specific (typically
based on prior business agreement).
announced namespace. Specifics of where the authorization and
identification of the publisher happens either at the relays or
forwarded for further processing, depends on the way the relay is
managed and is application specific (typically based on prior business
agreement).
fluffy marked this conversation as resolved.
Show resolved Hide resolved
ianswett marked this conversation as resolved.
Show resolved Hide resolved

Relays respond with an ANNOUNCE_OK or ANNOUNCE_ERROR control message
providing the result of announcement. The entity receiving the
ANNOUNCE MUST send only a single response to a given ANNOUNCE of
either ANNOUNCE_OK or ANNOUNCE_ERROR. When a publisher wants to stop
either ANNOUNCE_OK or ANNOUNCE_ERROR.

A Relay can receive announcements from multiple publishers for the same
tracknamespace and it MUST respond with appropriate response to each of the
Copy link
Collaborator

Choose a reason for hiding this comment

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

To clarify, what is the appropriate response?

ianswett marked this conversation as resolved.
Show resolved Hide resolved
publishers, in the same way as it would responds when processing ANNOUNCE
ianswett marked this conversation as resolved.
Show resolved Hide resolved
from a single publisher for a given tracknamespace.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can relays limit the number of publishers for a given namespace? It seems like for DoS reasons they can. Maybe we should specify a minimum: "Relays MUST support at least X publishers announcing the same namespace"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

well ... I suspect this is going to fall in policy for relays region. Lets say you have 10 million viewers of a Taylor Swift livestream that can all publish text comments to various chat tracks. You OK with the number of max publishers on the same namespace being in the millions ? It seems that different relays will want very different limits here.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I was hoping SUBSCRIBE_NAMESPACE would solve some of that problem -- all 10M viewers have their own namespace tswift/chat/unique_id. We may need to indicate here what limits are likely to exist, because it influences how higher level protocols will use moqt in terms of namespace and track naming.

Agreed the max will be different, but is there a min that we need to specify to get basic interop, eg: for make-before-break, min=2.


When a publisher wants to stop
new subscriptions for an announced namespace it sends an UNANNOUNCE.
A subscriber indicates it will no longer route subscriptions for a
namespace it previously responded ANNOUNCE_OK to by sending an
Copy link
Collaborator

Choose a reason for hiding this comment

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

Unrelated to this PR: Now that I'm understanding ANNOUNCE more, OK and CANCEL feel odd. Routing protocols are normally ANNOUNCE/UNANNOUNCE and that's it. I'm unsure what one does with ANNOUNCE_OK and ANNOUNCE_CANCEL?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've got no idea :-) We need an error to ANNOUNCE for auth errors, so it makes sense to have an OK just to know there was no error. But I have no idea why we need CANCEL

Copy link
Collaborator

Choose a reason for hiding this comment

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

ANNOUNCE_CANCEL is used in the below flow IIYC

sequenceDiagram
    Publisher->>Relay(Subscriber): Announce
    Relay(Subscriber)->>Publisher: Announce Ok
    Relay(Subscriber)->>Publisher: Subscribe
    Publisher->>Relay(Subscriber): Subscribe OK
    Publisher->Relay(Subscriber): Objects Flow
    Note right of Relay(Subscriber):  Relays is unable to support new subscriptions 
    Relay(Subscriber)->>Publisher: Announce Cancel 
Loading

Existing subscriptions will still get served, but new subscriptions will not be sent to the publisher anymore.

Expand All @@ -788,13 +820,52 @@ match on track namespace unless otherwise negotiated by the application.
For example, a SUBSCRIBE namespace=foobar message will be forwarded to
the session that sent ANNOUNCE namespace=foobar.

When a relay receives an incoming SUBSCRIBE for a given namespace, for
each publisher that has announced that namespace, the relay MUST send a
fluffy marked this conversation as resolved.
Show resolved Hide resolved
SUBSCRIBE to that publisher unless it already has an active subscription
fluffy marked this conversation as resolved.
Show resolved Hide resolved
to that publisher for the full track name in the incoming SUBSCRIBE.
fluffy marked this conversation as resolved.
Show resolved Hide resolved

When a relay receives an incoming ANNOUCE for a given namespace, for
each active subscription that matches that namespace, it MUST send a
fluffy marked this conversation as resolved.
Show resolved Hide resolved
SUBSCRIBE to that publisher that send the ANNOUCE.
fluffy marked this conversation as resolved.
Show resolved Hide resolved

OBJECT message headers carry a short hop-by-hop `Track Alias` that maps to
the Full Track Name (see {{message-subscribe-ok}}). Relays use the
`Track Alias` of an incoming OBJECT message to identify its track and find
the active subscribers for that track. Relays MUST forward OBJECT messages to
matching subscribers in accordance to each subscription's priority, group order,
and delivery timeout.

### Graceful Publisher Network Switchover

This section describes non normative behavior that a publisher MAY
ianswett marked this conversation as resolved.
Show resolved Hide resolved
choose to implement to allow for a better users experience when
switching from WiFi to Cellular networks or visa versa.
ianswett marked this conversation as resolved.
Show resolved Hide resolved

If the publisher detects it is likely to need to switch over, for
example by seeing the WiFi signal is starting to get weaker, it sends a
new an new ANNOUCE over the cellular network to the relay network. The
relay will forward the matching subscribes and the client can start
publishing on both the WiFi and cellular. Once the subscriptions have
over to the new network, the publisher can stop publishing object on the
old network. The relay will drop any duplicate objects received on
both. the subscribes downstream from the relay do no see anything as
changed, and keep receiving the objects on the same subscription.

### Graceful Publisher Relay Switchover

This section describes non normative behavior that a publisher MAY
choose to implement to allow for a better users experience when a relay
sends them a GOAWAY.
ianswett marked this conversation as resolved.
Show resolved Hide resolved

When a publisher receives the GOAWAY, it starts of the process of
connecting to the new relay and sending the announces, but it does not
stop publishing data to the old relay. The new relay will send the
subscribes and the publisher and at this point the publisher can start
sending any new data to new relay instead of the old relay. Once data is
going to the new relay, the announcement and connection to the old relay
can be stopped.

## Relay Object Handling

MOQT encodes the delivery information for a stream via OBJECT headers
Expand Down
Loading