Filter Method
The filter handles requests from the client browser and fills them if it has the requested documents available, or relays the requests to the pump. It maintains a cache which is preloaded by the pump based on the URLs within requested documents and provides feedback to the pump based on the files the client requests.
- A client (browser) sends an encasualted GET request to a filter (extended proxy server).
- The filter looks for the requested URL in its cache.
- If the URL is not found, the filter redirects the GET request to the pump(remote extended proxy server) and waits for a response.
- If the URL is found in the cache, the filter sends the requested file to the client. It then sends a GOT message to the pump instead of a request.
- When the filter receives the response from the pump, it closes connection to the pump, redirects the response to the client, and stores the response in its local cache.
- While handling requests from the client to the pump, the filter also receives preloaded files from the pump on a separate connection.
- These files are stored in the filter cache in order to increase the chance of a GOT in the future. If the cache is full, the filter implements its replacement algorithm to make room.
Pump Method
The pump handles requests from the filter and responds with the desired files. It also maintains preload information about the client so that it can fill the filter’s cache with files that are likely to be requested by the client.
- When the pump receives a GET request from the filter, it responds either by requesting the file from the desired web server and relaying this to the filter, or by sending the desired file from its cache.
- Also upon receiving a GET request, the pump creates a new PRELOAD TREE for the individual client, and creates a PRELOAD QUEUE with URLs harvested from the file requested by the filter.
- After the pump has responded to the request from the filter, it sends files from the PRELOAD QUEUE to the filter. Each HTML file which is preloaded has other URLs harvested from it for the PRELOAD QUEUE, and the PRELOAD TREE is updated accordingly.
- When the pump receives a GOT message from the filter, this is an indication that the client has followed a link corresponding to a file that was already at the filter. If this file is in the PRELOAD TREE, the pump makes this file the root of the TREE. Otherwise, the pump makes a new PRELOAD TREE based on the chosen file.
- The order that files are preloaded to the client will depend on several heuristics which will optimize the the preload time. These heuristics will be based on the order the elements appear in each file, the types of files to be preloaded, and the frequency of each file in the preload set.
Message Format
- GOT formatsame as GET request format except request type is GOT;
- PRELOAD formatsame as the conventional http response format.
Underneath Protocol
- UPDATE/PRELOAD connection is bidirectional persistent TCP connection;
- Use refresh and time out mechanism(soft state) to refresh and tear down the UPDATE/PRELOAD connection;
- GET and GOT message trigger to establish new UPDATE/PRELOAD connection if the connection has been torn down;