We propose a semantic model for client-side caching and replacement in a client-server database system, and study the benefits of this approach over page caching and tuple caching strategies. Our semantic caching model is based on, and derives its advantages from, three key ideas.
First, the client maintains a semantic description of the data in its cache, instead of maintaining a list of physical pages or tuple identifiers. This allows for a compact specification, as a remainder query, of the tuples in the server database, not available in the client cache, needed to answer a query. Remainder queries provide reduced communication requirements and additional parallelism compared to faulting-based approaches. Second, usage information for replacement policies is maintained in an adaptive fashion for semantic regions, which are associated with collections of tuples. This avoids the high overheads of the tuple caching approach of maintaining such information on a per-tuple basis and, unlike the page caching approach, is also insensitive to bad clustering of tuples on pages. Third, maintaining a semantic description of the data in the client cache encourages the use of sophisticated value functions, not just LRU or MRU, in determining usability information. Value functions that incorporate semantic notions of locality can be devised for traditional query-based applications as well as for emerging applications such as mobile databases, where query profiles have considerable regularity.
We validate these ideas with a detailed performance study that is focused initially on traditional workloads, and is then extended to workloads inspired by a mobile navigation application.