CNCO3002: Advanced Computer Communication - IT Assignment Help

Download Solution Order New Solution
Assignment Task:

The objective of this network programming assignment is to develop two complementary programs, a client and a server, that implement an anonymous storage server. The server stores user files anonymously. A user, via client, sends a file to the server. The server stores the file in a folder, and returns a hash key to the client. The user can retrieve the stored file using the key. The key is sufficiently long and complex to guarantee that nobody, except the user, can guess the key of each file. A key is generated as follows. When the server receives a file, it creates a new name, i.e., file_n for the file, generates a hash key for the file_n, stores the file in a folder storage, and returns the key to the client. Note, the server can use a global counter to create a unique file name, i.e., the value of n is positive integer {1, 2, 3, … }. The key is an MD5 hash, which is a 128-bits value usually printed as 32 hexadecimal numbers created by Unix function md5sum. You may use popen() function to call md5sum in your program, and pclose() function to close the created stream. The client and server recognize the following five user commands. Each command is not case sensitive. 1) STORE local_file: A user asks the server to store a file local_file that is located at client. The client sends command STORE and the content of file local_file to the server, waits for reply from the server, i.e., the file’s key, shows the reply on the screen, and waits for another user command. Note that the name of the file, i.e., local_file, is not sent to the server. Receiving this request, the server creates a unique file name, e.g., file_100, generates the hash key for file_100, writes the content of local_file in file_100, which is stored in a directory storage, records this transaction in the file’s history, sends a message “STORE: File has been stored with hash key”, and waits for another client request. 2) GET key file_name: A user wants to retrieve from the server a file whose hash is key, and writes its content in file_name located at client. Advanced Computer Communication (CNCO3002) 2nd Semester 2020 2/5 The client sends this request to the server, waits for the file sent by the server, stores its content in a file file_name in client’s directory, and waits for another user command. Note that file_name is not sent to the server. Receiving this request, the server sends the file whose hash is key to the client, records this transaction in the file’s history, and waits for another client request. If the received key does not correspond to hash of any file on the server, the server sends a message “GET: Error! Hash key is not valid” and waits for another client request. A client is given k chances to send a valid key. The kth time a client provides an invalid key, the client is disconnected and no new connection will be accepted from the same IP address within t1 seconds. Let t1 ≥ 1 and k ≥ 1 be command line arguments when you run server. 3) DELETE key: A user wants to delete a file whose hash is key from the server. The client sends this request to the server, waits for a reply, shows the reply on the screen, and waits for another user command. Receiving this request, the server deletes a file from folder storage whose hash is key, records this transaction to the file’s history, and replies with “DELETE: File with hash key has been deleted”, and waits for another client request. If the received key does not correspond to the hash of any file on the server, the server sends a message “DELETE: Error! Hash key is not valid” and waits for another client request. A client is given k chances to send a valid key. The kth time a client provides an invalid key, the client is disconnected and no new connection will be accepted from the same IP address within t1 seconds. Let t1 ≥ 1 and k ≥ 1 be command line arguments when you run server. 4) HISTORY key: A user wants to read the recorded history of the file whose hash is key. The client sends the request to the server, waits for a reply, shows the reply on the screen, and waits for another user command. Receiving this request, the server sends to the client the history records for key, and waits for another client request. If there is no entry for key, the server sends a message “HISTORY: Error! There is no history for hash key” and wait for another client request. A client is given k chances to send a valid key. The kth time a client provides an invalid key, the client is disconnected and no new connection will be accepted from the same IP Advanced Computer Communication (CNCO3002) 2nd Semester 2020 3/5 address within t1 seconds. Let t1 ≥ 1 and k ≥ 1 be command line arguments when you run server. 5) QUIT: A user wants to disconnect from the server. The client sends the request to the server, waits for an acknowledgement, and closes the connection. Receiving this request, the server sends a message “Thank you for using our anonymous storage”, and closes the connection.


This IT Assignment has been solved by our IT Experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.

Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.