ISSN 1000-1239 CN 11-1777/TP

计算机研究与发展 ›› 2015, Vol. 52 ›› Issue (4): 907-917.doi: 10.7544/issn1000-1239.2015.20131910

• 软件技术 • 上一篇    下一篇


王彦士1,3,王伟1,2, 刘朝辉1,2, 魏峻1,2, 黄涛1,2   

  1. 1(中国科学院软件研究所软件工程技术研究中心 北京 100190); 2(计算机科学国家重点实验室(中国科学院软件研究所) 北京 100190); 3(中国科学院大学 北京 100049) (
  • 出版日期: 2015-04-01
  • 基金资助: 

A Mechanism for Transparent Data Caching

Wang Yanshi1,3,Wang Wei1,2,Liu Zhaohui1,2,Wei Jun1,2, Huang Tao1,2   

  1. 1(Technology Center of Software Engineering, Institute of Software, Chinese Academy of Sciences, Beijing 100190) 2(State Key Laboratory of Computer Science(Institute of Software, Chinese Academy of Sciences), Beijing 100190); 3(University of Chinese Academy of Sciences, Beijing 100049)
  • Online: 2015-04-01

摘要: 数据缓存是提升动态Web应用性能的重要手段,传统数据缓存方案主要进行数据查询缓存,通常需要开发人员对应用程序进行大量修改并负责缓存失效维护,导致缓存方案的部署成本和维护成本过高.提出一种新的基于键值存储结构的数据缓存机制EasyCache,支持缓存数据的自动加载,兼容常用的标准数据访问接口及SQL语法,并提出一种基于规则的优化模型及数据一致性保障策略,开发人员无需修改应用程序即可完成EasyCache的集成.TPC-W基准测试结果表明系统性能得到显著提升,在单表数据规模增加以及并发用户规模增加等情况下,系统响应速度可提高10倍,吞吐率提高近1倍.

关键词: 缓存, 透明集成, 键/值, 分布式系统, 结构化查询语言

Abstract: Data caching is an important technology to promote system performance. However, most of the existing data caching solutions need application developers to rewrite the application and to take a large effort to manually manage the caching data. All these disadvantages give rise to the cost of cache deployment and management. A new caching mechanism named EasyCache is proposed in this work, which aims at integrating with existing applications transparently. EasyCache, a key/value store, can scale easily for big data and is compatible with the common data access interfaces and SQL syntax. SQL statements are translated into a sequence of predicts which are specifically designed for key/value stores and rule-based optimization model is proposed simultaneously. EasyCache supports automatic loading of caching data and provides different policies to guarantee data consistency. Developers can easily finish the deployment of EasyCache by replacing the original database driver with EasyCache’s driver, without any modification of existing applications’ source codes. The effectiveness of the EasyCache is illustrated via a detailed set of experimentation using the TPC-W benchmark. The numerical results show that we improve the response speed and throughput by up to 10x and 1x respectively when increasing the number of the table data entries or the number of concurrent users.

Key words: caching, transparent integration, key/value, distributed system, SQL