Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

[Notifications] Implement mechanism to prevent sending duplicates #875

Closed
franckc opened this issue Nov 2, 2018 · 2 comments
Closed

[Notifications] Implement mechanism to prevent sending duplicates #875

franckc opened this issue Nov 2, 2018 · 2 comments
Assignees
Labels
enhancement New feature or request javascript notifications P2 Small number of users are affected, major cosmetic issue

Comments

@franckc
Copy link
Contributor

franckc commented Nov 2, 2018

For context, see #852
Since the event-listener does not guarantee only-once delivery, the notifications server should implement a mechanism to keep track of notifications already sent in order to avoid sending duplicates. Suggestion is to use Redis for storing that data.

@franckc
Copy link
Contributor Author

franckc commented Nov 5, 2018

@gauravsavanur07 Did you send an email saying you would be interested in working on this ? For some reason it did not get recorded in this issue...

Anyway, if you did, here are a few pointers/ideas, in terms of how I could imagine this would work to get you started:

  • Define a scheme to create uid for messages received by notifications servers from the event-listener via webhook. The tuple (blockNumber, logIndex) could be a good choice.
  • When receiving a new message, notifications server first checks against persistent storage if message has already been processed by doing a lookup by uid. If already processed, do nothing, otherwise send notification(s) to user(s). Then store uid in storage.
  • For persistent storage, Redis is probably a good choice. We haven't set it up in production yet but will do soon since we need it for another service.

Let me know any questions...

@micahalcorn micahalcorn added enhancement New feature or request javascript p1 labels Apr 8, 2019
@micahalcorn micahalcorn added this to the 🤰 3/27/19 milestone Apr 8, 2019
@micahalcorn micahalcorn added P2 Small number of users are affected, major cosmetic issue and removed p1 labels Apr 10, 2019
@micahalcorn
Copy link
Member

Considering the first version of this to be done ✅

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request javascript notifications P2 Small number of users are affected, major cosmetic issue
Projects
None yet
Development

No branches or pull requests

4 participants