A bulletproof Elixir library that keeps ETS tables alive forever using bouncing GenServers and scheduled monitoring.
Eternal is an Elixir library that ensures ETS (Erlang Term Storage) tables remain alive indefinitely, even when owning processes crash. It solves the problem of losing in-memory data by using bouncing GenServers and scheduled monitoring to maintain both an owner and heir for each table. This provides a bulletproof solution for persistent storage in Elixir applications.
Elixir developers building applications that rely on persistent in-memory data storage via ETS tables, particularly those needing high fault tolerance and crash resistance.
Developers choose Eternal over alternatives like Immortal because it offers a more robust solution that doesn't require a single dedicated process, reducing crash risks through bouncing GenServers and scheduled monitoring. Its simple API and seamless integration with Elixir supervision trees make it easy to adopt while ensuring tables survive application restarts.
Keep your ETS tables running forever using bouncing GenServers
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses bouncing GenServers and scheduled monitoring to always maintain an owner and heir, ensuring ETS tables survive process crashes as highlighted in the README's bulletproof design.
Minimal interface with Eternal.start_link/3 mirroring :ets.new/2, making adoption straightforward for Elixir developers accustomed to ETS.
Designed to work within Elixir supervision trees with recommended :one_for_one strategies, as shown in the README examples for application startup.
Always applies :public and :named_table options to ensure table accessibility and naming, reducing setup errors for persistent storage.
Forces :public and :named_table options on all tables, which the README admits, potentially conflicting with use cases requiring private or unnamed tables.
Requires :one_for_one or complex hoisting to avoid restarts, adding overhead for applications needing other strategies like :one_for_all, as noted in the documentation.
Focuses solely on table persistence without built-in features for data recovery, replication, or advanced monitoring, which might necessitate additional libraries.
eternal is an open-source alternative to the following products: