Ask a question from expert

Ask now

CITS1401 Problem Solving and Programming

3 Pages1125 Words270 Views
   

Added on  2019-09-22

CITS1401 Problem Solving and Programming

   Added on 2019-09-22

BookmarkShareRelated Documents
Programming assignment 1File Sharing System (FSS) using only Java socketsYou are charged with building a simple file sharing system (FSS) using a simple command lineinterface. The FSS consists of two types of entities: a file server and many clients. In this FSS:1.The client MUST be able to upload files to the file server. It’s fine to upload them one ata time. If the file already exists, replace it.2.The client MUST be able to download a given file from the file server, by providing thefull filename path to the file server. If the file does not already exist, it MUST return anerror message on standard error and return a non-zero error code.3.The client MUST be able to list the file system objects (files and directories) on a fileserver directory, including the file server’s root (“/”) directory. If the requested directorydoes not exist, it MUST report an error message on standard error and return a non-zeroerror code.4.The client MUST be able to create a directory (if the directory does not exist) andremove empty directories (if the directory is empty), and MUST be able to report whetheror not these operations succeeded. If there’s an error, it MUST report an error messageon standard error and return a non-zero error code.5.The client MUST be able to remove a given file from the file server, by providing the fullfilename path to the file server. If the file does not already exist, it MUST return an errormessage on standard error and return a non-zero error code.6.The file server MUST allow multiple clients to simultaneously connect to a single fileserver for upload/download, and allow for apparently-simultaneous transfer (e.g., it’sNOT okay for the file server to wait for one transfer to complete before another begins).7.Clients MUST be able to cleanly shut down the file server.8.The system MUST support the resume upload and download: If a file transfer between aclient and a server is interrupted (because the network, server, or client has failed), thesame client MUST be able to resume upload/download at the file server from the samepoint of progress by re-requesting the same filename. In other words, the client MUSTNOT have to upload/download the data that is already uploaded/downloaded. Note thatyou have to handle server crashes too – you may want to use “flush()” in the server. Inorder for the TA to verify that you have implemented this functionality the program MUSTprint the progress of upload/download as it’s proceeding, including an indication that apartial download is skipping re-download of some portion of the file.The client will need to know how to contact the server; for this exercise, the client MUST acceptthis in an environment variable named PA1_SERVER with the computer name, a colon, and theTCP portnumber (e.g., “localhost:8000”). The server will need a place to store its data; its filesystem “root” MUST be the current directory for when it is started.Do not make any other assumptions about the properties of the file. The file sharing systemMUST be able to exchange files of any type and with arbitrary filenames. Note: Linux/Unixfilesystems are normally case-sensitive, but Windows/MacOS are normally case-insensitive;
CITS1401 Problem Solving and Programming_1

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
CMP3750M Cyber Security Assessment
|12
|1547
|19

PHP Framework | Lab Report 3
|8
|605
|20