{"id":19771557,"url":"https://github.com/alexandrelamarre/dlock","last_synced_at":"2026-03-01T15:33:44.628Z","repository":{"id":241438022,"uuid":"748367124","full_name":"alexandreLamarre/dlock","owner":"alexandreLamarre","description":"Reliable \u0026 scalable distributed locking, scheduling and process synchronization","archived":false,"fork":false,"pushed_at":"2026-02-25T04:44:34.000Z","size":569,"stargazers_count":5,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-25T10:13:27.035Z","etag":null,"topics":["api","consensus","distributed-lock","distributed-systems","grpc","lock","process-synchronization"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexandreLamarre.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["alexandreLamarre"]}},"created_at":"2024-01-25T20:29:27.000Z","updated_at":"2026-02-17T17:43:22.000Z","dependencies_parsed_at":"2025-12-31T07:05:02.322Z","dependency_job_id":null,"html_url":"https://github.com/alexandreLamarre/dlock","commit_stats":null,"previous_names":["alexandrelamarre/dlock"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/alexandreLamarre/dlock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandreLamarre%2Fdlock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandreLamarre%2Fdlock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandreLamarre%2Fdlock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandreLamarre%2Fdlock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexandreLamarre","download_url":"https://codeload.github.com/alexandreLamarre/dlock/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandreLamarre%2Fdlock/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29973320,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T15:29:09.406Z","status":"ssl_error","status_checked_at":"2026-03-01T15:28:28.558Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","consensus","distributed-lock","distributed-systems","grpc","lock","process-synchronization"],"created_at":"2024-11-12T05:02:23.279Z","updated_at":"2026-03-01T15:33:43.520Z","avatar_url":"https://github.com/alexandreLamarre.png","language":"Go","funding_links":["https://github.com/sponsors/alexandreLamarre"],"categories":[],"sub_categories":[],"readme":"# Dlock\n\n![Build](https://github.com/alexandreLamarre/dlock/actions/workflows/ci.yaml/badge.svg)\n![Release](https://img.shields.io/github/v/release/alexandreLamarre/dlock)\n[![License](https://img.shields.io/github/license/alexandreLamarre/dlock)](./LICENSE)\n\nDlock is a server for distributed locking for process synchronization \u0026 exclusive transactions in distributed systems.\n\nGenerally, a distributed lock can be used to coordinate access to a resource or interest in\nsuch a resource in a distributed environment. In other words, distributed locks are useful when multiple systems need to reach a consensus about a shared resource.\n\n## Lock Modes\n\nAs apposed to standard single-host locking mechanisms, distributed locks can be categorized into distinct modes with varying degress of distributed access guarantees.\n\n- Null (NL) : indicates interest in the resource, but does not prevent other process from locking it\n- Concurrent Read (CR) : Indicates a desire to read (but not update) the resources. Allows other processes to read or update the resource but prevents exclusive access to it.\n- Concurrent Write (CW) : Indicates a desire to read and update the resource. It allows other processes to read or update the resource, but prevents others from having EX access to it.\n- Protected Read (PR) : Traditional share lock, which indicates a desire to read the resource but prevents others from updating it. Others can however also read the resource.\n- Protected Write (PW) : Traditional update lock, indicates a desire to read and update the resource and prevents others from updating it. Others with Concurrent read access can however read the resource\n- Exclusive (EX) : Traditional exclusive lock, which allows read and update access to the resource, and prevents others from having access to it.\n\n\u003ctable class=\"wikitable\"\u003e\n\n\u003ctbody\u003e\u003ctr\u003e\n\u003cth\u003eMode\u003c/th\u003e\n\u003cth\u003eNL\u003c/th\u003e\n\u003cth\u003eCR\u003c/th\u003e\n\u003cth\u003eCW\u003c/th\u003e\n\u003cth\u003ePR\u003c/th\u003e\n\u003cth\u003ePW\u003c/th\u003e\n\u003cth\u003eEX\n\u003c/th\u003e\u003c/tr\u003e\n\u003ctr\u003e\n\u003cth\u003eNL\n\u003c/th\u003e\n\u003ctd style=\"background:#087324;vertical-align:middle;text-align:center;\" class=\"table-yes\"\u003e:white_check_mark:\u003c/td\u003e\n\u003ctd style=\"background:#087324;vertical-align:middle;text-align:center;\" class=\"table-yes\"\u003e:white_check_mark:\u003c/td\u003e\n\u003ctd style=\"background:#087324;vertical-align:middle;text-align:center;\" class=\"table-yes\"\u003e:white_check_mark:\u003c/td\u003e\n\u003ctd style=\"background:#087324;vertical-align:middle;text-align:center;\" class=\"table-yes\"\u003e:white_check_mark:\u003c/td\u003e\n\u003ctd style=\"background:#087324;vertical-align:middle;text-align:center;\" class=\"table-yes\"\u003e:white_check_mark:\u003c/td\u003e\n\u003ctd style=\"background:#087324;vertical-align:middle;text-align:center;\" class=\"table-yes\"\u003e:white_check_mark:\n\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\n\u003cth\u003eCR\n\u003c/th\u003e\n\u003ctd style=\"background:#087324;vertical-align:middle;text-align:center;\" class=\"table-yes\"\u003e:white_check_mark:\u003c/td\u003e\n\u003ctd style=\"background:#087324;vertical-align:middle;text-align:center;\" class=\"table-yes\"\u003e:white_check_mark:\u003c/td\u003e\n\u003ctd style=\"background:#087324;vertical-align:middle;text-align:center;\" class=\"table-yes\"\u003e:white_check_mark:\u003c/td\u003e\n\u003ctd style=\"background:#087324;vertical-align:middle;text-align:center;\" class=\"table-yes\"\u003e:white_check_mark:\u003c/td\u003e\n\u003ctd style=\"background:#087324;vertical-align:middle;text-align:center;\" class=\"table-yes\"\u003e:white_check_mark:\u003c/td\u003e\n\u003ctd style=\"background:#ab0330;vertical-align:middle;text-align:center;\" class=\"table-no\"\u003e:x:\n\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\n\u003cth\u003eCW\n\u003c/th\u003e\n\u003ctd style=\"background:#087324;vertical-align:middle;text-align:center;\" class=\"table-yes\"\u003e:white_check_mark:\u003c/td\u003e\n\u003ctd style=\"background:#087324;vertical-align:middle;text-align:center;\" class=\"table-yes\"\u003e:white_check_mark:\u003c/td\u003e\n\u003ctd style=\"background:#087324;vertical-align:middle;text-align:center;\" class=\"table-yes\"\u003e:white_check_mark:\u003c/td\u003e\n\u003ctd style=\"background:#ab0330;vertical-align:middle;text-align:center;\" class=\"table-no\"\u003e:x:\u003c/td\u003e\n\u003ctd style=\"background:#ab0330;vertical-align:middle;text-align:center;\" class=\"table-no\"\u003e:x:\u003c/td\u003e\n\u003ctd style=\"background:#ab0330;vertical-align:middle;text-align:center;\" class=\"table-no\"\u003e:x:\n\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\n\u003cth\u003ePR\n\u003c/th\u003e\n\u003ctd style=\"background:#087324;vertical-align:middle;text-align:center;\" class=\"table-yes\"\u003e:white_check_mark:\u003c/td\u003e\n\u003ctd style=\"background:#087324;vertical-align:middle;text-align:center;\" class=\"table-yes\"\u003e:white_check_mark:\u003c/td\u003e\n\u003ctd style=\"background:#ab0330;vertical-align:middle;text-align:center;\" class=\"table-no\"\u003e:x:\u003c/td\u003e\n\u003ctd style=\"background:#087324;vertical-align:middle;text-align:center;\" class=\"table-yes\"\u003e:white_check_mark:\u003c/td\u003e\n\u003ctd style=\"background:#ab0330;vertical-align:middle;text-align:center;\" class=\"table-no\"\u003e:x:\u003c/td\u003e\n\u003ctd style=\"background:#ab0330;vertical-align:middle;text-align:center;\" class=\"table-no\"\u003e:x:\n\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\n\u003cth\u003ePW\n\u003c/th\u003e\n\u003ctd style=\"background:#087324;vertical-align:middle;text-align:center;\" class=\"table-yes\"\u003e:white_check_mark:\u003c/td\u003e\n\u003ctd style=\"background:#087324;vertical-align:middle;text-align:center;\" class=\"table-yes\"\u003e:white_check_mark:\u003c/td\u003e\n\u003ctd style=\"background:#ab0330;vertical-align:middle;text-align:center;\" class=\"table-no\"\u003e:x:\u003c/td\u003e\n\u003ctd style=\"background:#ab0330;vertical-align:middle;text-align:center;\" class=\"table-no\"\u003e:x:\u003c/td\u003e\n\u003ctd style=\"background:#ab0330;vertical-align:middle;text-align:center;\" class=\"table-no\"\u003e:x:\u003c/td\u003e\n\u003ctd style=\"background:#ab0330;vertical-align:middle;text-align:center;\" class=\"table-no\"\u003e:x:\n\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\n\u003cth\u003eEX\n\u003c/th\u003e\n\u003ctd style=\"background:#087324;vertical-align:middle;text-align:center;\" class=\"table-yes\"\u003e:white_check_mark:\u003c/td\u003e\n\u003ctd style=\"background:#ab0330;vertical-align:middle;text-align:center;\" class=\"table-no\"\u003e:x:\u003c/td\u003e\n\u003ctd style=\"background:#ab0330;vertical-align:middle;text-align:center;\" class=\"table-no\"\u003e:x:\u003c/td\u003e\n\u003ctd style=\"background:#ab0330;vertical-align:middle;text-align:center;\" class=\"table-no\"\u003e:x:\u003c/td\u003e\n\u003ctd style=\"background:#ab0330;vertical-align:middle;text-align:center;\" class=\"table-no\"\u003e:x:\u003c/td\u003e\n\u003ctd style=\"background:#ab0330;vertical-align:middle;text-align:center;\" class=\"table-no\"\u003e:x:\n\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/table\u003e\n\n### Notes\n\n- A typical mutex corresponds one-to-one with a distributed exclusive lock (EX).\n- There is no one-to-one mapping for a RW mutex in a distributed setting, although Protected Read \u0026 Write locks correspond closely to many of a RW mutexe's guarantees\n\n## Support Matrix\n\n|                    Backend / Lock Type                    |         EX         | PW  | PR  | CW  | CR  | NL  |\n| :-------------------------------------------------------: | :----------------: | :-: | :-: | :-: | :-: | :-: |\n| [Jetstream](https://docs.nats.io/nats-concepts/jetstream) | :white_check_mark: | :x: | :x: | :x: | :x: | :x: |\n|                 [Etcd ](https://etcd.io/)                 | :white_check_mark: | :x: | :x: | :x: | :x: | :x: |\n|                [Redis ](https://redis.io/)                | :white_check_mark: | :x: | :x: | :x: | :x: | :x: |\n\n## Dlock specific guarantees\n\n### Exclusive Locks (EX)\n\n- **Liveliness A** : A lock is always eventually released when the process holding it crashes or exits unexpectedly.\n\n- **Liveliness B** : A lock is always eventually released when its backend store is unavailable.\n\n- **Atomicity A** : No two processes or threads can hold the same lock at the same time.\n\n- **Atomicity B** : Any call to unlock will always eventually release the lock\n\n## References\n\n- [Distributed Lock Manager](https://en.wikipedia.org/wiki/Distributed_lock_manager). (n.d.). In Wikipedia. Retrieved from https://en.wikipedia.org/wiki/Distributed_lock_manager\n- Kleppmann, Martin. \"Designing Data-Intensive Applications.\" (2019).\n- [Redis redlock algorithm](https://redis.io/docs/manual/patterns/distributed-locks/) from https://redis.io/docs/manual/patterns/distributed-locks/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexandrelamarre%2Fdlock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexandrelamarre%2Fdlock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexandrelamarre%2Fdlock/lists"}