Assignment – 2: Simple Proxy Cache

In this assignment, you will implement a simple Internet proxy cache. A proxy cache receives requests from client machines. It checks whether the document is available locally (in its file system). If so, it returns the file from its file system. Otherwise, it obtains the document from the respective website, stores it locally and returns it to the client. The local cache is cleaned when the proxy cache starts up (cold state at startup).

You will use your client from the previous assignment to test the caching server. Recall that the request strings are of the format GET <filename>.

 The proxy receiving the above request first checks whether the request string is properly formatted. If not, it sends the following error string 100: Unsupported Operation. It then checks the whether the file is locally available. If so, the proxy sends the string 400: OK followed by the contents of the file. If the file is not locally available, it sends the request to the origin web server in the required format, and sends the reply sent by the origin server to the client. However, it stores the reply only if the requested document was successfuly retreived (which means that negative replies are not cached). You do not need to take care of issues like document replacement or non-cacheable documents.

The proxy cache has to be implemented in C/C++ using sockets in Linux environment. If you plan to implement it on another OS you should talk to me and get prior permission.

 In addition to implementing the proxy cache, you will do a small experimental evaluation. You will select 5 web sites of your choice retreive the web pages and record the latency when the request is "hit" (the reply is from your proxy cache) and when it is a miss (the request reaches the origin server). 

What to Submit:

  1. You will submit the source code of proxy cache. You should also include makefiles for compiling the code. You should also include a README stating any assumptions you have made.
  2. Submit the performance graphs and in one/two paragraphs state the observations you have made through this experimental study.

 How to Submit:

Include everything in a tarred compressed file. Label the file using the following convention: <Lastname>_Assignment1.tar.gz. Email the tarred file to me (laks[AT]cs.uga.edu). Please make the title of the email as “DCS-2007: Assignment-2 – <Your last name>”.

Submission Deadline:

March 19th 2007, 11:59 PM EST