OpenBazaar/OpenBazaar — pull request #56 by kujenga (2014-05-29 03:16:27+00:00)
Title: working Kademlia implementation

I created this fork as part of a project for a CS class. We are using the the Entangled python library as the implementation of Kademlia. I saw that this kademlia branch had been created in the original repo and figured that our code could be of use. I'm not sure exactly what you were planning to do with Kademlia, but our goal was to store user sites in the DHT so that they could be accessed when those users are offline. We kept in simple in our version by not using the MongoDB site storage and just moving around the dictionaries from the original project, but it should be fairly straightforward to modify it to do otherwise. The one change we made that may affect other things was shifting the underlying event loop that Tornado uses from the IOLoop to the Twisted reactor with a IOLoop API on top, that allows both the Entangled node (built on Twisted) and the market application to run on the main thread. Anyway, if this looks like something useful to the project, feel free to use it!