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

  Implementing class diagram

Design a class diagram representing a book described by the following statement. “A book comprises of the number of parts that in turn are composed of the number of chapters.

  How to calculate and display the total retail value

A mail order house sells five different products whose retail prices are: product 1 - $150, product 2 - $250, product 3 - $500, product 4 - $300, and product 5 - $350.

  What technologies are used in windows server 2008

What technologies are used in windows server 2008

  How to convert the ff phrase into programming notation

how to Convert the ff phrase into programming notation

  How to compute both the average

Write down a program that declares a vector of real numbers and input values until a 0 is entered. Add the values to the vector by using push_back(), and compute both the average and the maximum value of the numbers. Output the average and the max..

  Discuss software testing as a career path in brief

discuss software testing as a career path in brief. The techniques for solving linear equations and linear inequalities are similar, yet different. Explain and give an example of both a linear equation and a linear inequality that demonstrates this..

  Decribe each of the algorithms as to there stability

A sorting algorithm is stable if two data items having the equal value are not rearranged with respect to each other at any stage of the algorithm. decribe each of the algorithms as to there stability

  Cost estimate for the topliance corporation

You have already generated a project charter, a project schedule, and the cost estimate for the TopLiance Corporation, which sells home appliances. They have over 50 sales agents across multiple states.

  Displaying recent entries of windows security event log

Issue a command which will show 100 most recent entries within the Windows security event log displaying only those entries which were a successful logon event by the Interactive logon.

  Why employees may leave the company

Do you think that it is acceptable for organizations to try to lock employees into a work term after training? In other words, if they send an employee on the training course that could have tremendous benefit to the organization, should they be a..

  Program is re-written so it requires less memory

Cache misses are classified into one of three categories - compulsory, capacity, or conflict.

  Http frame

Assume an HTTPS page links to an HTTP iframe where two are loaded from several origins. Should the browser display a warning dialog? If so describe why. If not, describe why not.

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