{"id":20845883,"url":"https://github.com/flowchain/node-p2p-chord","last_synced_at":"2025-07-24T13:34:03.939Z","repository":{"id":40444298,"uuid":"66001847","full_name":"flowchain/node-p2p-chord","owner":"flowchain","description":"A light weight Chord protocol and algorithm library that creates a distributed hash table (DHT) for a p2p network.","archived":false,"fork":false,"pushed_at":"2017-01-18T14:43:36.000Z","size":61,"stargazers_count":13,"open_issues_count":1,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-22T11:07:01.989Z","etag":null,"topics":["chord","dht","p2p"],"latest_commit_sha":null,"homepage":"https://wotcity.com","language":"JavaScript","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/flowchain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-18T14:01:39.000Z","updated_at":"2021-05-13T04:50:55.000Z","dependencies_parsed_at":"2022-09-18T00:40:48.666Z","dependency_job_id":null,"html_url":"https://github.com/flowchain/node-p2p-chord","commit_stats":null,"previous_names":["jollen/node-p2p-chord"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/flowchain/node-p2p-chord","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowchain%2Fnode-p2p-chord","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowchain%2Fnode-p2p-chord/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowchain%2Fnode-p2p-chord/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowchain%2Fnode-p2p-chord/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flowchain","download_url":"https://codeload.github.com/flowchain/node-p2p-chord/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowchain%2Fnode-p2p-chord/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266850898,"owners_count":23995171,"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","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["chord","dht","p2p"],"created_at":"2024-11-18T02:14:17.627Z","updated_at":"2025-07-24T13:34:03.904Z","avatar_url":"https://github.com/flowchain.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-p2p-chord\n\n[![](https://travis-ci.org/jollen/node-p2p-chord.svg?branch=master)](https://travis-ci.org/jollen/node-p2p-chord)\n\n*node-p2p-chord* is a light weight Chord protocol and algorithm library in JavaScript for a peer-to-peer distributed hash table (DHT). It is a sub-project of [WoT.City](https://wotcity.com) and the underlying component of [WoT.City](https://wotcity.com) software framework. The technical details can be found at [WoT.City white paper](https://wotcity.com/WoTCity-WhitePaper.pdf).\n\n## Usage\n\nTo start a virtual node.\n\n```\n$ export HOST=192.168.0.3\t; the IP address for this Chord node to listening to\n$ export PORT=8000\t\t\t; the port number for this Chord node to listening to\n$ node node0.js\t\t\t\t; start the the virtual node\n```\n\nTo connect a subsequent node in order to join the existing p2p network.\n\n```\n$ export HOST=192.168.0.100\t; the IP address for this Chord node to listening to\n$ export PORT=9000\t\t\t; the port number for this Chord node to listening to\n$ node node1.js\t\t\t\t; start a Chord node and join the existing node\n```\n\nIn the ```node1.js``` file that you have to add ```join``` property for the connecting node.\n\n```\n// to connect to a subsequent node\nserver.start({\n\tonmessage: onmessage,\n\tjoin: { \n\t\taddress: '192.168.0.3', \n\t\tport: 8000\n\t}\t\n});\n```\n\n## Quickstart\n\nTo create a node and connect to a subsequent node. Add the ```join``` property to specify the existing p2p node.\n\n```\nvar server = require('./libs/server');\n\n/**\n * Chord network.\n */\nvar onmessage = function(payload) {\n};\n\n/**\n * Join an existing node.\n */\nserver.start({\n\tonmessage: onmessage,\n\tjoin: { \n\t\taddress: '127.0.0.1', \n\t\tport: 8001\n\t}\t\n});\n```\n\nTo create a new virtual node.\n\n```\nvar server = require('./libs/server');\n\n/**\n * Chord network.\n */\nvar onmessage = function(payload) {\n};\n\n/**\n * Create a virtual node (seed node).\n */\nserver.start({\n\tonmessage: onmessage,\n});\n```\n\n## History\n\nv0.5: current\n * Support full stabilization\n * Major bug fixed: [#0ee56e413a8c8bab68da282a445f5705fc34305b], [#c7db7fdfc731c6f103f955b763c1f80862ff66c8]\n\nv0.4: 2016.12.19\n * Major bug fixed\n  * FOUND_SUCCESSOR bugs\n  * NOTIFY_SUCCESSOR bugs\n * Improve startUpdateFingers()\n * Add a new ```NOTIFY_JOIN``` RPC message\n\nv0.3: 2016.08.27\n * Support refreshing finger table entries\n * Support verifying successor's consistency\n\nv0.2: 2016.08.26\n * Support create and join\n * Support stabilize and notify\n\nv0.1: 2016.08.25\n * Chord node prototype\n * Chord node over WebSocket server\n\n## Credits\n\nThere are existing Chord node.js implementations, and the *node-p2p-chord* is inspired by them.\n\n* [shigasumi/chord-node-js](https://github.com/shigasumi/chord-node-js)\n* [optimizely/chord](https://github.com/optimizely/chord)\n* [tsujio/webrtc-chord](https://github.com/tsujio/webrtc-chord)\n\n## License\n\nThe MIT License (MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflowchain%2Fnode-p2p-chord","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflowchain%2Fnode-p2p-chord","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflowchain%2Fnode-p2p-chord/lists"}