Skip to content

feat: add WatchReaders reader-join stream to v3 RelayService - #6

Merged
alvgaona merged 1 commit into
mainfrom
feature/rew-218
Jul 30, 2026
Merged

feat: add WatchReaders reader-join stream to v3 RelayService#6
alvgaona merged 1 commit into
mainfrom
feature/rew-218

Conversation

@alvgaona

@alvgaona alvgaona commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

The bridge needs to know when a reader joins the relay's message stream so it can replay latched topics that the relay's bounded history evicted. The relay observes joins but had no way to announce them. This adds the announcement channel to the v3 relay service as a server-streaming rpc, named for the observed fact rather than today's most common client, since a viewer is the typical reader and a data-platform uploader is another.

Changes

  • WatchReaders(WatchReadersRequest) returns (stream ReaderEvent) on rewire.v3.RelayService
  • ReaderEvent carries a monotonic join count and nothing else, no reader identity. The stream opens with one event carrying the current count so a freshly connected watcher learns the baseline, and a count lower than previously seen tells a watcher the relay restarted
  • Generated v3 code regenerated with the pixi run generate-proto task. Unrelated codegen churn in v1 and v2 is excluded

Related

Checklist

  • PR title follows Conventional Commits
  • pixi run sanity passes locally (check + fmt + lint + test)
  • cargo clippy --all-features --all-targets -- -D warnings is clean
  • cargo doc --no-deps --all-features builds without warnings
  • Tests added or updated for the change — the rpc is wire schema plus generated code, exercised end to end by the consuming bridge test suite

Breaking changes

None. The rpc is additive and existing clients are unaffected. Servers that predate it answer unimplemented, which the bridge treats as feature absence.

@alvgaona alvgaona changed the title feat: add WatchViewers viewer-join stream to v3 RelayService feat: add WatchReaders reader-join stream to v3 RelayService Jul 30, 2026
@alvgaona
alvgaona merged commit 247bb0f into main Jul 30, 2026
3 checks passed
@alvgaona
alvgaona deleted the feature/rew-218 branch July 30, 2026 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant