Skip to content
CAI
Software that uses CAICheck a score

bitwalker/swarm

63.5

Adequate · 23 September 2026

2.3k

lines of production code

Elixir

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Swarm is a distributed process registry and group messaging library for Erlang and Elixir that enables reliable name registration, lookup, and group-based broadcasting across a cluster. It provides a robust, fault-tolerant architecture featuring a custom interval-tree clock for causal ordering and conflict resolution, alongside configurable distribution strategies such as static quorum enforcement. The system is designed to handle node topology changes and network splits while offering both Elixir and Erlang APIs for managing distributed state.

Features

Add Erlang API for process name registration and group-based messaging

The \swarm\ module now exposes an Erlang API that allows registering names to PIDs, looking up PIDs by name, and managing process groups. Users can join or leave named groups, publish messages to all members of a group, and perform multi-calls with optional timeouts. A new \send/2\ function is also provided, enabling direct message sending to registered names, which supports \gen\_server:cast/2\ usage.

src · high confidence

Introduce Swarm process registry with group and broadcast capabilities

The library now provides a distributed process registry under the \Swarm\ module, replacing the previous \Distable\ implementation. Users can register, look up, and unregister named processes, as well as manage process groups (join, leave, members) and perform group-wide operations like \publish\ and \multi\_call\. The \Swarm\ module acts as a facade, delegating most operations to \Swarm.Registry\, while also exposing \send\ for direct message passing. The old \Distable\ module and its associated functionality have been removed.

lib · high confidence

Introduce custom distribution strategy interface and static quorum implementation

Swarm now supports custom distribution strategies via a new \Swarm.Distribution.Strategy\ behaviour, allowing users to plug in alternative node-selection logic. The library ships with a basic \Swarm.Distribution.Ring\ strategy and a new \Swarm.Distribution.StaticQuorumRing\ strategy that enforces a minimum cluster size (quorum) before allowing process registration. If the cluster size drops below the configured \static\_quorum\_size\, \Swarm.register\_name/5\ returns \{:error, :no\_node\_available}\. The quorum size is read from the \:swarm\ application environment (defaulting to 2) and must be a positive integer.

lib/swarm/distribution · high confidence

Removals

Removed legacy distributed name registration and heartbeat modules

The \Distable.ETS\, \Distable.Heartbeat\, and \Distable.Tracker\ modules have been removed from the codebase. This eliminates the previous implementation of distributed name registration, UDP-based heartbeat discovery, and node synchronization logic within the \lib/distable\ directory.

lib/distable · high confidence

Behavioural changes

Extracted clustering functionality into libcluster package

The automatic clustering functionality has been removed from the main package and is now provided by the separate \libcluster\ package. Users upgrading from version 2.0 or earlier must add \:libcluster\ to their dependencies and configure it if they wish to use automatic cluster formation. The default \node\_blacklist\ configuration was updated to ignore hot upgrade scripting nodes (exrm/relx/distillery) and remote shell nodes. Additionally, the \debug: true\ setting now enables \:sys\ tracing of the tracker, while log level controls \:debug\ level logs.

(repo-wide) · high confidence

Introduces default configuration for Swarm and Logger

Adds a new \config/config.exs\ file that sets up default settings for the \:swarm\ application, including node lists, sync timeouts, anti-entropy intervals, and node blacklists for remote shells and hot upgrade scripts. It also configures the \:logger\ to default to the \:warn\ level, with an option to enable \:debug\ logging and verbose test output via the \SWARM\_DEBUG\ environment variable. Additionally, it configures the \:porcelain\ library to suppress missing binary warnings.

config · medium confidence

Refactored Swarm's internal registry and supervision tree

Swarm's internal architecture has been restructured. The registry is now a dedicated GenServer-backed process (\Swarm.Registry\) that owns the ETS table, replacing the previous flat module-based approach. The supervision tree has been updated to start the new \Swarm.Registry\ and \Swarm.Tracker\ workers, and a \Swarm.TaskSupervisor\ is now explicitly managed. Additionally, a new \Swarm.Logger\ module was added to format log messages with node information.

lib/swarm · medium confidence

Refactored Swarm.Tracker into a gen\_statem-based distributed tracker with new IntervalTreeClock

The Swarm.Tracker module has been refactored into a gen\_statem-based distributed tracker, introducing a new IntervalTreeClock (ITC) implementation for causal ordering and conflict resolution. This change brings improved handling of remote process tracking, metadata replication, and node topology changes, while also adding configuration options for anti-entropy intervals and sync timeouts. Users will experience more robust process tracking across cluster topologies, with better handling of node failures and race conditions during remote process starts and handoffs.

lib/swarm/tracker · medium confidence

Test coverage

Add benchmark for Swarm tracker; Added comprehensive test coverage for distributed cluster operations; Added test support infrastructure for distributed node management; Added tests for static quorum ring behavior.

Dependencies

Upgrade to Swarm 3.4.0 with new dependencies and tooling

The project has been renamed from Distable to Swarm and upgraded to version 3.4.0. This update introduces several new dependencies including libring 1.4.0, gen\_state\_machine 2.0.3, and dev tools like ex\_doc, dialyxir, and benchee. The build configuration now enforces Erlang/OTP 19 or greater, adds :crypto to the application's extra\_applications, and configures dialyzer for static analysis. Additionally, the package metadata and documentation settings have been updated to reflect the new project identity.

(dependencies) · medium 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 65 → 63 (-1.5)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 95 → 97 (+1.9)
  • Architecture 100 → 99 (-0.6)
  • Maturity 48 → 48 (+0.0)
  • Readiness 62 → 65 (+3.8)
  • Security 100 → 80 (-20.0)

Resolved (7)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — no supported dependency manifest was read
  • Duplicated block (9 lines × 2) (lib/swarm/tracker/tracker.ex)
  • No exposed public API
  • Test reliability not included
  • TooManyMethods: Tracker (lib/swarm/tracker/tracker.ex)
  • dormant codebase — no living knowledge left to concentrate

New (10)

  • Coverage not measured — no coverage collector is wired up
  • Documentation: hard to navigate (README.md)
  • Documentation: no installation or build instructions (README.md)
  • Duplicated block (8–15 lines × 2) (lib/swarm/tracker/tracker.ex)
  • No SBOM
  • No artifact signing
  • No build provenance
  • No dependency advisory monitoring
  • Outdated: ex_doc
  • Outdated: libring

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

Survey your own repository

bitwalker/swarm 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 23 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 33d2b3d1a2c22a4a256602c47bc2e64a1be7fdb7 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-955b9cee9818.