Let's assume an application that deals with meetings where some users will participate.
What is an efficient way to achieve this use case:
3 hours before the meeting should start, one reminder mail should be sent to each participant.
It's pretty easy to trigger a notification based on an Event, let's say a creation, or a cancellation of any meeting. However, waiting for the "3 hours before" isn't an event..because each meeting has its own start date.
An easy way (and surely not performant) would be to have a background-process, that queries the storage (database for instance) in order to find events that matched the rule "within 3 hours before", and not flagged with some kind of
What about a very high frequency of created meetings... this kind of process would be likely to be inefficient (without evoking the huge impact on the database) to ensure the exact precision of 3 hours (even with a marge of 5 minutes).