D-Term 2006 CS 4513 Prof. D. Finkel
Assignment 2
Due Date: Thursday, April 20 at 9:50
AM
Goal: The overall goal of this
assignment is convert your program of Assignment 1 into a client-server
distributed file system, with the client running on one machine and the server
on another machine. If you do not have
at least a B-level version of Assignment 1, please let me know right away and I
will provide one to you.
Your program will have portions running on two
machines, local and remote.
The program on local will read
in input (as in Assignment 1) either from a file or from standard input, and
validate the input as having legal syntax.
If the input is syntactically incorrect, the local program will print an
error message to the user. The local program will not have direct access to the file system data
structures, so the local program will
not have to check directly that files exist, that there are blocks available on
the disk, or otherwise check that the file system is able to carry out the
requested operation.
The program on remote
will maintain all the file system data structures. The remote
program will check that a requested operation is possible (data blocks are
available, file has not exceeded maximum size, etc.). If the requested operation is not possible,
the remote program will return
an error message to the local program. If the requested operation is possible, the remote program will update the file
system data structures and send a confirmation to local.
The
programs on local and remote will communicate using
XML-RPC. You must use XML-RPC in this
assignment. You will have to define the
format and content of the messages passed between local and remote.
The
program on local will read in user
input, and pass on syntactically correct commands to the program on remote.
The program on remote will
carry out the commands, if possible, and return a confirmation or an error message
to local. The program on local will print appropriate
messages to the user. For debugging
purposes, you may wish to implement a verbose mode, in which the programs on local and remote print something when they send and receive messages.
To
prevent buggy programs from flooding the campus network, run your two programs
on the same machines until they are thoroughly debugged. Your programs for this assignment do not have
to implement contiguous allocation of files, and you do not have to time your
programs.
Submitting
your program: Use the turnin program to submit your assignment. Turn in your program files, but do not turn
in any executable files. Include a file
named build.sh to compile your
program. If you have a makefile, build.sh could simply call make.
Include a README file explaining what level of the
assignment you have completed, and a list of all the implemented features, and
explain how to run your program. Be sure
to include the documentation files as specified in the CS Department
Documentation Standard, located at
http://www.cs.wpi.edu/Help/documentation-standard.html You do not need to include a program listing
or sample runs in your documentation.
The turnin assignment id for project 2 is
"project2":
/cs/bin/turnin submit cs4513
project2 myproject.zip
C-Level
Assignment: To receive a “C” on this assignment, implement
the assignment as above, except that the remote
program does not need to return error or confirmation messages to local; error and confirmation messages
will be printed on remote. Also, the C level assignment does not need to
implement the Print operation, P.
B-Level
Assignment: To
receive the grade of “B” on this assignment, implement complete assignment as
described above.
A-Level
Assignment:
To receive the grade of “A” for this assignment, you must implement the
functionality of the B-level assignment, and add the ability to store files on
both local and remote. In this level of the
assignment, file data structures will be stored by default on local.
File names preceded by /remote/
(for example. /remote/letter.txt) will be stored on remote. You do not need to store any directory
information on local about the /remote directory – your program will just
recognize this prefix as indicating the file is on the remote machine. There is no
restriction on having files with the same name on both local and remote. For the A level assignment, the P and R
commands apply to both the local and remote file systems.
Extra credit
(for the A-Level Assignment only): For extra
credit, implement a copy command, Y (for copY).
It will have the format Y A B, where A and B might be files on local or
files on remote. Executing the command
will create a copy of file A (i.e., the same size) with the name and location
indicated by B; the original file is unchanged by the copy command Examples:
Y letter.txt
/remote/myletter.txt
Y /remote/myMQP.doc myMQP.doc
Y
letter.txt mom.txt