[discuss] Implement notification: queued for deletion
- Lenguaje dominante
- Sin datos de lenguaje
- Estrellas
- 3
- Forks
- 0
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Comienza con el flujo de notificaciones de la réplica de coderd descrito aquí, incluidos notification_message, AcquireNotificationMessages y la columna notified_deleting_at. El issue es una discusión, no un plan de implementación; para darlo por terminado sería necesario llegar a un acuerdo sobre el diseño de la deduplicación, la verificación y los callbacks de entrega para las notificaciones de 3d, 1d y 30min.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Área
- backend, distributed-systems
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100