Skip to content

erlcron 🕥 #228

Open
Open
@nelsonic

Description

@nelsonic

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

Image

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:

  1. Define the event / reminder in a DSL that can easily be understood by a human and converted to SQL.
  2. Save the event / reminder to a distributed Postgres (or other reliable DB)
  3. Load the event / reminder records into a process-based cron when the server starts.
  4. All new event / reminder records are first inserted into Postgres for persistence/availability
    and then loaded into an Erlang 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    T1hTime Estimate 1 HourdiscussShare your constructive thoughts on how to make progress with this issueelixirPull requests that update Elixir codeenhancementNew feature or enhancement of existing functionalitytechnicalA technical issue that requires understanding of the code, infrastructure or dependencies

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions