Quality-of-Service Guarantees for Dynamic Information Systems
The typical system architecture, for delivering dynamic content pages, has multiple tiers of servers working together: a web server which builds the page from static content like logos and texts, together with the results obtained by running business logic in an application server, acting on business data stored on a database server. To serve thousands or millions of users in real-time, the web server and application servers are each replicated across a cluster of machines; to allow quick responses to a request, each server keeps a cache of recently-used content or data. This is illustrated in the figure below.
A clustered system architecture with distributed caching gives excellent scalability and response times if the data does not change. However, when some activities can change the business data, the information in caches becomes obsolete. A few system designs have proposed keeping the application servers' caches synchronised, so they change whenever the corresponding information is updated in the database server; but this results in slow performance for updates, and it does not scale well to support huge numbers of requests. The most common approach is hence to allow the use of stale information from caches; this gives good scalability and performance, but the application running the business logic is acting on incorrect data, and so its calculations may be wildly wrong. This situation is reflected in web pages that indicate that the information provided is tentative or heuristic, as when an online shop states "This product usually ships in 48 hours" (see picture on the right).
Our research in this area is motivated by the following observations: For some applications, information that is up to one hour obsolete might be very useful, while another application might not give valid results unless the information is recent to within five minutes. But the more recent the information needs to be, the more overheads the system will face keeping it that way, and the worse will be the overall performance. In this project, we hence aim to provide Quality-of-Service (QoS) control to applications using distributed caching. We are working on novel distributed caching algorithm that delivers QoS to meet the applicationÕs requirements at high performance. We call our approach Freshness-Aware Caching (FAC).
Freshness-aware caching introduces a new QoS-parameter that allows programmers to express their QoS requirements for data freshness and consistency when they are accessing data from distributed application server caches. Each application server keeps (some) objects in the cache even after the cached version has become obsolete, and also records a freshness-of-data value for those objects (that is, knowing when the cached object was an accurate copy of the state at the backend database server). FAC returns the cached data if it can be used to satisfy the read and fulfill the programmer's QoS requirements, and otherwise, replace the cached object with a fresh version taken from the database server. This way, middle-tier applications will become able to trade data freshness for cache performance, as more relaxed freshness limits will result in less cache misses and hence faster data access.
Prototype Development
We are implementing freshness-aware caching (FAC) in an industrial-strength open source application server: JBoss. This enables us to study the performance and benefits of FAC in real-world applications, as well as to communicate the results of our research to a wider web community. The caching strategy can be dynamically specified in the JBoss configuration. The final version will also allow us to specify the freshness and consistency constraints in the deployment descriptor.
We are currently working on developing the basic FAC scheme for single-object requests. We have previously looked into cache replication protocols for distributed caching, and compared it with middle-tier database caching. In the future, we plan to extend our method with explicit consistency constraints and to prototypically implement it into a real-world application.
The Team
This project would not have been possible without the contributions by our project students:
Chieh Chi 'Jesse' Hsu, Lei Qin, Sebastian Schmidt, and Li Bin 'Leo' Huang.
Publications
Uwe Röhm and Sebastian Schmidt. "Towards Freshness-Aware Caching in a Cluster of J2EE Application Servers". Submitted for publication. 2007.
Uwe Röshm and Chieh Chi Hsu, "A Comparative Evaluation of Distributed J2EE Caching versus Middle-Tier Database Caching".