[discuss] Implement notification: queued for deletion
- Vorherrschende Sprache
- Keine Sprachdaten
- Sterne
- 3
- Forks
- 0
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne mit dem hier beschriebenen Benachrichtigungsablauf für die coderd-Replik, einschließlich notification_message, AcquireNotificationMessages und der Spalte notified_deleting_at. Das Issue ist als Diskussion und nicht als Implementierungsplan gedacht; für den Abschluss wäre eine Einigung über das Design der Deduplizierung, Verifizierung und Zustellungs-Callbacks für die 3d-, 1d- und 30min-Benachrichtigungen erforderlich.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Bereich
- backend, distributed-systems
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100