Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a client-server model that will measure performance of the connection in terms of round-trip time (RTT), end-to-end time, and throughput by sending and receiving

Create a client-server model that will measure performance of the connection in terms of round-trip time (RTT), end-to-end time, and throughput by sending and receiving text files. Requirements: 1. Create a C-based client-server architecture using TCP sockets 2. The port number of the server, IP address of the server, input file, and output file should be line arguments to the client program 3. The server should run on any cell machine and the client should be able to connect to the server to compute the performance of the connection 4. The server should accept and service at least one clients requests 5. The client should send a 16 KB text file in chunks of 4 KB or lesser to the server and server should accumulate all the chunks 6. The server should then echo back the accumulated 16 KB data as 4 KB chunks or lesser to the client 7. The client should start a timer just before sending the 16 KB file to the server and stop the timer just after receiving all the chunks from the server to compute the round-trip time in ms 8. The received accumulated data from the server should be stored into an output text file. The input and output text file should be identical

Page 2 of 3 9. The client should then compute the end-to-end time and the throughput 10. Print the round-trip time and end-to-end time in ms and throughput in Mbps on the client side. Make sure all the performance values are rounded off to three decimal places 11. Do not use any string functions to concatenate, copy, or do string manipulations when sending or receiving data on the client side 12. Do not use any string functions to concatenate, copy, or do string manipulations when receiving or sending data on the server side 13. The user will input a 16 KB text file and correct input arguments at the client side. Do not use any Linux shell commands or code from the internet. Procedure: 1. Create a C-based server that can accept at least one clients request using TCP sockets 2. The server should be able to run on any cell machine and the format to start the server is as follows ./prserver where prserver is the performance server executable and port_number is the port number on which the server listens 3. Create a C-based client that can connect to the performance server using TCP sockets 4. The client can run on any cell server machine and should connect the performance server. The user should run the client using the input arguments as shown below ./prclient where prclient is the client executable, IP_Address is the IP address of the cell machine where the prserver runs, port_number is the port number where the prserver listens, input_file is the name of the 16 KB text file that is used for the test and output_file is the name of the file to which the received 16 KB data is written 5. Create a 16 KB input text file by referring to https://onlinefiletools.com/generate- random-text-file 6. Read the input file into a 16 KB character array or buffer and send the data in the buffer as 4 KB or lesser chucks to the server without using any string functions 7. The server should accumulate the chunks received from the client in to a single 16 KB buffer without using any string functions 8. The server should then echo back the accumulated 16 KB buffer as 4 KB or lesser chunks to the client without using any string functions

Page 3 of 3 9. The client should accumulate the chunks in a 16 KB buffer without using any string functions and write the buffer to an output file 10. Compare the input file and output file using the diff program to see if the data in files are identical and it should be identical 11. A timer is started just before the file is sent to the server and stopped just after the chunks are accumulated on the client side. Please refer to https://linuxhint.com/gettimeofday_c_language/ for more details 12. When the start time is subtracted from the stop time the round-trip time (RTT) can be computed and half of the RTT gives the end-to-end time. Print the RTT and end-to-end time in ms on the client side. 13. The throughput is computed as the amount of data sent (16 KB) divided by the end-to-end time. Print the throughput in Mbps on the client side 14. Make sure all the performance values are rounded off to three decimal places 15. An example client interaction with the server is shown below. Client-side input/output: ./prclient 10.144.192.223 1234 test_16.txt recv_16.txt Round Trip Time: 2.417 ms End-to-end Time: 1.209 ms Throughput: 108.413 Mbps

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Donald A. Carpenter Fred R. McFadden

1st Edition

8178088045, 978-8178088044

More Books

Students also viewed these Databases questions

Question

=+50. Now deduce Theorem 3.3 from part (a).

Answered: 1 week ago

Question

Is it clear what happens if an employee violates the policy?

Answered: 1 week ago