The growth of the Internet and the World Wide Web has significantly increased the amount of online information and services available to the general population of the society. However, the client/server architecture employed by the current Web-based services is inherently un-scalable. Caching at proxies that are located at network access points has been proposed as a solution to the scalability problem. Unfortunately, caching in the Web today has been seriously limited by the inability to cache dynamic documents, including documents that change upon every access, documents that are results of queries, and documents that embody client-specific information (for example, cookies). Furthermore, lack of server control on accesses to cached documents results in the ``caching busting'' practice from the servers, severely undermining the scope of cacheable documents.
To solve these problems, we propose a scheme called Active Cache, which migrates parts of server processing on each user request to the caching proxy in a flexible, on-demand fashion via ``cache applets.'' A cache applet is a server-supplied code that is attached with a Universal Resource Locator (URL) or a collection of URLs. The code is typically written in a platform-independent programming language such as Java When caching a document, the proxy also fetches the corresponding cache applet. When a user request hits on the cached copy and the proxy would like to service the request, the proxy must invoke the cache applet with the user request and other information as arguments. The cache applet then decides what the proxy will send back to the user, either giving the proxy a new document to send back to the user, or allowing the proxy to use the cached copy, or instructing the proxy to send the request to the Web server. Furthermore, the applet can deposit information in a log object, which is sent back to the server periodically and when the applet or the document is purged from the cache.
Cache applets allow servers to obtain the benefit of proxy caching without losing the capability to track user accesses and tailor the content presentation. They can perform a variety of functions, for example, logging user accesses, rotating advertising banners, checking access permissions, constructing client-specific Web pages, etc. They also enable proxies to be more than just caches of static information, but rather caches of objects, i.e., data with a method that is invoked when the data are supplied from caches. In essence, they turn Web documents from datagram to objects.
The proxy, when caching a document with cache applets, has the full freedom to not invoke the applet but send the user request directly to the server. The proxy promises to not send back a cached copy of a document without invoking the corresponding cache applet. On the other hand, if a document is cached but the corresponding applet consumes too much resource, the proxy can simply send the request to the Web server. Furthermore, just as the proxy is not obligated to cache any document, it is not obligated to cache any applet. The proxy agrees to not service a cache hit if the corresponding applet is not in cache.
The proxy's freedom of managing its own resource and the association between cache applets and URLs allow an on-demand migration of server functionalities. The proxy only fetches and executes the applet when there are user requests to the associated URL. Controlling its own resource allocation, the proxy can devote resources to the applets associated with the hottest or the most important URLs to its users. Since the proxy that receives the user request is typically the closest proxy to the user, the scheme automatically migrates the server processing to nodes that are close to users, significantly increasing the scalability of Web-based services.
In this paper, we describe the protocol and interface between the server-supplied cache applets and the proxies in the Active Cache paradigm, and the security mechanisms to guard the applets' execution and protect the proxy. We then give examples of cache applets to illustrate the Active Cache paradigm, and discuss proxy's resource management policies. Finally, we report our experience with an early Active Cache prototype, focusing on the overhead incurred by cache applets.