基于Memcached的高速缓存功能扩展研究
发布时间:2018-12-26 13:25
【摘要】:随着计算机技术的不断发展,缓存技术已经得到了广泛应用。近年来,互联网的普及,导致了互联网用户剧增,高速缓存技术更是成为了研究的热点。高速缓存技术的应用,可以有效提高系统的响应速度,降低网络带宽消耗,减少网络阻塞,从而解决数据量大、信息更新频繁所导致的问题。良好的缓存架构方案是大型互联网应用系统实现海量数据处理、多用户并发访问以及提供良好用户体验的关键。 本文分析了当前常用的缓存技术及其产品的特点,深入分析了高速缓存系统Memcached的架构方案、工作原理以及内部实现机制,并在此基础上,针对Memcached存在的缺陷和不足,对其功能进行了扩展和改进。通过Memcaced源码分析,进一步扩展了缓存数据遍历、数据持久化以及系统日志等功能。在扩展功能实现的过程中,使用了工厂设计模式,降低了持久化模块接口之间的耦合度;同时,通过引入批量数据保存策略,有效地减少了磁盘I/O开销,并采用多种数据保存接口触发机制来增加系统数据的可靠性、安全性。在缓存数据遍历设计中,采用了数据分批发送的方式来降低内存开销。最后,本文采用黑盒测试技术,以人工测试和自动化测试相结合的方式对系统扩展的相关功能进行了验证性测试,并分析了其性能。测试结果表明,扩展功能不仅有效的弥补了Memcached在功能设计方面的的不足,丰富了其应用,同时,新增功能并不会增加太多额外的开销,完全能够和以前的功能融合在一起协同工作。
[Abstract]:With the development of computer technology, cache technology has been widely used. In recent years, the popularity of the Internet has led to a sharp increase in Internet users, cache technology has become a research hotspot. The application of cache technology can effectively improve the system response speed, reduce the network bandwidth consumption, reduce network congestion, so as to solve the problem caused by the large amount of data and the frequent update of information. A good cache architecture is the key to realize massive data processing, multi-user concurrent access and good user experience in large-scale Internet application systems. In this paper, the characteristics of cache technology and its products are analyzed, and the architecture, working principle and internal implementation mechanism of cache system Memcached are deeply analyzed. On this basis, the defects and shortcomings of Memcached are pointed out. Its function is extended and improved. Through Memcaced source code analysis, further extended cache data traversal, data persistence and system logging functions. In the process of implementing the extended function, the factory design pattern is used to reduce the coupling degree between the persistent module interfaces. At the same time, by introducing batch data saving strategy, I / O overhead of disk is reduced effectively, and a variety of data saving interface trigger mechanisms are adopted to increase the reliability and security of the system data. In the design of cache data traversal, data batch is used to reduce memory overhead. Finally, this paper uses black box test technology to test the extended functions of the system by the combination of manual test and automatic test, and analyzes its performance. The test results show that the extended function not only effectively compensates the deficiency of Memcached in function design, but also enriches its application, at the same time, the new function will not add too much extra overhead. Fully able to work together with previous functions.
【学位授予单位】:西南交通大学
【学位级别】:硕士
【学位授予年份】:2012
【分类号】:TP333
本文编号:2392185
[Abstract]:With the development of computer technology, cache technology has been widely used. In recent years, the popularity of the Internet has led to a sharp increase in Internet users, cache technology has become a research hotspot. The application of cache technology can effectively improve the system response speed, reduce the network bandwidth consumption, reduce network congestion, so as to solve the problem caused by the large amount of data and the frequent update of information. A good cache architecture is the key to realize massive data processing, multi-user concurrent access and good user experience in large-scale Internet application systems. In this paper, the characteristics of cache technology and its products are analyzed, and the architecture, working principle and internal implementation mechanism of cache system Memcached are deeply analyzed. On this basis, the defects and shortcomings of Memcached are pointed out. Its function is extended and improved. Through Memcaced source code analysis, further extended cache data traversal, data persistence and system logging functions. In the process of implementing the extended function, the factory design pattern is used to reduce the coupling degree between the persistent module interfaces. At the same time, by introducing batch data saving strategy, I / O overhead of disk is reduced effectively, and a variety of data saving interface trigger mechanisms are adopted to increase the reliability and security of the system data. In the design of cache data traversal, data batch is used to reduce memory overhead. Finally, this paper uses black box test technology to test the extended functions of the system by the combination of manual test and automatic test, and analyzes its performance. The test results show that the extended function not only effectively compensates the deficiency of Memcached in function design, but also enriches its application, at the same time, the new function will not add too much extra overhead. Fully able to work together with previous functions.
【学位授予单位】:西南交通大学
【学位级别】:硕士
【学位授予年份】:2012
【分类号】:TP333
【参考文献】
相关期刊论文 前9条
1 王嘉佳;张前进;;基于SASL的LDAP认证机制研究[J];电子科技;2006年11期
2 孟彩霞;叶海琴;;Web缓存替换算法综述[J];福建电脑;2009年09期
3 涂小朋;汪林林;;分布式空间数据库中基于事务的客户端高速缓存技术研究[J];计算机科学;2004年06期
4 杨春贵;吴产乐;彭鸿雁;;一种有效的Web代理缓存替换算法[J];计算机工程;2007年03期
5 符青云;刘心松;;基于分布式协同缓存机制的Web Proxy研究[J];计算机工程;2007年11期
6 沈千里;基于SASL的SMTP认证的分析与实现[J];计算机应用;2004年03期
7 曹丽娟;谢强;丁秋林;;基于分布式数据缓存技术的Web-OLAP系统研究[J];计算机应用;2008年02期
8 赵鲲鹏;苏葆光;;Linux内存管理中的Slab分配机制[J];现代计算机;2006年05期
9 乐德广,郭东辉,吴伯僖;网络缓存技术及应用的研究[J];计算机系统应用;2003年05期
相关硕士学位论文 前4条
1 蒲胤;分布式缓存安全验证组件的设计与实现[D];重庆大学;2010年
2 王会霞;Web流量特征模型的研究和应用[D];郑州大学;2007年
3 杜秉一;基于关联规则缓存策略的分布式视频点播系统的研究和设计[D];华中科技大学;2008年
4 狄刚;HTTP实现代理服务器及缓存替换算法的研究[D];吉林大学;2010年
,本文编号:2392185
本文链接:https://www.wllwen.com/kejilunwen/jisuanjikexuelunwen/2392185.html