Page 1

Threading proxies and it's functions


In computer networks, a proxy server is really a server that acts being an intermediary for requests from clients seeking resources from other machines. A client connects to the proxy server, requesting some assistance, suchs for instance a document, link, web page, or other resource available from the different server and the proxy server evaluates request as an easy way to manage and simplify its difficulty. Proxies were conceived to include encapsulation and design to distributed programs. Nowadays, many proxies are web proxies, facilitating access to information on the Planet Wide Web.


Step 1: Implement a barebones proxy


Starts a TCP server socket to listen for TCP connections on a particular port. Whenever a new link is setup, the proxy reads in a HTTP request; yourcode must be appropriate for HTTP GET requests sent from the curl HTTP client. The low-cost proxy should then go on that HTTP request for the webserver, acquire the info received, and deliver it back again to the client on the TCP connection that the client had proven. You must ensure that you are designed for interleaving of requests from multiple clients by keeping suďŹƒcient condition so that you return an answer received from a webserver back to the proper customer.


You need to implement, in the place of regularly study sockets to get knowledge System I/O signal using the select call by shared proxies. Also, ensure that you handle all errors therefore Your implementation is sturdy.


Step 2: Make the proxy multithreaded


To enhance the throughput o ered, create your paid proxy multi-threaded. The proxy would work in the exact same way as above, except that when information is to be Obtained, a fresh thread is created to do so. However, you ought to control the number of strings in your code to for the most part 20, in the place of let the number of threads grow unbounded.


Step 3: Add a cache to the proxy


To help expand enhance throughput, put in a cache for your cheap proxy-server. At any given time, the cache should contain for the most part 10 MB of data. To evict information in the cache when there is a cache miss, apply the Least-RecentlyUsed (LRU) cache Alternative coverage, i.e., usually put into the cache the absolute most recently seen Target and to add it to the cache, evict the correct quantity of least recently used items from the cache. Make certain that writes and reads from For your cache are thread-safe.


Step 4: Deploy the proxy on EC2


Requirements and Deliverables 

All your code should be written in C. Network I/O should utilize the select, recv, and send calls. Use the proxy service provider thread library for threading and interthread synchronization. The next two deliverables are expected at the end of the project, both due before class on 31st January 2011. • Deploy your proxy on EC2 and e-mail me the address of which your proxy is accessible. I will then consider your setup with my test suite, which will retrieve website pages via your proxy. • Email me an archive that contains all your source-code.


Grading policy 

This project may be worth 20 points. 10 points: I will go over your source-code to make certain your implementation of (a) select-based plug programming, (b) thread pool, and (h) thread-safe cache look appropriate. 10 things: I'll retrieve webpages via your best paid proxy support utilising the curl HTTP client. Your proxy must be robust enough to take care of web requests to arbitrary web sites. The submission that brings the maximum throughput will soon be awarded 10 items. The amount of points awarded to all or any others is likely to be equal in porportion to the fraction of this maximum throughput their proxy offers.


Thanking you.. For more info log on too.. http://proxiesforent.com

Threading proxies and it's functions  

http://proxiesforent.com In computer networks, a proxy server is really a server that acts being an intermediary for requests from clients s...

Read more
Read more
Similar to
Popular now
Just for you