[discuss] Implement notification: queued for deletion
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 3
- Fork
- 0
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Hi Team,
I wanted to start a discussion about how we can implement this, but didn't want to write a full RFC. Long story short, coderd replica has to send a notification when the workspace is scheduled for deletion (3d, 1d, 30min).
**Proposal**
Let's implement event deduplication similar to Event Sourcing.
1. Every replica periodically checks if the workspace is scheduled for deletion, and its owner should be notified.
2. In the worst case, all replicas take the same decision to insert `notification_message`.
3. Every notifier follows the same process:
3.1 Fetch messages using `AcquireNotificationMessages`.
3.2 For every message: identify its type and call optional logic to verify if delivered.
3.3 If already _delivered_, then _skip delivery_.
3.4 Call optional delivery callback.
_Verification logic_ and _delivery callback_ depend on the notification type. For "queued for deletion" it could check against the database column `notified_deleting_at`. The value is updated by _delivery callback_.
Let me know your thoughts!
cc @dannykopping @mafredri
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Start with the coderd replica notification flow described here, including notification_message, AcquireNotificationMessages, and the notified_deleting_at column. The issue is a discussion rather than an implementation plan; done would require agreement on the deduplication, verification, and delivery-callback design for the 3d, 1d, and 30min notifications.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Ambito
- backend, distributed-systems
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100