I'm happy to announce the first (useful) release of AshCubDB an Ash data layer which allows you to back your Ash resources with CubDB.

CubDB

From the CubDB documentation:

CubDB is an embedded key-value database for the Elixir language. It is designed for robustness, and for minimal need of resources.

CubDB is an impressive piece of engineering which is widely used by folks working on Nerves projects. I only learned about it earlier this year, but I've been itching to play with it since.

It supports ACID transactions, concurrent reads and writes and is generally resistant to data corruption during unexpected shutdowns or crashes.

Status

AshCubDB does not support, not is it currently aiming to support all the many many features of other Ash data layers. It does support the basic CRUD operations and filtering. You can use it today.

There are a few things that I haven't nailed down:

  1. How to handle "migrations" when the attributes of a resource change and thus the existing records are now invalid?
  2. How to handle transactions. CubDB essentially switches to a unit-of-work style structure when in a transaction, with a different API (CubDB.Tx).
  3. Should we dynamically start the CubDB processes when we need them (the current solution) or require that apps start them in their own supervision tree?