Document Type



Master of Science


Computer Science

First Adviser

Spear, Michael F.


Memcached and other in-memory distributed key-value stores play a critical role in large-scale web applications, by reducing traffic to persistent storage and providing an easy-to-access look-aside cache in which programmers can store arbitrary data. These caches typically have a narrow interface, consisting only of gets, sets, and compare-and-set. In the worst case, this interface can cause significant inefficiencies as clients get large data items, perform small changes, and then set the updated items back into the cache.We present extensions to memcached that allow the system administrator to dynamically load custom code modules into memcached, so that clients may execute code directly on the memcached server. Our system permits both fetch-and-phi operations, which update the cache, and filtering operations, which compute a function over the data in the cache, and return the result to the client without making an update to the cache. We evaluate our extensions on benchmarks based on workload traces from a Cable/Internet ser- vice provider, and find that our new functionality provides a means of dramatically reducing network overheads and increasing responsiveness.