Simple DHT proof of concept in Python
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
README
overlay.py
persist.py
query.py
restapi.py
ring.py
todo
trabuco.py

README




 +-+-+-+-+-+-+-+
 |T|r|a|b|u|c|o|
 +-+-+-+-+-+-+-+

 Naive implementation of DHT over a UDP overlay network

 This was just code I wrote for fun and learn more about the concepts of DHT

 To use this:

 Start this trabuco.py process on several nodes (or the same node, but different ports)
 python trabuco.py --localip 127.0.0.1 --localport 10001 (first node)
 python trabuco.py --localip 127.0.0.1 --localport 10002 --peerip 127.0.0.1 --peerport 10001  
 (for each additional node, where localIP:localport are unique)

 Peerip and peerport just need to point to another node already running trabuco, 
 once connected, it will get a list of all the other peers can can connect directly to them

 Use the query.py script to GET and SET keys/values
 ./query.py --key foo --value bar

 ReST API
     python restapi.py
     curl -X POST -d 'foo=bar' http://localhost:5000/trabuco/keys/
     curl http://localhost:5000/trabuco/keys/foo

Copyright © 2017 by Jean-Christophe Smith