A simple and powerful Elixir wrapper for the Mnesia distributed real-time database, providing an intuitive API.
Memento is an Elixir library that provides a simple and powerful wrapper for Mnesia, Erlang's distributed real-time database. It solves the problem of Mnesia's convoluted and complex native API by offering an intuitive Elixir-friendly interface, making it easier for developers to leverage Mnesia's features like distribution, persistence, and fast queries.
Elixir developers who need a lightweight, built-in distributed database for applications where data-code coupling is acceptable, such as ephemeral data storage, lightweight projects, or scenarios requiring persistence across restarts.
Developers choose Memento because it simplifies working with Mnesia without adding external dependencies, enforces good patterns by avoiding dirty calls, and provides a clean, documented API that reduces the learning curve while maintaining full compatibility with Mnesia's capabilities.
Simple + Powerful interface to the Mnesia Distributed Database 💾
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides an intuitive, Elixir-friendly interface that simplifies Mnesia's convoluted native API, as shown in the straightforward table definitions and CRUD operations wrapped in transactions.
Relies solely on the built-in Mnesia module, reducing project bloat and avoiding compatibility issues, which is explicitly highlighted in the features list.
Supports data replication across nodes and coherent disk/memory persistence, leveraging Mnesia's real-time performance for distributed applications, as detailed in the persistence setup section.
Omitts dirty database calls and requires transactions for operations, promoting data integrity and atomicity, which is part of the library's philosophy stated in the README.
Configuring disk persistence is described as 'a bit weird' and requires stopping/starting the application with manual steps, making it error-prone and less automated.
While simplified, the query language is based on Erlang's MatchSpec and lacks support for advanced features like joins, aggregations, or an Ecto-like DSL, as noted in the roadmap.
The roadmap admits missing components such as migration support, Ecto-like DSL, and some transaction helpers, which may hinder development for complex use cases.
memento is an open-source alternative to the following products: