摘要
分布式缓存被广泛应用于解决传统关系型数据库的性能瓶颈问题,但是当不能感知分布式缓存的第三方应用直接更新后台数据库时,缓存数据会获得不一致的状态,存在过时缓存问题.本文提出一种基于变化数据捕获机制的分布式缓存一致性策略,集成了基于触发器和基于日志的两种变化数据捕获机制实时捕获后台数据库更新,实现了数据模型自动转换方法和SQL翻译引擎,实时更新缓存,从而保障分布式缓存的一致性.实验模拟TPC-W测试基准中的关键操作,验证了基于日志的变化数据捕获机制相比基于触发器的变化数据捕获机制有更好的数据库性能和缓存一致性效果.
Distributed cache is widely used to solve the performance bottleneck problem in traditional relational database, but when third-party applications that are not cache-aware update the back-end database, the distributed cache will end up in an inconsistent state, which has the problem of stale cache data. This paper proposes a distributed cache consistency strategy based on change data capture mechanism. The work integrates trigger-based and log-based change data capture mechanism that can get the real-time data from backend database, and implements data model transformation and SQL translation engine, which can update cache in real-time to guarantee distributed cache coherence. The experiment simulates the key operation in TPC-W benchmark, which verifies that the change data capture based on log has the better database performance and cache consistency effects compared with the change data capture based on trigger.
出处
《计算机系统应用》
2016年第12期149-154,共6页
Computer Systems & Applications
关键词
分布式缓存
变化数据捕获
模型转换
SQL翻译
distributed cache
change data capture
model transforming
SQL translation