Giter Site home page Giter Site logo

congress's Introduction

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

congress's People

Contributors

lysol avatar

Watchers

Matilda Horger avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.