I have a calendar system in my web app. We need to implement reminders.
Are there any reminder/alert patterns or system designs, or best practices? If so or if not, what might be some ways of achieving this?
Design Considerations
- Need to be able to cancel/prevent reminders if the calendar event is deleted or changed, or the user turns off the reminder for that event. So we can't just fire and forget them in a queue or something.
- The reminders can be X amount of time before the event, X being set in the calendar event settings
- Reminders don't need to be super accurate (to the second or even minute). +- 5 minutes is fine.
- Don't want to pre-calculate reminders because then the maintenance becomes a nightmare as calendar events change, especially where recurring events are concerned.
So far my design is something like this:
- Have a scheduled job run every 10 minutes.
- The job grabs all possible relevant events and calculates potential occurrences for the next 10 minute interval (filtering out events that don't have a reminder set).
- Job calls an API endpoint in my server side that kicks of a front end notification and an email reminder for all relevant parties.
But maybe there are more elegant patterns than this? Something already established? Or some tool in azure etc.?
Our stack is .net and azure.