In this problem set, you will investigate the effect of selfish behavior on one of two peer-to-peer systems: BitTorrent and Kademlia. Luckily for you, there are many open source implementations of BitTorrent to choose from, including Azureus and libtorrent, which both implement Kademlia and have extensive plug-in architectures. You will have considerably more flexibility to decide what exactly you are doing, compared to PS1. You should aim to do one of the following things, all with an eye toward contributing an ideas to our group goal of building a system functions well in the presence of selfishness.
October 16th A one-page description of your intentions. This should show that you've already done something beyond thinking. Maybe you've found a set of long-running BitTorrent swarms you intend to benchmark against, maybe you've researched the Azureus source enough to describe how you will implement your idea, maybe you have proposed simulator model.
October 23rd In addition to short write-up of your methods and findings (about 5 pages), you'll give a short talk (10min) about your work, your findings, and your recommendation to the class about the use of what you've learned. How can your work be used in our effort to build a distributed system that is tolerant to selfishness?
There are a lot of open-source BitTorrent implementations out there; here's an overview.
libtorrent is a C++ implementation of BT that supports plugins and the "official" DHT (supported by Mainline BT, μTorrent, BitComet, etc, but incompatible with Azureus's DHT). It uses object-oriented design and the Boost library extensively, with functionality well-separated into about a dozen different classes. The plugin interface for libtorrent allows a plugin to override or block the handling of standard BT messages; though for deeper changes to strategy, you may want to modify the guts of libtorrent directly. We have experience with libtorrent using it for the Brownie Points project, and can help you find what you're looking for.
Azureus, written in Java, is the most deployed BitTorrent client, and as a result has been modified by researchers in the past for projects like BitTyrant and PropShare. One complaint students have had in the past is that the Azureus codebase is very large, sprawling across dozens of directories, with interfaces and "impl" classes split up and separated in hard-to-find places: given your intended modification, the changes you'll need to make might only require changing a few files, but finding those files may take a long time. Still, the source code for the research projects above is available: it may help to diff these modified clients against the Azureus version they were based on.
Other client implementations worth mentioning are the official Mainline python client (supports DHT), the Tribler fork of the python client, and rakshasa's libTorrent (also supports DHT, not to be confused with rasterbar libtorrent above).