Repository navigation
refactor!: SubscriptionExt, layout and endpoint config in iroh-live-node, explicit media re-exports - #98
Closed
Frando wants to merge 4 commits into
Closed
refactor!: SubscriptionExt, layout and endpoint config in iroh-live-node, explicit media re-exports#98Frando wants to merge 4 commits into
Frando wants to merge 4 commits into
Conversation
moq-transport-iroh returned no send groups, so moq-net ranked every group stream of a session in one queue, where the older of two equal-priority subscriptions goes first. Under a held bandwidth cap a rendition switch never landed: the replacement's first group waited behind the incumbent's backlog, which never drained. `Transport::send_group` now returns a `SendGroup`. iroh schedules a stream by an i32 priority, so the group priority and each stream's dense rank by order within its group are packed into it (group * 16 + 15 - tier), with ungrouped streams at 2^29 and up, above every group. The heads of equal-priority groups share one priority, and noq sends streams of one priority round robin while send fairness is on, its default, so they share the bytes. A group's older streams wait for its head, and a higher group outranks every tier of a lower one. A stream joining, leaving or moving reranks its group, which reaches the other streams through a shared handle. Unlike moq-quic's deficit round robin, fairness is per stream and only within a tier: a group whose head is idle does not hand its share to its backlog. With send fairness turned off the older group goes first again; RFC 9218's incremental flag, which n0-computer/noq#859 adds, would remove that dependency. `a_switch_lands_while_the_link_stays_capped` is no longer ignored. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The free function `media::remote_broadcast(&subscription)` was hard to find, since users look for a method on `Subscription` first. The node crate has no media dependency, so `Subscription` cannot carry the method itself. The facade now adds it through the extension trait `media::SubscriptionExt`, and the free function is removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The relay depended on the facade for `LiveLayout`, `EndpointConfig`, `BroadcastTicket` and the rooms layout, so the facade's dependency direction was inverted. Both types only need the node, so they now live in `iroh-live-node` as `layout` and `EndpointConfig`, `Mdns` and `load_or_create_secret_key`. The facade re-exports them at the same paths. The relay now depends on `iroh-live-node` and `iroh-live-rooms` only, and keeps the facade as a dev-dependency for its media tests. Binding errors move into the node's error as `SecretKey` and `Bind`, and still convert into `iroh_live::Error` through its `Node` variant. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`iroh_live::media` re-exported `moq_ext_player::*` and `moq_ext_publisher::*`, so every new item of either crate became facade API without review, and a later name clash would turn into an ambiguity error in user code. The module now names each item. The facade's crate docs say once which error each call returns and that all of them convert into `iroh_live::Error`, and the node's examples call the node `node` rather than `moq`, a leftover of the `Moq` rename. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Frando
force-pushed
the
Frando/send-groups
branch
from
November 16, 2026 11:12
59369d6 to
cf14b6d
Compare
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #96. It has three small API cleanups, one per commit.
1.
SubscriptionExt::remote_broadcast()The free function
iroh_live::media::remote_broadcast(&subscription)was hard to find, because users look for a method onSubscriptionfirst.Subscriptionlives iniroh-live-node, which has no media dependency, so the method cannot be inherent. The facade now adds it through the extension traitiroh_live::media::SubscriptionExt, and the free function is removed.2. Layout and endpoint setup move to
iroh-live-nodeiroh-live-relaydepended on the facade only forLiveLayout,EndpointConfig,BroadcastTicketand the rooms part of the layout grant. That inverted the dependency direction: the relay sits below the facade. These types need only the node, so they now live iniroh-live-node:iroh_live_node::layout(withLiveLayout,grantandpolicy);iroh_live_node::{EndpointConfig, Mdns, load_or_create_secret_key}.The facade re-exports them at the old paths (
iroh_live::layout,iroh_live::EndpointConfigand so on), so code that imports them fromiroh_livedoes not change. The mDNS dependencyiroh-mdns-peer-lookupmoves from the facade to the node with them.The binding errors move with
EndpointConfig.iroh_live::Error::SecretKeyandiroh_live::Error::Bindare gone. They are nowiroh_live_node::Error::SecretKeyandiroh_live_node::Error::Bind, and they reachiroh_live::Errorthrough itsNodevariant. Code that propagates with?does not change. Code that matches on the two variants must matchError::Node(node::Error::Bind { .. })instead.The relay now depends on the node and on
iroh-live-roomsdirectly. It keeps the facade only as a dev-dependency, for the tests that publish and play real media through it. A new test iniroh-live-roomschecks that the live and rooms layouts compose into one policy.iroh-live-relayiroh-live(featurerooms),iroh-live-node,moq-transport-irohiroh-live-node,iroh-live-rooms,moq-transport-irohiroh-liveiroh-live-node,iroh-mdns-peer-lookup, ...iroh-live-node, ...iroh-live-nodeiroh-mdns-peer-lookupThe relay's dev-dependencies keep
iroh-livewithmediaandrooms.iroh-live-roomsmoves from the relay's dev-dependencies to its normal dependencies.3. Explicit re-exports in
iroh_live::mediairoh_live::mediare-exportedmoq_ext_player::*andmoq_ext_publisher::*. Every new item of either crate thus became facade API without review, and a later name clash between the two would become an ambiguity error in user code. The module now names each item. The list matches what the globs exported, except the hiddentest_utilmodule. The commit also adds a paragraph to the facade's crate docs: it says which error each call returns, and that all of them convert intoiroh_live::Error. The node's examples now call the nodenode, notmoq.Public API changes
iroh_live::media::remote_broadcast(&subscription)subscription.remote_broadcast(), fromiroh_live::media::SubscriptionExtiroh_live::Error::SecretKey,iroh_live::Error::Bindiroh_live_node::Error::SecretKey,iroh_live_node::Error::Bind, insideiroh_live::Error::Nodeiroh_live::layout,iroh_live::{EndpointConfig, Mdns, load_or_create_secret_key}iroh_live_nodeiroh_live::media::*from two globsdocs/migration.mdlists the first two rows.Tests
On this branch, rebased onto the new #96:
cargo make check-all(5 check configs, clippy-D warningsin 3 configs, the configured fmt check) andcargo fmt --checkpass.cargo nextest run --workspace --all-features: 656 passed, 4 skipped.cargo test --doc --workspace --all-featurespasses.scripts/check-links.py: 364 links, none broken.🤖 Generated with Claude Code