NET 4005: Network Applications - Socket Programming and Concurrency - IT Assignment Help

Download Solution Order New Solution
Assignment Task:

Objective:

Objective of this assignment is to write a simple client-server network application using Java socket programming API. Also, to learn simple concurrency control techniques in a multithreaded program. 

Description:

You will write a client-server java program for transferring some file from the server to the client. The server and the client are separate programs and may be running on different computers. The server program runs and waits for requests from the client. The client program takes a file name X as a command line parameter and asks the server if it has the file X. After receiving the request, the server checks if the file X is in its current directory and lets the client know. In addition, the server tells the client some statistics regarding the visits by all previous clients. Specifically, the server sends 2 numbers <N, M>, where N is the total number of requests so far and M is the number of successful requests. The statistics include the current request, and the server must update the statistics at every request. After the initial response, if the file was available the server sends the file to the client. The client program displays three pieces of information it receives from the server – whether the file was found, and the two numbers M and N. If the file X was found then the client receives the file from the server and stores it in the current directory. After file transfer is complete, the client displays the message “file transfer complete” and terminates. The server program keeps running forever, and displays a log of current request (including client IP address and the requested file) and the statistics. You must design the necessary protocol such that the information exchange between the client and the server works properly. 

Implementation details:

Implement the client and the server as separate java programs, myfileclient.java and myfileserver.java, each having a main() method (you may have other classes in both the server and the client programs). The server must be able to handle concurrent requests from multiple clients, without holding requests for a long time. To do this, the server should handle the requests using a pool of worker threads. While there can be 100s of clients requesting files to the server, the server is restricted to have 10 worker threads only. After receiving requests from a client, the server will store this request in a queue. All the worker threads start running from the beginning. A worker thread can serve one client request at a time. Whenever a worker thread finishes serving a client request, it picks up the next available request from the queue and start serving that. Note that when multiple worker threads update the statistics M and N, you must be careful about having correct values.

 

This NET 4005: 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.