CSCI.6500 Distributed Computing over the Internet
Programming Assignment 1.
assignment is to be done either individually or in pairs. Do not show
your code to any other group and do not look at any other group's
code. Do not put your code in a public directory or otherwise make it
public. While you may get help directly from the instructor, you are
encouraged to use the WebCT Discussions page to post problems so that
other students can also answer and see the answers.
The goal of this assignment is to build a Decentralized File
Service using Python.
The Decentralized File Service (DFS) is a peer-to-peer network
of nodes, which can be connected to by different clients. Each node in
the system is capable of storing file fragments, splitting files into
fragments, distributing the fragments among a set of neighbors, and
responding to any download request by sending the appropriate file
fragments. The DFS has three main stages:
This is the stage where the system is configured. You have to start with
a graph of nodes. Each node may have 0 or more neighbors. The graph doesn't
necessarily need to be completely connected. In other words, the service
should work whether the peers are fully connected or not.
When a client wants to upload a file into the system. It sends an
Upload request with the given file to any node. If the node has
n neighbors, it splits the file into n+1 fragments. The target node
stores one fragment and sends the remaining fragments to neighbor
The messages used here are:
Upload Request: a message sent from the client to a node to upload a given
Put Request: a message sent from the targeted node to one of its neighbors
to store a fragment that belongs to a given file.
For this assignment, assume that the system has unique file
names. Assume also that at all nodes, the file fragments are stored
in main memory.
A client wanting to download a specific file, sends a Download request
with the name of the file and a Number-of-Hops (NOH) value. If the target
node does not have the complete file, so it propagates the Download request
across the network. As the request is propagated from one node to the other,
its NOH is decremented by one at each hop. A request that has a NOH value
of 0 cannot be propagated any further. Replies with fragments should be
sent directly to the client.
Upon reception of all the fragments, the client should reconstitute the
file and save it.
The messages used here are:
Download Request: a message sent from the client to a node to download
a given file. This is the same message that is propagated across the network
to get the missing file fragments.
Download Reply: a message sent from the nodes with fragments to the
Your DFS system should handle at least the following errors:
Partial file received
Redundant file fragments received
Non existing file
Completion of one of these extensions will result in a better
grade; however, groups of more than one person MUST complete one extension
to receive a full grade. It should also be noted that, if you have an idea
for a different extension, ask the instructor for approval.
Enhance the DFS system to support the one of the following functionalities:
Dynamic load balancing
Replication of fragments
Evaluate the impact of a few peer topologies in file accesibility and
Grading will be split in the following way:
60% correctness (Does it do what it's supposed to?)
20% error handling (Can it easily be crashed?)
20% documentation (Is it easy to read and understand the code?)
The due date for this project is March 5th, 2006, 11:55pm EST.
You should use the assignments drop-off box located at the course's WebCT
page. Upload a ZIP file containing all the relevant
files, along with a README file describing the project and its usage.
10% penalty for a one-day late submission.
25% penalty for up to a three-day late submission.
Submissions more than 3 days late will not be accepted.