{"id":46839734,"url":"https://github.com/nomasystems/nbully","last_synced_at":"2026-03-10T12:13:06.146Z","repository":{"id":216809744,"uuid":"486947753","full_name":"nomasystems/nbully","owner":"nomasystems","description":"An OTP application for leader election.","archived":false,"fork":false,"pushed_at":"2025-08-25T09:34:34.000Z","size":44,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-08-25T11:02:02.730Z","etag":null,"topics":["bully-algorithm","erlang-library"],"latest_commit_sha":null,"homepage":"","language":"Erlang","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/nomasystems.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"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}},"created_at":"2022-04-29T11:33:06.000Z","updated_at":"2024-04-22T13:08:07.000Z","dependencies_parsed_at":"2024-01-13T01:02:58.710Z","dependency_job_id":"f4453a43-8f48-4371-ba3d-caaa207fa317","html_url":"https://github.com/nomasystems/nbully","commit_stats":null,"previous_names":["nomasystems/nbully"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/nomasystems/nbully","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomasystems%2Fnbully","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomasystems%2Fnbully/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomasystems%2Fnbully/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomasystems%2Fnbully/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nomasystems","download_url":"https://codeload.github.com/nomasystems/nbully/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomasystems%2Fnbully/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30333011,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T05:25:20.737Z","status":"ssl_error","status_checked_at":"2026-03-10T05:25:17.430Z","response_time":106,"last_error":"SSL_read: 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":["bully-algorithm","erlang-library"],"created_at":"2026-03-10T12:13:05.436Z","updated_at":"2026-03-10T12:13:06.130Z","avatar_url":"https://github.com/nomasystems.png","language":"Erlang","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nbully\n\nAn OTP application for leader election.\n\nThe nbully application starts a supervisor that supervises a worker process. This process runs in every node and consensuates node leadership with its homologues in other nodes.\n\n## Status\n[![GitHub branch checks state](https://github.com/nomasystems/nbully/actions/workflows/ci.yml/badge.svg)](https://github.com/nomasystems/nbully/actions/workflows/ci.yml)\n\n## Prerequisites\n\n![Min. OTP version](https://img.shields.io/badge/min._OTP-25.3.2-blue)\n![Max. OTP version](https://img.shields.io/badge/max._OTP-26-blue)\n![Min. rebar version](https://img.shields.io/badge/min._rebar-3.22.X-blue)\n\n## Usage\n\nIn your `rebar.config` file, add the dependency:\n```erl\n{deps, [\n    {nbully, {git, \"git@github.com:nomasystems/nbully.git\", {branch, \"main\"}}}\n]}.\n```\n\nThen, once the application is started, you can consult `nbully:leader/0` to know which node is the current leader. This value is the same for all nodes connected through `net_kernel` and might only change when nodes go up or down.\n\nYou can also use `nbully:subscribe/0` to receive live updates when the leader changes in the form of a message `{nbully_leader_update, Node}`. For example:\n\n```erl\nok = nbully:subscribe(),\nInitialLeader = nbully:leader(),\n% [...]\nNewLeader =\n  receive\n    {nbully_leader_update, Node} -\u003e Node\n  after 1000 -\u003e InitialLeader\nend,\nLeaderIsMe = node() =:= NewLeader,\n% [...]\nok = nbully:unsubscribe().\n```\n## Support\n\nAny doubt or suggestion? Please, check out [our issue tracker](https://github.com/nomasystems/nbully/issues).\n\n## Contributing\n\nPull requests are welcome. Please read the [contributing guidelines](CONTRIBUTING.md) to know more about contribution.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnomasystems%2Fnbully","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnomasystems%2Fnbully","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnomasystems%2Fnbully/lists"}