# madelson/DistributedLock

A .NET library for distributed synchronization

Repository: https://github.com/madelson/DistributedLock
Canonical: https://ross.abutalabs.com/products/distributedlock
Language: C#
License: MIT
License Family: permissive
Last push: 2026-07-15T00:44:09+00:00

## Health v2 (maintenance only)
Score: 90/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 92, release rhythm 81, longevity 100
- inputs: {"age_days": 4107, "days_push": 50, "days_rel": 50, "gap_med": 77, "n_releases_24m": 8}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2481, forks 248 (observed 2026-08-28T04:06:55.330362+00:00)

## What it is
DistributedLock is a .NET library providing robust distributed mutexes, reader-writer locks, and semaphores built on various backing technologies like SQL Server, Postgres, MySQL, Oracle, and Redis. It lets multiple applications or machines safely synchronize access to code regions with a simple async acquire/release API.

## Use cases
- synchronize code execution across multiple app instances
- acquire a distributed lock backed by SQL Server or Postgres
- prevent duplicate cron job execution in a scaled-out service
- implement distributed semaphores to limit concurrent workers
- coordinate access to a shared resource across machines in .NET

## When to choose
- you need battle-tested distributed locking primitives in .NET
- you want multiple backend options (databases, Redis, ZooKeeper) behind one API
- you need async/await-friendly locks with handle-based release semantics

## When to avoid
- you only need single-process locking (use built-in Monitor/SemaphoreSlim)
- your stack is not .NET
- you need a lock service without any existing database or Redis infrastructure to back it

## Facets
- artifact type: library
- maturity: stable
- function: concurrency, caching, database, developer-tools
- domain: microservices, backend, developer-tools, databases
- platform: dotnet, cross-platform
- tags: distributed-lock, mutex, semaphore, reader-writer-lock, sync-primitives, sql-server, postgres, redis, zookeeper

## Member repositories
- madelson/DistributedLock (main) score 90

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:55.330362+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:28:14.174230+00:00, confidence not recorded.
  - readme: https://github.com/madelson/DistributedLock (fetched 2026-08-28T04:06:55.330362+00:00, sha e6419b5f8c1c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
