https://github.com/yukirii/drchord
Chord algorithm based distributed hash table using dRuby
https://github.com/yukirii/drchord
dht druby ruby
Last synced: 8 months ago
JSON representation
Chord algorithm based distributed hash table using dRuby
- Host: GitHub
- URL: https://github.com/yukirii/drchord
- Owner: yukirii
- License: mit
- Created: 2014-06-05T01:49:26.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2017-12-22T13:02:32.000Z (over 8 years ago)
- Last Synced: 2025-09-13T18:58:08.421Z (9 months ago)
- Topics: dht, druby, ruby
- Language: Ruby
- Homepage: http://www.slideshare.net/shiftky/p2p-29488800
- Size: 95.7 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DRChord: A Distributed Hash Table with dRuby
## Overview
DRChord is one of the distributed hash table (DHT).
It is based structured Peer-to-Peer architecture.
## Install
```
bundle install
```
## Usage
### Start node01
```
% bundle exec ruby main.rb
I, [2016-06-04T19:03:05.260044 #81577] INFO -- : dRuby server start - druby://127.0.0.1:3000
I, [2016-06-04T19:03:05.260117 #81577] INFO -- : Ctrl-C to shutdown node
I, [2016-06-04T19:03:05.261176 #81577] INFO -- : Press the enter key to print node info...
```
### Start node02
```
% bundle exec ruby main.rb -p 4000 -e 127.0.0.1:3000
I, [2016-06-04T19:03:45.940079 #82426] INFO -- : dRuby server start - druby://127.0.0.1:4000
I, [2016-06-04T19:03:45.940152 #82426] INFO -- : Ctrl-C to shutdown node
I, [2016-06-04T19:03:45.940294 #82426] INFO -- : Press the enter key to print node info...
```
### Start DHT shell
```
% bundle exec ruby shell.rb -n 127.0.0.1:3000
> help
Command list:
status
put
delete
help
exit
> put hello world
true
> get hello
Value: world
> delete hello
Key & Value deleted. - (hello)
```
## Licence
[MIT](https://github.com/shiftky/drchord/blob/master/LICENCE)