Skip to content

Deliver each topic through its own Socket.IO room - #1004

Closed
bracyw wants to merge 1 commit into
developfrom
993-deliver-each-topic-through-its-own-socket-io-room
Closed

bracyw wants to merge 1 commit into
developfrom
993-deliver-each-topic-through-its-own-socket-io-room

Conversation

@bracyw

@bracyw bracyw commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator

Changes

scylla-server sends each data message only to sockets in its topic's Socket.IO room. A client subscribes with a set_subscriptions event (full list, acked with a count) or in the connect handshake's auth topics; once it has, it never gets every topic again. Clients that never subscribe stay on an every-topic room, so older clients keep working. Topics nobody reads are skipped before serializing. ADR 0009 records the decision.

Diagram

flowchart LR
  C[client] -- topics at connect / set_subscriptions --> S[scylla-server]
  S -- only its rooms' topics --> C
  S -- every topic --> O[client that never subscribes]
Loading

Testing

  • 13 new unit tests, including one that fails if the fence keeping a socket out of both the every-topic room and a topic room is removed
  • Live against Calypso over MQTT with Node clients: an old client got every topic, a handshake client only its topic, an empty handshake nothing, and set_subscriptions narrowed then stopped delivery

Notes

Checklist

  • Commits are tagged with the ticket number
  • Lint, format and tests pass
  • No merge conflicts
  • All checks passing
  • Screenshots of UI changes (see Screenshots)
  • No package-lock.json changes unless dependencies changed
  • Request reviewers & ping on Slack

Closes #993


Generated by Claude Code

Clients name their topics in the handshake (auth.topics) or with
set_subscriptions (acked with {"count": n}) and get only those; clients
that never do stay on the every-topic room. Unread topics are skipped
before serialization. ADR 0009 records the decision.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013vbA3j9hMDhLiYyTkHLpH8
@coderabbitai

coderabbitai Bot commented Nov 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Central YAML; Path: .coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 56e42658-9bb5-43a8-abe7-8122171b8162

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@bracyw bracyw added backend Development Focused in the Backend by: ai Written by AI dev work Implementation work: feature, bug, or task labels Nov 20, 2026 — with Claude

bracyw commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by #1010 (branch renamed to 993-socket-io-rooms, co-author added).


Generated by Claude Code

@bracyw bracyw closed this Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Development Focused in the Backend by: ai Written by AI dev work Implementation work: feature, bug, or task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deliver each topic through its own Socket.IO room

2 participants