Programming Assignment 7.
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. However, you may
get all the help you need from the TAs or the instructor. You are encouraged
to use the WebCT Discussions page to post problems so that other students
can also see the answers.
The goal of this assignment is to build a Distributed File Service using
SALSA (the Simple Actor Language, System and Architecture).
The Distributed 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
This is the state 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. Each fragment is represented by an
actor. The target node actor stores one fragment and sends or migrate the
remaining fragments to neighbor nodes. The peers themselves can be migrated
to other nodes, which migrates all the fragments served by that peer.
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 the nodes, the file fragments are stored in 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 doesn't 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 the message sent from the nodes with fragments to the
Your DFS system should be error resilient Among others it should handle
the following errors:
SALSA Documentation and download
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 this extension
to receive a full grade. It should also be noted that, if you have an idea
for a different extension, ask either the instructor or TAs for approval.:
Enhance the DFS system to support the one of the following functionalities:
Dynamic Load Balancing
Replication of fragments:
Name collision handling:
The basic assignment doesn't allow replication of fragments. In a real
life scenario we would expect to have many replicas of the same fragment
in different nodes to provide more robustness in case one the nodes or
Separation between searching for a file and downloading a file.
Your system may have different files with the same name. A possible solution
might use a checksum over the file data to identify uniquely each file.
This extension requires completion of extension 4.
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 October 29th, 2002, 11:55pm EST.
You should use the assignments drop-off box located at the course's WebCT
page. Upload a JAR 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.