{"id":13714233,"url":"https://github.com/arriqaaq/chord","last_synced_at":"2025-05-12T03:32:15.614Z","repository":{"id":54028927,"uuid":"146417321","full_name":"arriqaaq/chord","owner":"arriqaaq","description":"Implementation of Chord DHT(Distributed Hash Table) paper","archived":false,"fork":false,"pushed_at":"2021-03-10T06:39:09.000Z","size":57,"stargazers_count":187,"open_issues_count":1,"forks_count":46,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-14T19:48:41.899Z","etag":null,"topics":["chord","consistent-hashing","dht","distributed-hash-table","go","golang","p2p"],"latest_commit_sha":null,"homepage":"https://medium.com/@arriqaaq/chord-building-a-dht-distributed-hash-table-in-golang-67c3ce17417b","language":"Go","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/arriqaaq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-28T08:37:16.000Z","updated_at":"2024-08-02T15:53:50.000Z","dependencies_parsed_at":"2022-08-13T06:10:27.634Z","dependency_job_id":null,"html_url":"https://github.com/arriqaaq/chord","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/arriqaaq%2Fchord","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arriqaaq%2Fchord/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arriqaaq%2Fchord/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arriqaaq%2Fchord/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arriqaaq","download_url":"https://codeload.github.com/arriqaaq/chord/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221673965,"owners_count":16861748,"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":["chord","consistent-hashing","dht","distributed-hash-table","go","golang","p2p"],"created_at":"2024-08-02T23:01:55.279Z","updated_at":"2024-10-27T12:14:12.111Z","avatar_url":"https://github.com/arriqaaq.png","language":"Go","funding_links":[],"categories":["Repositories"],"sub_categories":[],"readme":"# Chord\n[WIP]\nImplementation of Chord paper\n\n# Paper\nhttps://pdos.csail.mit.edu/papers/ton:chord/paper-ton.pdf\n\n## Example Usage\n\n```go\npackage main\n\nimport (\n\t\"github.com/arriqaaq/chord\"\n\t\"github.com/arriqaaq/chord/internal\"\n\t\"log\"\n\t\"os\"\n\t\"os/signal\"\n\t\"time\"\n)\n\nfunc createNode(id string, addr string, joinNode *internal.Node) (*chord.Node, error) {\n\n\tcnf := chord.DefaultConfig()\n\tcnf.Id = id\n\tcnf.Addr = addr\n\tcnf.Timeout = 10 * time.Millisecond\n\tcnf.MaxIdle = 100 * time.Millisecond\n\n\tn, err := chord.NewNode(cnf, joinNode)\n\treturn n, err\n}\n\n\nfunc main() {\n\n\tjoinNode := chord.NewInode(\"1\", \"0.0.0.0:8001\")\n\n\th, err := createNode(\"8\", \"0.0.0.0:8003\", joinNode)\n\tif err != nil {\n\t\tlog.Fatalln(err)\n\t\treturn\n\t}\n\n\tc := make(chan os.Signal, 1)\n\tsignal.Notify(c, os.Interrupt)\n\t\u003c-c\n\th.Stop()\n}\n```\n\n\n# References\nThis implementation helped me a lot in designing the code base\nhttps://github.com/r-medina/gmaj\n\n# TODO\n- Add more test cases\n- Add stats/prometheus stats","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farriqaaq%2Fchord","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farriqaaq%2Fchord","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farriqaaq%2Fchord/lists"}