Manage ownership of resources across a cluster of machines
Implemented in Java 25 (ADR-0004). Consensus uses Apache Ratis (ADR-0005); the deployment target is a three-node cluster on GCP Compute Engine (ADR-0006).
Status: build, configuration, logging, the NIO networking layer, and a node runtime that forms a Ratis group (with a placeholder state machine) are implemented. The coordination state machine, client API, leases, fencing and sharding are planned; see ROADMAP.md.
Requirements: JDK 25 (Gradle finds it through toolchains). The Gradle wrapper is included, so no separate Gradle install is needed.
./gradlew build # compile, unit tests, integration tests, packaging
./gradlew test # unit tests only
./gradlew integrationTest # loopback TCP, in-process Ratis cluster, and multi-process node tests
./gradlew installDist # runnable scripts under */build/install/Code compiles with -Xlint:all -Werror and Error Prone, and tests run with assertions enabled. CI runs ./gradlew check on every push and pull request.
| Module | Contents |
|---|---|
core |
Configuration parsing, logging |
networking |
NIO event loop, frame codec, TCP connections, reconnecting connector (docs/networking.md) |
consensus |
Apache Ratis integration: group mapping, safety-checked settings, server, logging bridge (docs/consensus.md) |
node |
The dsoc-node application; multi-process tests |
tools |
The dsoc-echo demo; networking integration tests |
Builds run natively on macOS and Linux. To run the build in a Linux container (and, from milestone M5, for failure injection with iptables/tc), use the dev image:
scripts/dev image # build the image (done automatically on first use)
scripts/dev gradle check # run ./gradlew check in the container
scripts/dev shell # interactive shell in the container./gradlew :node:installDist
# First start of a brand-new cluster: --format creates each node's Raft storage.
for i in 1 2 3; do
node/build/install/dsoc-node/bin/dsoc-node --config deployment/configs/localhost-3node/node$i.conf --format &
doneThe nodes elect a leader within a few seconds (leader is now node N in the logs). Stop them with SIGTERM (kill %1 %2 %3). Restart them without --format; their state lives under /tmp/dsoc/node<N>. Delete that directory to start over.
Node configuration is described in docs/configuration.md, and storage formatting in docs/consensus.md. There is no client API yet (M6): the nodes replicate a placeholder counter that only tests use.
./gradlew :tools:installDist
tools/build/install/dsoc-echo/bin/dsoc-echo server 127.0.0.1:9000 &
tools/build/install/dsoc-echo/bin/dsoc-echo client 127.0.0.1:9000 1000 512Architecture decisions are recorded in docs/decisions/. The milestone plan is in ROADMAP.md.