Page 1 of 1

Project Description (A) You will be developing a multi-threaded Web server which interacts with any standard Web Clients

Posted: Fri Jul 08, 2022 6:39 am
by answerhappygod
Project Description (A) You will be developing a multi-threadedWeb server which interacts with any standard Web Clients ( You mayuse any web browser of your choice to test the functionalityhowever you should also submit the a client as given in (B) below). The Web server and Web client communicate using a text-basedprotocol called HTTP (Hypertext Transfer Protocol) (B) Build asingle threaded Web Client on your own which interacts with yourWeb Server, and downloads a file from the server (C) Display theessential connection parameters of connection for both the Webclient ( on the server side ) and for the Web Server ( on theclient side )
Specifications -
Server:
The server being multi-threaded, should be able to handlemultiple requests concurrently. The main thread ( server ), listensto a specified port like the standard port for HTTP (8080). Uponreceiving a HTTP request, the server sets up a TCP connection tothe requesting client and serves the request in a separate threadusing a new port. After sending the response back to the client, itcloses the connection. For this exercise you may choose any browserof your choice for testing. ( Internet Explorer or FireFox orChrome )2 . However you should submit a client program as per thethe Section Specifications - Client.
The server is assumed to work with HTTP GET messages. If therequested file exists at the server, it responds with a “HTTP/1.1200 OK” together with the requested page to the client, otherwiseit sends a corresponding error message, “HTTP/1.1 404 Not Found” or“HTTP/1.1 400 Bad Request”.
• If running the server program using command line, the syntaxshould be server_code_name < port_number >
• You must test your Web server implementation on your localmachine using a Web browser. You need to specify the used portnumber within the URL. If omitting the port number portion, i.e.,8080, the browser should use the default port 8080. To cite anexample, http ∶ //localhost ∶ 8080/index.html
• You should display/log the request and header lines of requestmessages on the server for the purpose of debugging
Specifications -
Client
• The client should be able to initiate a connection to theserver, via a socket and request any page on the server. Uponreceipt of the response message from the server, the clientextracts and displays/logs the message status3 , and then retrievesthe page content from the corresponding message body. • Therequested file need not be HTML, even a text file would suffice 4 .• You may execute the client program using command line, with thefollowing syntax client_code < server_IP address ><port_no >< requested_f ile_name >
(a) Server_IPaddress: The IP address or name of the Web server,e.g., 127.0.0.1 or localhost for the server running on the localmachine.
(b) port_no: The port on which the server is listening tocontnections from clients. If the port number is not entered, thedefault port 8080 should be used.
(c) requested_file_name: The name of the requested file, whichmay include the path to the file.
Specifications - Connection Parameters You should be able toextract the following information from the connection objects, (a)Calculate and Display RTT for the client request5 . (b) Print therelevant server details on client side. The examples could be HostName of the server, socket family, socket type, protocol, timeoutand get peer name 6 . (c) Print the relevant client details onserver side. The examples could be Host Name of the client, socketfamily, socket type, protocol, timeout and get peer name 7 .
Notes
(a) This is an individual project.
(b) You can use the programming language of your choice 8 .
(c) You may use the skeleton code for the server provided in thetextbook’s companion website for reference. You may also want torefer to the textbook, chapter 2, section 2.2.3, for more detailson HTTP message format and section 2.7, for socket programming.
(d) The source codes should be well documented to make it easierfor the GRADER to follow.
Submission Guidelines
• Submit a single zipped file with the naming convention, <your_SAU_id > _ < your_name > .zip
• Your submission should have the following items to beconsidered for evaluation,
(a) Source codes of the Web server and client
(b) Any additional files required to run your codes
(c) –Very Important– readme.txt file with instructions on how tocompile and run your codes. You must mention the IDE as well as anypackages that are required to run the codes.
(d) –Very Important– Provide ample amount of comments in thecode to make it more readable and sustainable.
• Do NOT include any runnable executable (binary) program.
• Make sure your name and your SAU ID are also listed in thereadme file and in comments at the beginning of your sourcefiles.
• Make sure that submissions of the zipped file is throughBlackBoard9 .
• No Late submission will be accepted.
Additional Requirements/Instructions
(a) Please email your Instructor for any doubts andclarifications regarding the project 1.
(b) Complete documentation and instructions for running thecodes are recommended.
(c) If you are using any code from some external source or book,you MUST mention it explicitly in the codes as well as the readmefile. Otherwise, it will be considered plagiarism and your projectwill not be evaluated.
(d) You can discuss with other classmates on steps/algorithms toimplement the project. However, the source codes must be written byyourself .
Grading Rubric (25 points)
(i) The server works correctly with requests from a Web browser(3.5 points)
(ii) The server can serve multiple requests at the same time(multithreaded implementation) (4 points)
(iii) The client sends/receives messages to/from the servercorrectly (5 points)
(iv) The client extracts the status and content of messages fromthe server correctly (4 points)
(v) Extracting and displaying connection parameters (1.5points)
(vi) Calculate and Display Round Trip Time (RTT). (2.5points)
(vii) Proper closing of the ports with exception handling. (2points)
(viii) Display/log of proper messages on the server as well ason the client. (1.5 points)
(ix) Code documentation and Readme file. (1 points)