Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skyzh/go-dht
🌎 Chord in golang
https://github.com/skyzh/go-dht
chord dht go grpc kademlia protobuf
Last synced: 2 months ago
JSON representation
🌎 Chord in golang
- Host: GitHub
- URL: https://github.com/skyzh/go-dht
- Owner: skyzh
- License: mit
- Created: 2019-07-14T13:53:02.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-07-17T07:44:30.000Z (over 5 years ago)
- Last Synced: 2024-08-01T19:43:31.672Z (4 months ago)
- Topics: chord, dht, go, grpc, kademlia, protobuf
- Language: Go
- Homepage:
- Size: 85.9 KB
- Stars: 11
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-cs - @skyzh, 2019 Summer
README
# go-dht
[![Build Status](https://travis-ci.com/skyzh/go-dht.svg?branch=master)](https://travis-ci.com/skyzh/go-dht)
DHT models in golang. Use gRPC for communication.
## Protocol
gRPC is used for communication between nodes. `Chord` and `Kad` RPCs are defined as
two different services in protobuf file. And here's an additional service called `DHT`,
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 first
16 bits of hashing result as node identifier. You may change it in `node/chord.go`.To run tests,
```bash
go test ./node -v -short
```For system test (build cluster and stabilize it, usually takes longer time),
```bash
go test ./node -v
```To quickly setup a cluster of 50 nodes,
```bash
go run ./rpc_cluster
```To run a single node,
```bash
go run ./rpc_node
```To test key modification in cluster (put, query and delete 2000 entries),
```bash
go run ./rpc_client
```## Kademlia
Kademlia is expected to be implemented.