Project 2: Distributed File Sharing System


  • Initial design spec due on April 7.
  • Design review meetings on April 10/11.
  • Complete code and documentation due on April 29.
  • Distributed Peer-to-Peer File Sharing System

    The goal of this assignment is to design and implement a simple Gnutella-like file sharing system. There will no longer be a centralized indexing server that keeps track of what files are available at what nodes. Instead, the system would be truly distributed and each query for a file requires a distributed search through the network. The Gnutella protocol is specified in the following document . You can vastly simplify the specification for this assignment. The only requirement is that the design should not include a centralized entity for keeping track of system state. You can assume that there is an out-of-band mechanism for determining some set of initial candidates for Gnutella neighbors that a Gnutella node could connect to. Queries and other messages are propagated from a node to its neighbors. Here are some other guidelines to lower the message count while implementing the system:
  • Messages are propagated only to a certain distance through the network.
  • Duplicate messages received through different intermediate nodes are to be discarded.
  • You are free to use any programming language (C, C++, Java, etc.) and any mechanism for communicating between machines (such as TCP, UDP, RPCs, etc.). You do not have to implement the PUSH message specified in the protocol. Also, Gnutella assumes that HTTP is used to finally download a file once its location has been determined. You are free to use the raw-TCP-based file fetch mechanism that you had developed for the first assignment.

    Submission Instructions

    We are going to use the most primitive form of submission! Just tar and compress the directory containing all the files and email it to the instructor (rxli(a)public.wh.hb.cn). To tar and compress the directory "as1code," use the following command: "tar cf - as1code | gzip -c > as1code.tar.gz." Then email the tar-ball as an attachment. Please make sure that the directory does not contain any core files or large files that were used for testing.

    Things to include in your submission:

  • A readme file describing how to run the system
  • Source code (with comments where needed)
  • An updated version of the design document that reflects the current design