{"id":19723609,"url":"https://github.com/nitrogen/nprocreg","last_synced_at":"2025-06-19T17:33:10.821Z","repository":{"id":1311853,"uuid":"1256214","full_name":"nitrogen/nprocreg","owner":"nitrogen","description":"Process Registry used by Nitrogen.","archived":false,"fork":false,"pushed_at":"2022-09-25T04:14:09.000Z","size":4256,"stargazers_count":18,"open_issues_count":0,"forks_count":15,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-29T22:36:33.250Z","etag":null,"topics":["distributed-computing","erlang","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nitrogen.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-01-14T22:50:59.000Z","updated_at":"2023-09-06T02:31:22.000Z","dependencies_parsed_at":"2023-01-11T15:50:45.309Z","dependency_job_id":null,"html_url":"https://github.com/nitrogen/nprocreg","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/nitrogen/nprocreg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitrogen%2Fnprocreg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitrogen%2Fnprocreg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitrogen%2Fnprocreg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitrogen%2Fnprocreg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nitrogen","download_url":"https://codeload.github.com/nitrogen/nprocreg/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitrogen%2Fnprocreg/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260796945,"owners_count":23064668,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["distributed-computing","erlang","erlang-library"],"created_at":"2024-11-11T23:22:52.751Z","updated_at":"2025-06-19T17:33:05.807Z","avatar_url":"https://github.com/nitrogen.png","language":"Erlang","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nprocreg - Minimal Distributed Erlang Process Registry\n\n[![Build Status](https://travis-ci.org/nitrogen/nprocreg.png?branch=master)](https://travis-ci.org/nitrogen/nprocreg)\n\nnprocreg is a global process registry built for the [Nitrogen Web\nFramework](http://nitrogenproject.com). The goal of nprocreg is to allow\nKey-based lookups of a Pid, and if no Pid is found, to start a new process\nbased on a provided Function, load-balanced newly spawned functions across the\ncluster.\n\nThe nprocreg gen_server, when run on a node in a Nitrogen cluster,\nwill automatically connect to other nprocreg servers in other\nnodes in the cluster.\n\nNodes discover eachother by broadcasting out their existence to\nall other nodes in the cluster, retrieved by nodes(). When a node\nreceives a message from another node, it updates a state variable,\ntracking the node. If enough time has passed since the last\ncheckin, the node is removed, because we assume that the\napplication has stopped. (Note that the node itself might still be\navailable, we ignore this fact.)\n\nThe case that we must be careful of is when two processes look up\nthe same Key at the same time on different nodes, potentially\nleading multiple Pids associated with the same key. To avoid this\nproblem, we hash the Key to a node, and try to start the process\non that node. This effectively makes process creation single\nthreaded, drastically reducing the opportunity of creating\nconflicting Pids. Note that this opportunity still exists: when a\nnew node running nprocreg is started, or an existing one is\nstopped, different nodes could have a different view of which\nnodes are available. This will happen so infrequently, and for\nsuch a short time, that we just ignore it.\n\nnprocreg is used by the Nitrogen Web Framework.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnitrogen%2Fnprocreg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnitrogen%2Fnprocreg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnitrogen%2Fnprocreg/lists"}