Check out the new USENIX Web site.

Resource Pre-processing

After receiving an HTTP GET request, the servlet first obtains the resource corresponding to the requested URL. The exact method of obtaining the resource depends on whether the resource is static or dynamic and whether the servlet is configured as a proxy or a server. If the resource is a HTML text, the Web++ servlet pre-processes the resource by including a reference to the Web++ client applet and expanding references to all logical URLs with JavaScript event handlers as described in Section 3. The logical URLs are found by a regular expression match for URL strings following the <HREF> and <SRC> HTML tags. The matched strings are then compared against the local replication directory. If a match is found, the server emits the modified text into the HTML resource, otherwise the matched URL is left unmodified.

To amortize the post-processing overhead, the Web++ servlet caches the post-processed resources in its main memory. Caching of dynamically generated resources is a complex issue studied elsewhere [25] and its full exposition exceeds the scope of this paper. In the current implementation of the Web++ servlet, we limit cache consistency enforcement to testing of the Last-Modified HTTP header of the cached resource and the most recent modification UNIX timestamp for static resources corresponding to local files. Web++ servlets exchange entries of their replication directories in order to inform other servers about newly created or destroyed resource replicas [41].