notification-acks: Track clients in memory and give up when they fall too far behind
メンテナーはふだん 2 日以内に返信
@t-obr-iv がすでに取り組んでいます。
2026年10月18日 から。
評価
この issue はまだ評価されていません。
説明
Exploring
scylla-server keeps an in-memory queue of numbered notifications for each client ID. The client reports the last number it received, and the server resends the rest. The server, not the socket, decides when a client is gone, and then drops its queue and subscriptions. A client is gone once its queue passes a size or age limit, regardless of time away or socket state.
Hypothesis
Tying "gone" to how much the server is holding keeps memory bounded under any outage pattern without picking a timeout, and a client that comes back within the limit loses nothing.
Context transfer
SUMMARY
#845: make sure a Rule's notification is actually received. The notification-acks spikes try different ways for the client to confirm what it got, so scylla-server can resend what it missed, for example after a Wi-Fi drop at the track or a laptop sleeping.
CONTEXT
- A Rule is a user-defined condition on a topic's values (e.g. a > 100) that notifies its subscribers when it matches. Logic in scylla-server/src/rule_structs.rs; a Rule fires after its debounce, then waits a fixed 5s cooldown.
- Delivery: handle_rule_processing in scylla-server/src/socket_handler.rs emits the rule_notify Socket.IO event (RuleNotification: id, topic, values, time) to the subscribing client, inline in the socket delivery loop. Nothing confirms the browser received it; a successful emit only means it was queued on the socket (buffer of 4096, shared with telemetry).
- RuleNotification.id is the Rule's ID, not unique per firing.
- If the subscribing client is not connected when a Rule fires, the notification is dropped and the client's subscriptions are deleted (socket_handler.rs, around lines 321-339). A failed emit is only logged.
- Clients identify with a client ID kept in localStorage (angular-client/src/services/socket.service.ts) and sent as the clientId query parameter when the socket connects (and as the x-client-id header on REST calls).
- Socket.IO is configured in scylla-server/src/main.rs: ping_timeout 5s, default ping_interval 25s, ack_timeout 1500ms. A silently dead connection can go unnoticed for up to about 30s; notifications sent in that window count as sent.
- Fired notifications are not stored on the server and there is no endpoint to fetch them. The client's notification log (angular-client/src/services/notification-log.service.ts) is in browser memory and cleared on reload.
- Server: socketioxide 0.18.7. Client: socket.io-client 4.7. socketioxide has no connection state recovery (Node Socket.IO's built-in replay of missed messages).
- Related: #801 moves rule processing off the delivery loop. Tests: scylla-server/tests/rule_structs_test.rs; nothing covers socket_handler.rs.
- Notifications carry no sequence number today, and the client does not send anything back when it receives one.
- Today the first notification that cannot be delivered deletes all of that client's subscriptions, plus any Rules left with no subscribers.
- The client reconnects automatically (socket.io-client default) and sends the same client ID each time it connects.
- 主要言語
- TypeScript
- スター
- 5
- フォーク
- 1
- 平均マージ
- 2日 14時間
- マージ済み PR(30日)
- 51
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Northeastern-Electric-Racing/Argos のほかの issue
-
Remove the landing page対応中かも @Idontknow0487 が 5 日前に担当しました。 オープンby: ai-assisted frontend good-for: new-member spike
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Northeastern-Electric-Racing/Argos#847 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
Move the small charts to Chart.js and drop ApexCharts対応中かも @bracyw が 2 日前に担当しました。 オープンby: ai dev work frontend
Northeastern-Electric-Racing/Argos#926 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
Move the graph page to Chart.js対応中かも @bracyw が 2 日前に担当しました。 オープンby: ai dev work frontend
Northeastern-Electric-Racing/Argos#925 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
Move the client's charts to Chart.js対応中かも @bracyw が 2 日前に担当しました。 オープンby: ai epic frontend
Northeastern-Electric-Racing/Argos#924 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
quick-view-ownership: Build on the app-wide quick view from #898対応中かも @bracyw が 10 日前に担当しました。 オープンby: ai frontend spike
Northeastern-Electric-Racing/Argos#904 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
Northeastern-Electric-Racing/Argos の issue をすべて見る
似ている issue
-
Parallel reticle_verify opens per-flow leases without the source lease's ignoreHTTPSErrors対応中かも @as992949791 が今日担当しました。 オープンgood first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
reticlehq/reticle#2033 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
area:quality p3-medium ready-for-agent type:docs
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
fderuiter/deruiter.dev#3589 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
manfredsteyer/angular-oauth2-oidc#1514 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
marmelab/react-admin#11431 ·
メンテナーはふだん 1 日以内に返信