Skip to content
CAI
Software that uses CAICheck a score

foundationdb-beam/erlfdb

65.6

Adequate · 2 October 2026

5.9k

lines of production code

Erlang

with C

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is an Erlang and Elixir client library for FoundationDB, exposing the full database API through Native Implemented Functions (NIFs). It provides comprehensive data modeling utilities, including subspaces, tuple encoding, and directory management, alongside high-level abstractions like a high contention allocator and tenant management. The library supports multi-version client compatibility and includes robust transaction handling, range queries, and watch capabilities for building distributed applications.

How it got here

2019 — FoundationDB API v620 and build migration

6 changes.

The project migrated its build system from rebar2 to rebar3, adding support for Elixir's Mix tool and automating FoundationDB API detection. It upgraded the underlying C API to version 620, exposing comprehensive transaction management, directory layers, and tenant capabilities through new Erlang and Elixir modules. A full test suite was introduced to validate these features, alongside utility scripts for process monitoring and error handling macros.

2024–2026 — Elixir integration and testing infrastructure

6 changes.

The project established Elixir Mix support and added interactive Livebook tutorials to facilitate application development. Concurrently, it expanded testing capabilities by introducing an Erlang binding tester, multi-version upgrade validation, and improved developer tooling for C NIF formatting.

Features

Added Erlang and Elixir Livebook tutorials

New interactive Livebook notebooks have been added to guide users through building applications with FoundationDB using the erlfdb library. The \kv\_queue.livemd\ notebook demonstrates how to implement a distributed, durable FIFO queue using Erlang, focusing on key design patterns like versionstamps for producer throughput and atomic counters. The \tutorial-elixir.livemd\ notebook provides a step-by-step walkthrough of a class scheduling application in Elixir, covering data modeling with subspaces, directory management, and transactional operations.

notebooks · high confidence

Added development environment setup for C NIF formatting

Introduced a new developer guide (DEV.md) and a helper script (gen-clangd-config.sh) to streamline working with the C NIF. The guide documents the installation of clang-format for consistent C code formatting, and the script generates the .clangd configuration file by resolving the Erlang include paths via asdf, ensuring the language server correctly understands the project's compilation flags.

dev · high confidence

Added process monitor utility

A new Python script, priv/monitor.py, has been added to the project. This utility monitors a parent process and, upon its termination, forcefully kills a specified target process before exiting. It is designed to be executed directly via the shebang line using Python 3.

priv · high confidence

Initial release of erlfdb 1.2.1 with comprehensive FoundationDB API

This update introduces the full erlfdb 1.2.1 release, exposing the complete FoundationDB client API for Erlang and Elixir. The \src/erlfdb.erl\ module now provides comprehensive transaction management, data retrieval (including \get\_range\, \fold\_range\, and iterator support), atomic operations, and watch capabilities. New modules add support for the Directory Layer (\erlfdb\_directory\), an ETS-backed directory cache (\erlfdb\_directory\_cache\), a High Contention Allocator (\erlfdb\_hca\), and tenant management (\erlfdb\_tenant\_management\). The tuple encoding layer (\erlfdb\_tuple\) and subspace utilities (\erlfdb\_subspace\) are also included to facilitate data modeling. The application version has been bumped to 1.2.1, and the maintainer has been updated to Jesse Stimpson.

src · high confidence

New include file for FDB error codes and tuple macros

A new header file, include/erlfdb.hrl, has been added to centralize definitions for the Erlang FDB client. This file introduces macros for packing and unpacking tuples with prefixes (ERLFDB\_PACK, ERLFDB\_EXTRACT) and creating subspace ranges (ERLFDB\_RANGE). It also defines constants for common retryable Transaction error codes (such as TRANSACTION\_TOO\_OLD, NOT\_COMMITTED, and DATABASE\_LOCKED) and provides the ERLFDB\_IS\_RETRYABLE/1 macro to check if an error code is retryable, excluding TRANSACTION\_TIMED\_OUT from the default list.

include · high confidence

Behavioural changes

Added shell configuration for FoundationDB client threading

A new shell configuration file has been introduced to define network options for the erlfdb client. This configuration explicitly sets the number of client threads per version to 2 and enables JSON-formatted tracing to a specific trace file, allowing users to control client concurrency and debugging output for the shell environment.

config · high confidence

FoundationDB C API level upgraded to 620 with expanded Erlang interface

The Erlang NIF bindings now target FoundationDB API level 620 (previously 600), enabling support for newer client features. This update introduces comprehensive Erlang representations for network, database, and transaction options, as well as atomic mutations and conflict range types, via a significantly expanded set of atom definitions. It also adds resource types for Tenants and refines the Future resource lifecycle to handle synchronous and asynchronous callbacks more robustly, including proper mutex locking and environment management to prevent deadlocks and memory leaks.

_c\src · high confidence

Migration to rebar3 and enhanced build configuration

The project has migrated from rebar2 to rebar3, replacing the custom Makefile and manual compilation hooks with a standardized rebar3 setup. This introduces the \pc\ plugin for NIF compilation, \erlfmt\ for code formatting, and \rebar3\_ex\_doc\ for documentation generation. The build system now features a sophisticated \rebar.config.script\ that automatically detects the FoundationDB API version via \fdbcli\, supports environment variable overrides (\ERLFDB\_COMPILE\_API\_VERSION\, \ERLFDB\_INCLUDE\_DIR\, \ERLFDB\_FDBCLI\), and handles multi-version client compatibility. Additionally, the project now supports Elixir's Mix build tool via an added \mix.exs\ file, allowing it to be used as a dependency in Elixir projects alongside Erlang's rebar3.

(repo-wide) · high confidence

Test coverage

Add Erlang binding tester and local execution instructions; Added multi-version upgrade test suite; Initial test suite for erlfdb.

Dependencies

Added Elixir Mix project configuration for Erlfdb

Introduced a new \mix.exs\ file to enable building the Erlfdb project using the Elixir Mix build tool. This configuration defines the project metadata, specifies the Erlang language, and registers a custom compiler task (\Mix.Tasks.Compile.ErlfdbNif\) that handles the compilation of the underlying C source files into a NIF (Native Implemented Function) library, ensuring compatibility with both Mix and rebar3 environments.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 73 → 66 (-7.5)
  • Rubric changed (rubric-2026.09.12 → rubric-2026.09.18) — scores are not directly comparable.

Lenses

  • Code Health 97 → 97 (+0.0)
  • Architecture 100 → 100 (+0.0)
  • Maturity 57 → 57 (+0.0)
  • Readiness 78 → 52 (-25.6)
  • Security 97 → 98 (+0.8)

Resolved (2)

  • Coverage not measured — no coverage collector is wired up
  • Off-boarding risk: anonymized user #1

New (2)

  • Documentation: no architecture or design documentation (README.md)
  • Off-boarding risk: anonymized user #1

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

foundationdb-beam/erlfdb was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 2 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 0b2ebc612af6f35905ed38cdd18eb7e3747c25d9 — the exact code this score is about.
  • Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-e569280dd5e2.