Asyncio part 1

Python 3.4 was released a couple of weeks ago and with it the new asynchronous library asyncio. As I have worked quite a lot with Twisted at my day job I am quite thrilled for this new built-in async library.

The new asyncio library is also a good reason to start doing Python 3 development. Due to using Twisted at my dayjob I have mostly used 2.7.

To explore asyncio I’m going to write a small application using it. Recently I have gotten a bit interested in distributed hash tables (DHT) and that seems like a good fit for for testing out an async library. Having researched about DHTs I found the paper on Kademlia. Go ahead and read it if you haven’t already, it is quite easy to read and describes the rationale behind the design decisions. Next resource I found was this specification.

After reading I started by building a very simple JSON RPC layer using asyncio primitives communicating over UDP. The progress can be found at the asyncio-kademilia project page on github] and more details will come in part 2.