Skip to content
/ goDHT Public

A chord based distributed hash table (DHT) using Go & gRPC

Notifications You must be signed in to change notification settings

pl0q1n/goDHT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

goDHT

A chord based distributed hash table (DHT) using Go & gRPC

Prerequisites

Build

Server:

$ protoc --go_out=plugins=grpc:. ./client_proto/client.proto
$ go build ./client

Client:

$ protoc --go_out=plugins=grpc:. ./node_proto/node.proto
$ go build ./server

Usage

Server:

General options:
  -help                       Show help
  -host [ ip:port ]           Create host  
  -taget [ ip:port ]          Create host and connect it to existing one  

Example:

 $ ./server -host 127.0.0.1:8080

Client:

I wrote this client just to give a simple example of how the server could be used. You can easily write your own client, just follow client protocol (node_proto/node.proto)

General options:
  -help                       Show help
  -host [ ip:port ]           Target host
  -action [ args ]            Action selection
  -key [ integer ]            Key for your value (key-value model)
  -value [ integer ]          Value for your key 

Args for action:
   p                          Put request
   d                          Delete request
   g                          Get request

Example:

$ ./client -host localhost:8080 -action p -key 1700 -value 1337

About

A chord based distributed hash table (DHT) using Go & gRPC

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published