Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

notification-acks: Track clients in memory and give up when they fall too far behind

Aperta
#892 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

@t-obr-iv ci sta già lavorando.

Dal 18/10/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

backend by: ai-assisted frontend good-for: new-member spike
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.
Lingua principale
TypeScript
Stelle
5
Fork
1
Merge medio
2g 20h
PR unite (30g)
48

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Northeastern-Electric-Racing/Argos

Tutte le issue di Northeastern-Electric-Racing/Argos

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.