Understanding and implementing reminders
Reminders are very similar to timers but with a few key differences:
- Reminders last beyond the life of the grain and are persistent.
- If the grain is deactivated before the reminder fires, the grain will be reactivated for the reminder.
- Even when there are cluster restarts, reminders are persistent and continue to trigger unless you cancel them explicitly.
- Reminders are single-threaded with asynchronous execution and by default will not process any incoming requests while the thread is awaiting for response from another call in progress unless you make it re-entrant.
- Reminders should not be used for high-frequency tasks as the period is measured in minutes, hours, or days whereas periods for timers are allowed in seconds. The minimum interval between reminders is
1
minute.
Configuration
Reminders need storage to function persistently. We must configure the storage for a reminder in silo builder via the UseXReminderService...