Fast and Scalable Cloud Data Management by Felix Gessert & Wolfram Wingerath & Norbert Ritter

Fast and Scalable Cloud Data Management by Felix Gessert & Wolfram Wingerath & Norbert Ritter

Author:Felix Gessert & Wolfram Wingerath & Norbert Ritter
Language: eng
Format: epub
ISBN: 9783030435066
Publisher: Springer International Publishing


5.4.3 Query Caching Proxies and Middlewares

DBProxy, DBCache, and MTCache [Ami+03a, LGZ04, Bor+04] rely on dedicated database proxies to generate distributed query plans that can efficiently combine cached data with the original database. However, these systems need built-in tools of the database system for consistency management and are less motivated by latency reduction than by reducing query processing overhead in the database similar to materialized views [Shi11].

DBProxy [Ami+03a] is designed to cache SQL queries in a proxy, similar to a reverse proxy cache or a CDN. DBProxy adapts the schema as new queries come in and learns query templates by comparing queries to each other. When a query is executed in the database, results are stored in DBProxy. To reuse cached data, DBProxy performs a containment check that leverages the simplicity of templates to lower the complexity of traditional query containment algorithms [Ami+03b]. DBProxy receives asynchronous updates from the database system and hence offers Δ-atomicity by default. The authors describe monotonic reads and strong consistency as two potential options for reducing staleness in DBProxy, but do not evaluate or elaborate on the implications. DBProxy assumes that the application runs as a Java-based program in the proxy and enhances the JDBC driver to inject the caching logic. The authors do not discuss the impact of transactional queries on correctness when they are invisible to the database system.

DBCache [Bor+04, Luo+02, Bor+03] and MTCache [LGZ04] are similar approaches that employ nodes of relational database systems for caching (IBM DB2 and Microsoft SQL Server, respectively). Both systems rewrite query plans to exploit both local and remote data. In DBCache, the query plan is called a Janus plan and consists of a probe query and a regular query. The probe query performs an existence check to determine whether the local tables can be used for the query. Afterwards, a regular query containing a clause for both local and remote data is executed. Cache coherence is based on the DB2 replication interface that asynchronously propagates all updates of a transaction. MTCache uses the corresponding asynchronous replication mechanism from Microsoft SQL Server. It maintains the cache as a set of materialized views and performs cost-based optimization on query templates to decide between local and remote execution. Due to their strong relation to database replication protocols, DBCache and MTCache are effectively lazily populated read replicas.

Labrinidis et al. proposed WebViews as a technique of caching website fragments [LR01a, LR00]. A WebView refers to HTML fragments generated by database queries, e.g., a styled table of stock prices. Through a cost-based model, WebViews are either materialized in the web servers, in the database, or not at all. The authors found that materialization in the web servers is generally more effective than materialization in the database by at least a factor of 10, since it incurs fewer round-trips to the database.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.