Reading the repo
Opening the box…
Reading the repo
Opening the box…
How to install on Linux
Distributed cron and interval scheduling with no leader and no distributed locks. One atomic claim selects one instance per scheduled run.
Saved setup from 11 h ago
Will it work on Linux?
CONTRIBUTING.mdBug reports and questions go to the issue tracker. For a bug, use the bug report form: it asks for the versions, the backend and a minimal reproduction. Never paste credentials or connection strings.
Before a larger change, open an issue to agree on it first.
You need the .NET 10 SDK and Docker.
docker compose -f test/docker-compose.test.yml up -d --wait # Redis 8.6, Redis 7.0, Valkey, PostgreSQL 16
docker compose -f test/docker-compose.test.yml --profile brokers up -d --wait # also RabbitMQ and NATS
The tests run against real servers. A server that isn't running skips its tests, so name the
servers a run must have: REQUIRE_SERVERS=redis,redis-7,valkey,postgres,rabbitmq,nats dotnet test. The README's
Tests section lists the servers, their addresses and the variables that
override them.
dotnet format --verify-no-changes # formatting and code style (.editorconfig); dotnet format fixes it
dotnet build # warnings are errors, analyzers included
dotnet test # every test; read the skip count
To see what the tests miss, the README's Coverage and mutation testing section shows how to get a coverage report and run Stryker. A new branch in the code wants a test that takes it, and a mutant that survives in code you changed wants a test that kills it.
docs/ as a submodule; open that pull request there) and an entry in CHANGELOG.md.PublicAPI.Unshipped.txt: the build
fails until it is (dotnet format analyzers --diagnostics RS0016 records additions). Review that
diff: removing or renaming anything users or other backends rely on is a breaking change. At a
release, the unshipped lines move to PublicAPI.Shipped.txt.AnarchonErrorCode; a value that can't be used throws an
ArgumentException.Anarchon is extended without breaking the apps and the backends built on it. A change that breaks one of these rules is a breaking change: it waits for a major release and goes under "Breaking" in the changelog.
PublicAPI.*.txt, and the build fails on an
unrecorded one. Removing or renaming a type, a member or an option is breaking.IBackend, IRunStore) is implemented outside this repository. A new
member has a default implementation, so existing backends keep compiling.RunRecord, StoredResult, ClaimOutcome): a
new member is optional. Backends build history with RunHistory.Build(), so new members reach
them without changes.RunReason, RunStatus, SkipReason, JobType, AnarchonErrorCode and
the ClaimOutcome kinds may gain members in a minor release. The scheduler handles a claim
outcome it doesn't know like Done.StoreFormat.Current only for a change older versions can't read or would
damage; that needs every instance stopped, and the changelog says so.CI runs the same commands on every pull request (.github/workflows/ci.yml).
The first two numbers of a version follow the Node.js package anarchon: 0.6.x here has the
algorithm and the stored data of 0.6.x there, so instances of both can share jobs.
To release:
VersionPrefix in Directory.Build.props, give the version's changelog heading its date,
and move each project's PublicAPI.Unshipped.txt lines to PublicAPI.Shipped.txt.main, then tag that commit v<version> (for example v0.6.0) and push the tag..github/workflows/release.yml checks that the tag matches VersionPrefix, runs every test
against every server, packs, and pushes the packages to nuget.org with Trusted Publishing.Then run bash setup.sh. It stops at the first error and is safe to run again. Servers and tests aren't started; it lists them at the end. Read it first.
The repo uses git submodules, so the clone fetches them too.
git clone --recurse-submodules https://github.com/aristoteliss/anarchon-dotnet.git cd anarchon-dotnet
.NET SDK 10.0.100
sudo apt install dotnet-sdk-10.0 # Ubuntu 22.04+; other distros: https://learn.microsoft.com/dotnet/core/install/linux
dotnet restore Anarchon.slnx dotnet build Anarchon.slnx
dotnet test Anarchon.slnx
Not published to NuGet yet. Once it is:
dotnet add package Anarchon.Redis # Redis or Valkey; brings in Anarchon, the core
dotnet add package Anarchon.Postgres # or PostgreSQL
dotnet add package Anarchon.SqlServer # or SQL Server and Azure SQL
dotnet add package Anarchon.Sqlite # or a SQLite file, for the processes of one machine
dotnet add package Anarchon.RabbitMQ # or RabbitMQ: claim only, no leases
dotnet add package Anarchon.Nats # or NATS JetStream: claim only, or leases with NatsStrategy.Lease
Targets .NET 10. Each backend is its own package with its own driver; see Backends.
No reports for Linux yet.
GitManual AI Agent reads the 8 key files and writes a step-by-step guide for Linux. Once written, it's saved for everyone.