This repository has been archived by the owner on Dec 24, 2019. It is now read-only.
lysol/congress
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Congress ======== Congress is my haphazard attempt at a Kademlia-like library for building P2P overlay networks, which isn't anything original. I like Entangled, but hate Twisted, so I used pyev, which I find to be much less ambitious and not as big in the hips. Requirements ============ * http://github.com/lysol/dogfood - Requires jsonlib, Cython Prereqs on Ubuntu: sudo apt-get install python-dev cython libev-dev distutils sudo easy_install pyev jsonlib git clone git://github.com/lysol/dogfood.git git clone git://github.com/lysol/congress.git cd dogfood/ sudo python setup.py install cd ../congress sudo python setup.py install Usage ===== python -m congress.congress --host 127.0.0.1 --port 16800 --ctl 19800 \ --peer 1.2.3.4 16800 --debug Debug will spit out a LOT of information. You can also use the class on its own, but you'll have to either tie your code into the libev event loop, or use the folowing libev flags: node._loop.loop(flags=pyev.EVLOOP_ONCE | pyev.EVLOOP_NOWAIT) inside of your own event loop. When using the rpc_get method, you must provide a callback that accepts the original key and value. Presently there is no expiration of tuples, but if this happens it will become a configurable option. At some point there will be more storage options, as well as the ability to reuse the node's ID, if desired, which is more in-line with the Kademlia spec. Control Port ============ nc or telnet to the port defined in --ctl, at localhost. Commands * listpeers * store key val * get key * peer host port
About
A Clumsy Kademlia DHT library
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published