\svnInfo $Id$  

\noindent 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 setups, and increase
performance significantly, 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 entire system, violating the
isolation properties of the underlying database. They leave the
application responsible for cache management, 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,
\emph{\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.2
\times$, only slightly below that of a non-transactional cache,
showing that consistency does not have to come at the price of
performance.
%performance numbers

%\edatnote{DRKP}{Add summary of results}

% Our system, \emph{\txcache{}} uses a multi-version cache to allow
% read-only transaction to run slightly in the past while ensuring
% that they still see a consistent view of the database.  This novel
% technique ...


% Distributed in-memory caching of application data has recently become
% a popular approach for improving the scalability of database-driven
% web sites. These systems, such as \memcached, provide a simple and
% flexible interface: they store application-provided key/value
% mappings, like a distributed hash table. The cache can be used to
% cache the results of both database queries and application
% computations, reducing load on both the database and application
% servers. Because cache performance scales near-linearly with the
% number of servers, this technique is used extensively by a number of
% large websites, who find it to be the most cost-effective approach to
% improving performance.

% Unfortunately, such caches do not guarantee transactional consistency
% of the results they return, making them unsuitable for use in
% applications with strict consistency requirements. Moreover, the
% application is responsible for invalidating the cache, making
% programming difficult because the developer must reason globally to
% identify every change that might affect a cached value.

% We provide an alternative in a transactional cache, \emph{\txcache{}},
% which retains the flexibility and scalability of simple application
% data caches while providing transactional consistency and a simpler
% programming model.  \txcache uses a novel technique to improve
% performance and avoid explicit invalidations: it allows read-only
% transactions to run slightly in the past, but ensures that they see a
% consistent view of the database. This is achieved using a versioned
% cache, in which entries are automatically tagged with the range of
% times at which they are valid.


%%% Local Variables: 
%%% mode: latex
%%% TeX-command-default: "Make"
%%% TeX-PDF-mode: t
%%% TeX-master: "paper.tex"
%%% End: 

% LocalWords:  invalidations versioned
