Open
Description
Need to make time to explore this package: https://github.com/erlware/erlcron

Looks to include most of the use-cases we would need to run a "reminders" type app.
However, it is still subject to process/server failure ...
i.e. if the process dies your reminder dies with it. 💀
So ... maybe we need a hybrid approach:
- Define the
event
/reminder
in aDSL
that can easily be understood by a human and converted toSQL
. - Save the
event
/reminder
to a distributedPostgres
(or other reliable DB) - Load the
event
/reminder
records into a process-basedcron
when the server starts. - All
new
event
/reminder
records are first inserted intoPostgres
for persistence/availability
and then loaded into anErlang
process
.
The open questions are:
A. How do we know that a reminder is only loaded on one server/instance to avoid duplication?
B. Does erlcron
understand time-zones? (it appears to, how can we test it to avoid bugs?)
C. What happens to an event
/ reminder
that is meant to trigger when the server/instance is offline?