TO FIND THE NEXT OR DIFFERENT PROJECT CLICK ON THE SEARCH BUTTON ON THE TOP RIGHT MENU AND SEARCH USING COURSE CODE OR PROJECT TITLE.

Starting from:
$30

$19.50

SOLVED CSCI4273 PROGRAMMING ASSIGNMENT 2

Objective
To create a HTTP-based web server that handles multiple simultaneous requests from users.
Foreword
Please take time to thoroughly read and understand the document. Only concepts, directions and objectives
will be provided in this document. The assignment will teach you the basics of network programming,
client/server communication message structures, and will provide a step toward building high performance
servers. You must work individually on this assignment; we will check for plagiarism.

Background
What is a web-server?
A web server is a program that receives requests from a client and sends the processed result back to the
client as a response to the command. A client is usually a user trying to access the server using a web
browser (Google Chrome, Firefox).
The HTTP request consists of three substrings – request method, request URL, and request version. All
three parts should be separated by one or more white spaces.
The request method should be capital letters like “GET”, “HEAD”, and “POST”.
The request URL is a set of words which are case insensitive and separated by “/” and the server should
treat the URL as a relative path of the current document root directory.
The request version follows the rule like “HTTP/x,y” where x and y are numbers. POSTDATA 
 so on and the rest of your HTML file. Submission Requirements: 1. Please submit the code for Web Server and README in the format  after you tar-gzip the files. 2. Include short comments in your web server code and explain its proper usage in the README file. The readme file must explain what you have done and how to run it. The documentation does not have to be long, but does have to be very clear. Mention how you execute your program and which language you have used in that file. 3. The code should serve all the file formats in the provided document root directory (www.zip) and the client should receive these files when requested. 4. Simultaneous requests would be sent to the server. Both ways: through 2+ clients sending messages to server at the same time; or one client sending multiple requests at the same time. Your server should handle simultaneous requests. 5. Pipeline support should be present in the code if that extra credits are attempted. 6. Usage of any libraries for HTTP server is not accepted. Testing your Web server: In order to check the correctness of the server, you have to test your server with any of commercial Web browsers such as FireFox or Internet Explorer. You have to test your web server with the sample document root directory provided (www.zip). You can send a request to http://localhost:8888/index.html from your browser and check for response. The response should be ideally displayed on your web browser. Helpful Links: 1. http://www.cs.dartmouth.edu/~campbell/cs50/socketprogramming.html Socket Programming - TCP echo client and server with fork(). 2. http://www.binarytides.com/server-client-example-c-sockets-linux/ : TCP echo client and server with threads. 3. http://www.csc.villanova.edu/~mdamian/sockets/echoC.htm : Echo server-client code with threads. 4. https://www.youtube.com/watch?v=eVYsIolL2gE : Basics of socket programming.