Skip to content

Commit a4de94a

Browse files
committed
moq-lite-05: revert broadcast Epoch addition
Remove the Epoch field from ANNOUNCE_BROADCAST and all associated prose (the Broadcast-section overview, the cross-stream conflict resolution paragraph, the field description, and the tiebreaker wording), restoring path length as the sole tiebreaker between multiple paths to the same broadcast. The ANNOUNCE message renames from the same change are retained. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011meTAeUxiib7Ns2vd6Vzg5
1 parent 5782aaf commit a4de94a

1 file changed

Lines changed: 2 additions & 20 deletions

File tree

draft-lcurley-moq-lite.md

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,6 @@ These announcements are live and can change over time, allowing for dynamic orig
118118
A broadcast consists of any number of Tracks.
119119
The contents, relationships, and encoding of tracks are determined by the application.
120120

121-
Each broadcast carries an opaque `Epoch` that orders its instances, larger meaning newer (see [ANNOUNCE_BROADCAST](#announce-broadcast)).
122-
When a subscriber discovers the same broadcast from more than one publisher — most commonly a reconnecting publisher whose new session overlaps a not-yet-expired prior one — it uses the Epoch to route subscriptions to the newest instance instead of waiting for the stale one to time out.
123-
124121
## Track
125122
A Track is a series of Groups identified by a unique name within a Broadcast.
126123

@@ -292,7 +289,6 @@ An `active` announcement makes the broadcast available; a subsequent `ended` mak
292289
A publisher SHOULD advertise only the best path it knows for each broadcast.
293290
If the best path changes (e.g. a relay failover or upstream restart), the publisher MAY send another `active` for that broadcast: the new announcement atomically replaces the prior one (equivalent to UNANNOUNCE+ANNOUNCE_BROADCAST).
294291
A publisher MUST NOT keep multiple `active` advertisements for the same broadcast on the same stream — each broadcast has at most one current advertisement at a time.
295-
A subscriber that sees the same broadcast advertised across multiple streams SHOULD resolve the conflict using each advertisement's `Epoch` (newer wins), as described in [ANNOUNCE_BROADCAST](#announce-broadcast).
296292

297293
The subscriber MUST reset the stream if it receives an `ended` for a broadcast that is not currently `active`, or any ANNOUNCE_BROADCAST before ANNOUNCE_OK.
298294
When the stream is closed, the subscriber MUST assume that all broadcasts are now `ended`.
@@ -676,7 +672,7 @@ Any ANNOUNCE_BROADCAST messages beyond `Active Count` are live updates and SHOUL
676672
A value of `0` is valid and means the publisher is offering no initial active broadcasts; all subsequent ANNOUNCEs (if any) are live updates.
677673

678674

679-
## ANNOUNCE_BROADCAST {#announce-broadcast}
675+
## ANNOUNCE_BROADCAST
680676
A publisher sends an ANNOUNCE_BROADCAST message to advertise a change in broadcast availability.
681677
Only the suffix is encoded on the wire, as the full path can be constructed by prepending the requested prefix.
682678

@@ -690,7 +686,6 @@ ANNOUNCE_BROADCAST Message {
690686
Message Length (i)
691687
Announce Status (i),
692688
Broadcast Path Suffix (s),
693-
Epoch (i),
694689
Hop Count (i),
695690
Hop ID (64) ...,
696691
}
@@ -705,18 +700,6 @@ A flag indicating the announce status.
705700
**Broadcast Path Suffix**:
706701
This is combined with the broadcast path prefix to form the full broadcast path.
707702

708-
**Epoch**:
709-
An opaque value identifying this instance of the broadcast.
710-
Its meaning is application-defined; moq-lite requires only that a newer instance of the same broadcast carries a larger value than an older one (for example a timestamp, but any monotonically increasing counter works).
711-
It is assigned once by the origin publisher, and relays MUST forward it unchanged; unlike the Hop ID list it is not modified along the path.
712-
713-
When the subscriber learns of the same broadcast (same path) from more than one current `active` advertisement — for example a reconnecting publisher whose new session races the not-yet-timed-out session of a prior instance — it SHOULD route subscriptions to the advertisement with the larger Epoch, and use total path length (see Hop Count) only to break ties between equal Epochs.
714-
This lets a subscriber switch to a freshly reconnected publisher immediately, rather than waiting for the stale session to time out.
715-
For an `ended` advertisement, the Epoch identifies which instance ended: a subscriber that has already moved to a larger Epoch MAY ignore an `ended` carrying a smaller one.
716-
A value of 0 means the publisher does not assign an Epoch; such advertisements are resolved by path length alone.
717-
718-
The Epoch is a variable-length integer, so smaller values are more compact on the wire; a publisher deriving it from a timestamp SHOULD measure from a recent reference point (e.g. seconds since 2020) rather than the Unix epoch to keep the value within a 4-byte varint.
719-
720703
**Hop Count**:
721704
The number of Hop ID entries that follow, NOT including the publisher's own `Hop ID` from ANNOUNCE_OK.
722705
A value of 0 means no Hop ID entries are present, indicating either that the announcement originated locally on the publisher (the publisher itself is the origin) or that the upstream peer does not support hop tracking.
@@ -726,7 +709,7 @@ A receiver MUST close the stream with a PROTOCOL_VIOLATION if the Hop Count does
726709
A unique identifier for each relay in the path from the origin publisher, ordered from origin to the upstream of the responding publisher, each encoded as a 64-bit integer (see ANNOUNCE_OK's `Hop ID` for the rationale).
727710
The responding publisher's own Hop ID is NOT included in this list; it is carried once in ANNOUNCE_OK as `Hop ID`.
728711
When forwarding an announcement received from an upstream peer, a relay MUST append the upstream peer's ANNOUNCE_OK `Hop ID` to this list (since that ID is no longer implicit downstream) and then send its own `Hop ID` in the ANNOUNCE_OK it sends to the downstream subscriber.
729-
The total path length is `Hop Count + 1` (including the implicit ANNOUNCE_OK `Hop ID`); this total breaks ties between multiple paths to the same broadcast that carry the same `Epoch` (the larger `Epoch` wins outright).
712+
The total path length is `Hop Count + 1` (including the implicit ANNOUNCE_OK `Hop ID`); this total is used as a tiebreaker when there are multiple paths to the same broadcast.
730713
A Hop ID value of 0 indicates an unknown or bridged relay hop (e.g. when bridging from an older protocol version that does not assign Hop IDs); the Hop Count still reflects the total number of entries including unknown hops.
731714

732715

@@ -1071,7 +1054,6 @@ A generic library or relay MUST NOT inspect or modify the decompressed contents
10711054
# Appendix A: Changelog
10721055

10731056
## moq-lite-05
1074-
- Added an `Epoch` field to ANNOUNCE_BROADCAST (a varint, before the Hop ID list): an opaque, application-defined value ordering instances of a broadcast, where larger means newer. It is origin-assigned and forwarded unchanged by relays. Subscribers resolve duplicate advertisements of the same broadcast by largest `Epoch` first (path length only breaks ties), so a reconnecting publisher can take over immediately instead of waiting for the stale session to time out.
10751057
- Renamed ANNOUNCE_INTEREST to ANNOUNCE_REQUEST (the subscriber's request to receive announcements) and ANNOUNCE to ANNOUNCE_BROADCAST (the publisher's per-broadcast advertisement). ANNOUNCE_OK is unchanged. Wire format otherwise unchanged.
10761058
- Added a SETUP message, sent once on a unidirectional Setup Stream (0x1) at the start of the session and FIN'd immediately. It carries a list of Setup Parameters for negotiating optional capabilities and extensions per-hop, replacing the prior stream-probing approach (version is still negotiated via ALPN, not SETUP). Endpoints keep exchanging non-Setup streams without waiting for SETUP, buffering only a stream whose encoding a negotiated extension would change; unknown stream types are still reset as a fallback.
10771059
- Added a SETUP `Probe` parameter advertising the publisher's capability level: `None`, `Report` (measure and report the estimated bitrate), or `Increase` (additionally pad to probe for bandwidth above the current sending rate). The levels are nested since probing without measuring is meaningless. A subscriber must not rely on a level the publisher did not advertise.

0 commit comments

Comments
 (0)