University of California at Berkeley
Dept of Electrical Engineering & Computer Sciences
Mapster: Application-Level File Sharing

Mapster: Application-Level File Sharing

Introduction

Many different Internet applications are available today, such as peer-to-peer file sharing, internet relay chats, and massively multiplayer online role-playing games. Some applications involve just two users, for instance, one might transfer a file to a friend via ICQ, whilst others allow multiple users to interact simultaneously. A lot of you may have used Napster, Gnutella and KaZaA. They provide controversial online services that allow people to share music files, video files and software copies through Internet. The services they provide are excellent projects for this class. In project 1, we are going to implement a distributed file sharing system. We will leverage the client-server model, and develop a file sharing system with a central index server. Clients who are willing to share files can publish index files to the central server to announce the existence of their shared files. The central server maintains a index table for all shared files in the network. Henceforth, a client who want to find something can search files by keyword on the index server and find out which peer client has files that she is interested in. Then the client can contact this peer directly to download the files.

Project Deadlines

Instructions

Project Submission

Downloadables

Modification to Project Specs

Hints & Tips

FAQs

Testcases

Checkpoint #1: Client side: (Total 10 pts)
  1. Check all code paths mentioned in specs (Total 8pts):
    1. Basic correctness (Total 4pts):
      1. Join the network via the server (1 pt)
      2. Publish its shared files to server; see if the server gets them (1 pt)
      3. Search the server by keyword and have the client print zero, one, or multiple results based on the result message sent by the server (2pts)
    2. Based on the search results, download a file correctly from its peer. (Total 3pts)
      Make sure that:
      1. Error is handled if: 1)the peer is not listening; 2) a peer, either the sender or the receiver, crashes in the middle of downloading(1pt)
      2. Peer responds to download request by sending the correct file (1pt)
      3. The client correctly receives the file from its peer (1 pt)
    3. Leave and quit the network; see if the server is notified (Total 1 pt)
  2. Basic robustness (Total 2pts):
    1. have the student's client download from each other a big file, say 200K, does everything work well (1 pt)
    2. several clients simultaneously download the same big file from a peer. do all clients get the whole file (1 pt)
Checkpoint #2: Server side + Client side: (Total 30 pts)
  1. Test your server by checking all code paths mentioned in specs: (Total 10 pts)
    1. Basic correctness: we will run 2-3 clients to test whether your server handles basic joining, publishing, searching and leaving operations correctly.
      1. Does server handle join and maintain listening ports of clients correctly? (2 pt)
      2. Is a publish sent by a client correctly stored at the server? (1 pt)
      3. If a client do publishing multiple times, does the server maintain the correct information and remove duplicates? (1 pt)
      4. Can the server handle search correctly? If there are multiple files associateed with the given keyword, are all results found and of search sent to the client correctly? (2 pts)
      5. Does the server correctly remove related information in the index table upon receive a "Leave" messsage from a client? (2 pt)
      6. Does the server handle the client crashes and remove all relevant information from the index table?(1 pt)
      7. Does the server print out information about clients in the system and the file index table correctly? (1 pt)
  2. Test the client again using the same cases in checkpoint 1 (Total 10pts).
  3. Test robustness of the implementation. To be coming. (5 pts)
  4. Credit on the design and coding style of the project, including readability,modularization, clean error handling, memory free, etc. (5 pts)

Last updated: 04th October 2004