web catching simulation
Description
Project Deliverable: A network client that generates HTTP requests and a server that simulates a real web server as well as a proxy web server
Specification 1: The client should generate around 100-1000 (not necessarily unique/distinct) URL requests for each experiment in increments of 100: 100, 200, 300, 400,…, 1000. The client program should measure the time from the request submission to the time that the entire response was received. The following table should be displayed:
#Requests | Avg. Response Time | Median Response Time
100
200
300
..
…
Specification 2: The web server receives requests from the client and serves the requests in the following manner.
Direct Mode: In Direct mode, the Web server acts like a distant webserver and takes some “time” before responding to the client. The time that the server takes is to simulate the real-life scenario of dealys like network delays, propagation delays and processing delays.
Proxy Mode: In Proxy mode, the web server parses the HTTP request to generate the query string. The web server then consults an index (the web cache) to see if that request was previously made. If the request was previously made, then the web server finds a match and responds to the client immediately. If the request not previously made the web server adds the request to the cache after serving the request in Direct mode (and adding all the necessary delays as well). For the purposes of the experiments you can assume that the cache is infinite.
#Request | Mode of Response | Time Taken
1
2
3
…
…
200
Important implementation challenges to consider:
1. How to simulate the randomness of the web server (proxy vs direct mode)?
2. How to implement the web cache? (Hint: DBMS course)
3. Different libraries have different time overheads. You can explore implementing lookup etc using first principles and see the difference.
Unformatted Attachment Preview
———————–
1. .client.py and .server.py
E.g.,
0201.client.py
0201.server.py
A) If your client/server require IP addresses of each other, you can allow the grader to enter them on the command line:
E.g. 0201.client.py
E.g. 0201.server.py
B) If there is a specific list of urls you have tried your experiment on, you can submit that file as well. The client script should be able to read the file from command line.
E.g. 0201client.py
C) Naming of the url file should be as before:
E.g. 0201.url.file
2. Any README file (if you have one). .README
E.g, 0201.README
3. IMPORTANT: DO NOT INCLUDE ANY ADDITIONAL INFORMATION IN THE FILE NAMES LIKE YOUR NAME OR FULL ROLL NUMBER.
All submissions not conforming to file naming conventions will be REJECTED and you will not have a chance to resubmit.
4. If you have made multiple implementations of the web cache you can submit either multiple files as follows: client-1.py
E.g., 0201.client-1.py
and write down in the README file as to what you have done in such a file.
Multiple implementations doesn’t mean different ways of running the same code. The code across each implementation should have a different method of implementing the web cache (Refer to DBMS course for Indexing implementations).
5. Hard deadline and strict file naming conventions. No other submission format is allowed (zip, jpeg, pdf, doc etc).
Purchase answer to see full
attachment
Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."