|Title||Transactional Consistency and Automatic Management in an Application Data Cache|
|Publication Type||Conference Paper|
|Year of Publication||2010|
|Authors||Ports DRK, Clements AT, Zhang I, Madden S, Liskov B|
|Conference Name||Symposium on Operating Systems Design and Implementation (OSDI '10)|
|Date or Month Published||October|
|Conference Location||Vancouver, BC, Canada|
Distributed in-memory application data caches like memcached are a popular solution for scaling database-driven web sites. These systems are easy to add to existing deployments, and increase performance significantly by reducing load on both the database and application servers. Unfortunately, such caches do not integrate well with the database or the application. They cannot maintain transactional consistency across the entire system, violating the isolation properties of the underlying database. They leave the application responsible for locating data in the cache and keeping it up to date, a frequent source of application complexity and programming errors.
Addressing both of these problems, we introduce a transactional cache, TxCache, with a simple programming model. TxCache ensures that any data seen within a transaction, whether it comes from the cache or the database, reflects a slightly stale but consistent snapshot of the database. TxCache makes it easy to add caching to an application by simply designating functions as cacheable; it automatically caches their results, and invalidates the cached data as the underlying database changes. Our experiments found that adding TxCache increased the throughput of a web application by up to 5.2x, only slightly less than a non-transactional cache, showing that consistency does not have to come at the price of performance.