Short paper on your servers performance

Assignment Help Computer Engineering
Reference no: EM13320843

Web Server

Your server will have to do a few different things. First, it will need to bind to a port specified as a command line argument. After successfully doing this, it must listen for incoming client connections and accept them. (Hint: all of the highlighted words are the names of system calls used to do these things).

The server will need to fork() a new process for each connection that it is handling. It is not quite this simple though. If you simply keep forking new processes, when the client closes its connection, you will end up with a zombie process. These zombie processes will build up and slowly eat up your machine's resources. Obviously, this isn't good.

To remedy this, you should write a signal handler for the SIGCHLD signal to properly dispose of zombified children (hehe).

After the new process has been created, the server is responsible for reading data from the client (recv) and parsing it as an HTTP request. We are only concerned with GET requests. Remember that handy dictionary you wrote in A1? That'll be really useful here, since HTTP headers are a key/value data structure.

Now that the GET request has been parsed, you can look up the file that is being requested. If the server can locate the file, it should form an appropriate response header and serve file back to the client with a 200 response code. If it can't find it, it should return a 404 response code. If there is some other kind of error, just throw a 500 response code.

Note that you should support enough of the HTTP protocol to allow a web browser to navigate to the port your server is running on and successfully get a file. This article should help you with that.

Profiling Your Server

After you have a working server (or before, doesn't really matter), you should write a client program to test your web server and gather various statistics on its performance. The statistics you collect are really up to you, but I recommend testing throughput (requests/second), the length of an average successful request vs. an unsuccessful one, and request time vs. file size. You can write the client in any language. Merry Christmas.

After you have gathered a solid amount of statistics, you should write a short paper on your server's performance. Point out bottlenecks and analyze the data that you've gathered, as well as coming up with a few suggestions on how you may be able to increase performance. This doesn't have to be a thesis, but it should be a solid analysis of what you've done.

https://github.com/funkenstein/WMU-CS2240

Reference no: EM13320843

Questions Cloud

What is the minimum coefficient of static friction : What is the minimum coefficient of static friction between the road and the tires on a car for the car to go around a flat curve at 45.0 mph
Determine what is the gage pressure in chamber a : Two chambers, A and B both have manometers with the same fluid with specific gravity 1.4. When h(sub a) = 6 cm and h(sub b) = 4 cm, what is the gage pressure in chamber A
What is the tension in the left-handed cable : A mass M is suspended using two cables which make angles of theta_1 and theta_2 with the horizontal across the top. What is the tension (T_1) in the left-handed cable
Analyse the supply and demand of labor in the country : Analyze the supply and demand of labor in the country
Short paper on your servers performance : A solid amount of statistics, you should write a short paper on your server's performance. Point out bottlenecks and analyze the data that you've gathered, as well as coming up with a few suggestions on how you may be able to increase performance
What is the minimum speed at the top of the circle : A 0.250 kg ball attached to a string s being swung in a vertical circle, What is the minimum speed at the top of the circle to keep the string from going slack
Calculate the required average strength fc for the concrete : Calculate the required average strength fc for the concrete ( a) if there are no prior test results for concrete with a compressive strength within 1000 psi of fc made with sim-ilar materials.
Calculate the amount the spring compresses : An elevator cable breaks when a 975 kg elevator is 24.5 m above the top of a huge spring (k = 8.00 x 10^4 N/m) at the bottom of the shaft. Calculate the amount the spring compresses
How is jainism different from buddhism : How is Jainism different from Buddhism? theological as well as historical similarities and differences between these two religions with special emphasis on their respective origins, goals, central teachings, and religious practices

Reviews

Write a Review

Computer Engineering Questions & Answers

  What mean to take a systems view of a project

What does it mean to take a systems view of a project? How does taking the systems view of a project apply to project management.

  Solve the javascript program

solve the javascript program.

  How items in the array should be searched

Covers Sequential & Binary Search; Selection Sort, Bubble Sort, Index Sort, Merge Sort.How items in the array should be searched.

  Develop an algorithm using pseudocode

Using the sentinel controlled while loop, develop an algorithm using pseudocode for computing cos(X) and sin (X) for the expression e^(+_jx)=cos(X)+_jsin(X)

  Regarding level of order traversal

Write down a level order traversal that does every level of the binary tree before moving on to the next level. Starting with the root add the children nodes to list.

  Write down a program that has a function named presentvalue

Write down a program that has a function named presentValue

  Application for verifying pin number

The National Commerce Bank has hired you to generate an application which verifies a customer personal identification number (PIN).

  What is a work breakdown structure

What is  a work breakdown structure

  Use the int cast process to convert to an integer

give Output the corresponding letter grade along with the initial number entered in decimal format utilizing the printf method and format specifiers. Output the number in only 3 decimal places.

  Create program that reads from the external file input.txt

create a program that reads from the external file input.txt

  How to generate a class diagram for the entity classes

How to generate a class diagram for the entity classes

  Create a program that demonstrate passing arguments

create a program that demonstrate passing arguments ByVal and then ByRef. I just need help with the coding.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd