DGen

CIFormal MethodsHex.pmHex DocsLicense

DGen implements useful OTP building blocks — gen_server, a process registry, and more to come — as durable, highly-available primitives for a distributed system, with a focus on ease of use and minimal operator setup. If you already know gen_server or a process registry like :global or gproc, using DGen's equivalents should feel familiar; the difference is what's underneath: a strongly-consistent database (FoundationDB) instead of process memory, so state and coordination survive process, node, and even cluster restarts.

The replication protocol behind dgen_registry is exhaustively model-checked with TLA+/TLC — not just tested — as part of CI. See formal/README.md for the model, what it proves, and how to run it yourself.

What's here

Both are built on the same idea: push state and coordination into a strongly-consistent backend, so the OTP programming model you already know keeps working even when a process, a node, or the whole cluster restarts.

Installation

Erlang

DGen can be installed by adding dgen to your list of dependencies in rebar.config:

{deps, [
{dgen, "~> 0.4"}
]}.

Elixir

DGen can be installed by adding dgen to your list of dependencies in mix.exs:

def deps do
[
{:dgen, "~> 0.4"}
]
end

Documentation

AI disclosure

DGen's development makes deliberate, disclosed use of AI tooling: