Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

🌎 Chord in golang

License

NotificationsYou must be signed in to change notification settings

skyzh/go-dht

Repository files navigation

Build Status

DHT models in golang. Use gRPC for communication.

Protocol

gRPC is used for communication between nodes.Chord andKad RPCs are defined astwo different services in protobuf file. And here's an additional service calledDHT,through which clients control DHT node and modify keys in DHT.

Chord

Chord is a DHT protocol and algorithm. Here I use SHA-1 as hashing function, and select first16 bits of hashing result as node identifier. You may change it innode/chord.go.

To run tests,

gotest ./node -v -short

For system test (build cluster and stabilize it, usually takes longer time),

gotest ./node -v

To quickly setup a cluster of 50 nodes,

go run ./rpc_cluster

To run a single node,

go run ./rpc_node

To test key modification in cluster (put, query and delete 2000 entries),

go run ./rpc_client

Kademlia

Kademlia is expected to be implemented.

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp