This project requires students to implement an iterative (single-threaded) server for use in a client-server configuration to examine, analyze, and study the effects an iterative server has on the efficiency (average turn-around time) of processing client requests.
Instructions
Students may refer to Java ServerSocket Tutorial and Running System Commands Tutorial to help them create the server and client programs. Students must demonstrate their client and server programs, as well as collect data, using the provided Course Servers. Students should refer to the Accessing the Course Servers page for instructions on connecting to and using the two (2) Course Servers.
Create two (2) programs: 1) an iterative (single-threaded) server that accepts requests from clients, and 2) a multi- threaded client capable of spawning numerous client sessions that connect to the server
The server and client programs must connect to the same network address and port
The iterative (single-threaded) server should handle one client request at a time (serially)
The Java ServerSocket object caches client requests automatically
The iterative (single-threaded) server must support the following client requests:
Date and Time - the date and time on the server
Uptime - how long the server has been running since last boot-up
Memory Use - the current memory usage on the server
Netstat - lists network connections on the server
Current Users - list of users currently connected to the server
Running Processes - list of programs currently running on the server
Create a multi-threaded client that transmits requests to the server on a specified network port
The client program must be able to spawn multiple client sessions
When the server program is launched, the server should
Listen for client requests on the specified network address and port
When a client request is received, the server should
Determine which operation is being requested
Perform the requested operation and collect the resulting output
Reply to the client request with the output from the operation performed
Perform any necessary clean up activities
Go back to listening for client requests
When the client program is launched, the client should
Request the network address and port to which to connect
Request the operation to request (refer to the list above)
Request how many client requests to generate (1, 5, 10, 15, 20 and 25)
Collect the following data
Turn-around Time (elapsed time) for each client request the time required for the client request to travel to the server, be processed by the server, and return to the client
Total Turn-around Time (sum of the turn-around times for all the client requests)
Average Turn-around Time (Total Turn-around Time divided by the number client requests)
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference
and should not be submitted as is. We are not held liable for any misuse of the solutions.
Please see the frequently asked questions page
for further questions and inquiries.
Kindly complete the form.
Please provide a valid email address and we will get back to you within 24 hours.
Payment is through PayPal, Buy me a Coffee
or Cryptocurrency.
We are a nonprofit organization however we need funds to keep this organization operating
and to be able to complete our research and development projects.