{"id":19556245,"url":"https://github.com/somekay/erlang-dht","last_synced_at":"2025-04-26T22:32:55.948Z","repository":{"id":551487,"uuid":"181887","full_name":"SomeKay/erlang-dht","owner":"SomeKay","description":"A very simple example of implementing a structured P2P network (DHT) in Erlang.","archived":false,"fork":false,"pushed_at":"2009-04-21T15:55:52.000Z","size":75,"stargazers_count":33,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T18:11:18.560Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Erlang","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SomeKay.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2009-04-21T15:39:19.000Z","updated_at":"2020-06-12T01:57:09.000Z","dependencies_parsed_at":"2022-07-07T23:21:23.353Z","dependency_job_id":null,"html_url":"https://github.com/SomeKay/erlang-dht","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SomeKay%2Ferlang-dht","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SomeKay%2Ferlang-dht/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SomeKay%2Ferlang-dht/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SomeKay%2Ferlang-dht/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SomeKay","download_url":"https://codeload.github.com/SomeKay/erlang-dht/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251063667,"owners_count":21530837,"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":[],"created_at":"2024-11-11T04:37:15.818Z","updated_at":"2025-04-26T22:32:51.125Z","avatar_url":"https://github.com/SomeKay.png","language":"Erlang","funding_links":[],"categories":[],"sub_categories":[],"readme":"Structured P2P network simulation in Erlang\nAuthor: Kristian Poslek\n\n_________________________________________________________________\nThis is a very simple structured P2P network simulation in Erlang\nthat's based on processes as peers and a self-organizing network.\n_________________________________________________________________\n\nUsage instructions\n==================\n\nAdd the first peer\nName = peer:add(name).\nExample: John = peer:add(john).\n\nAdd any other peer\nName = peer:add(name, Sponsor).\nwhere Sponsor is another peer already in the network.\nExample: Mary = peer:add(mary, John).\n\nRemove a peer\nName!stop.\nwhere Name is the peer that should be removed.\nExample: John!stop.\n\nDisplay the status of a peer\nName!status.\nwhere Name is the peer that's status should be displayed.\nExample: John!status.\n\nDisplay the whole ring\nName!showRing.\nwhere Name is the peer that should be the starting point of the ring.\nExample: John!showRing.\n\nAdd a resource\nName!{put, resource}.\nwhere Name is the peer that's inserting a new resource into the network;\nthe resource is going to be placed in the correct range of the ring.\nExample: John!{put, secretdocument}.\n\nGet a resource\nName!{get, resource}.\nwhere Name is the peer that's getting a resource.\nExample: John!{get, secretdocument}.\n\nInput test data\ntest:addItems(Name).\nwhere Name is the peer that should be adding the test data into the network.\nEcample: test:addItems(John).\n\nTest scenario\n=============\n\nThis little test scenario is designed to show how the network organizes itself\nwhen someone enters or exits.\nEnter these commands into the erl shell one after another.\n\nJohn = peer:add(john).\nMary = peer:add(mary, John).\nAnn = peer:add(ann, Mary).\nGordan = peer:add(gordan, John).\nMary!showRing.\nMary!{put, testdocument}.\nMary!showRing.\ntest:addItems(John).\nAnn!showRing.\nJohn!stop.\nAnn!showRing.\nNewJohn = peer:add(john, Mary).\nAnn!showRing.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsomekay%2Ferlang-dht","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsomekay%2Ferlang-dht","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsomekay%2Ferlang-dht/lists"}