You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the sending of notifications is entirely synchronous. The NotificationsManager.sendNotifcationcurrently blocks until the Notification has either been sent or failed to be sent.
In order to make the NotificationManager more fault tolerant, the sending of notifications needs to be assigned to a TaskManager task instead. This task needs to reschedule itself with a delay that doubles each retry. This would require a refactor of the notifications domain to abstract over the TaskManager in queuing notifications, but it would give us an outbox/inbox system similar to emails.
Expanded RPC Handlers
The RPC handlers need to be expanded to add ability to both clear the notifications of the outbox and remove a pending notification from the outbox.
NotificationIds
NotifcationIds need to be exposed on the notifications themselves, much like how AuditEventIds are exposed on the AuditEvents. The reason for this is because the user should be able to delete Notifications / cancel a pending Notification in the outbox. This was already discussed as an improvement during MatrixAI/Polykey-CLI#50, but there is an actual need for it now. The Encoded version of the NotificationId will be available both in the Notifications returned by read*Notificaitons, but not in the database itself. The reason for this is because the database already stores the ID as the key, which is then filled in as a field in the Notificaiton returned by read*Notifications methods.
Implement exposing NotificationIds on Notifications
Implement readOutboxNotifications, removeOutboxNotification, and clearOutboxNotifications
Rename readNotifications, removeNotification, and clearNotifications to readInboxxNotifications, removeInboxNotification, and clearInboxNotifications respectively
The text was updated successfully, but these errors were encountered:
Technically not fault tolerance. It's "network partitioning". But even better is to realise that this just a "delay tolerant network". https://en.wikipedia.org/wiki/Delay-tolerant_networking - which is required for P2P networks - especially Polykey style.
Specification
Currently the sending of notifications is entirely synchronous. The
NotificationsManager.sendNotifcation
currently blocks until the Notification has either been sent or failed to be sent.In order to make the
NotificationManager
more fault tolerant, the sending of notifications needs to be assigned to aTaskManager
task instead. This task needs to reschedule itself with a delay that doubles each retry. This would require a refactor of the notifications domain to abstract over the TaskManager in queuing notifications, but it would give us an outbox/inbox system similar to emails.Expanded RPC Handlers
The RPC handlers need to be expanded to add ability to both clear the notifications of the outbox and remove a pending notification from the outbox.
NotificationIds
NotifcationIds need to be exposed on the notifications themselves, much like how AuditEventIds are exposed on the AuditEvents. The reason for this is because the user should be able to delete Notifications / cancel a pending Notification in the outbox. This was already discussed as an improvement during MatrixAI/Polykey-CLI#50, but there is an actual need for it now. The Encoded version of the NotificationId will be available both in the Notifications returned by
read*Notificaitons
, but not in the database itself. The reason for this is because the database already stores the ID as the key, which is then filled in as a field in the Notificaiton returned byread*Notifications
methods.Additional context
Tasks
NotificaitonsManager.sendNotification
readOutboxNotifications
,removeOutboxNotification
, andclearOutboxNotifications
readNotifications
,removeNotification
, andclearNotifications
toreadInboxxNotifications
,removeInboxNotification
, andclearInboxNotifications
respectivelyThe text was updated successfully, but these errors were encountered: