Web服務(wù)中緩存機(jī)制的研究與實(shí)現(xiàn)
發(fā)布時(shí)間:2018-03-12 13:49
本文選題:緩存 切入點(diǎn):替換策略 出處:《北京郵電大學(xué)》2014年碩士論文 論文類型:學(xué)位論文
【摘要】:隨著互聯(lián)網(wǎng)的快速發(fā)展和瀏覽器技術(shù)的不斷完善,Web已經(jīng)成為用戶信息獲取和發(fā)布的主要平臺。然而隨著用戶訪問量的增加,Web服務(wù)器無法跟上用戶需求導(dǎo)致服務(wù)響應(yīng)速度越來越慢。為了解決這個(gè)問題,很多新的技術(shù)被提出,在不改變原有Web服務(wù)架構(gòu)的情況下,緩存機(jī)制被認(rèn)為是提高Web服務(wù)響應(yīng)速度的最有效的方法之一,所以對緩存機(jī)制的研究具有重要的意義。本論文結(jié)合多媒體會(huì)議系統(tǒng)課題,從多個(gè)層面上研究Web服務(wù)中緩存機(jī)制。主要工作包括: 首先,我們結(jié)合HTTP協(xié)議中與緩存相關(guān)的頭字段,研究Web服務(wù)中靜態(tài)緩存技術(shù)的原理,實(shí)現(xiàn)了服務(wù)中靜態(tài)文件的緩存。 然后,通過分析主流的緩存替換策略,結(jié)合多媒體會(huì)議此類應(yīng)用數(shù)據(jù)的特征,我們設(shè)計(jì)實(shí)現(xiàn)了基于LRU緩存替換策略的緩存系統(tǒng),該系統(tǒng)主要由四個(gè)功能模塊組成:緩存控制器、緩存替換策略模塊、緩存監(jiān)聽器和緩存數(shù)據(jù)存儲(chǔ)模塊。在緩存替換策略模塊中,實(shí)現(xiàn)一種基于LRU的改進(jìn)替換策略,與傳統(tǒng)替換策略相比,它可有效提高了緩存系統(tǒng)的字節(jié)命中率。在緩存數(shù)據(jù)存儲(chǔ)模塊中,實(shí)現(xiàn)了基于標(biāo)記法的緩存數(shù)據(jù)存儲(chǔ)方式,它可以有效提高內(nèi)存利用率,減少內(nèi)存碎片,從而提高緩存系統(tǒng)響應(yīng)速度。 接著,本論文還針對分布式環(huán)境下服務(wù)器集群間無法實(shí)現(xiàn)session共享問題,提出了使用Memcached緩存技術(shù)的解決方案。此外,通過將Memcached技術(shù)應(yīng)用于Hibernate框架中實(shí)現(xiàn)了數(shù)據(jù)庫數(shù)據(jù)緩存,減少了數(shù)據(jù)庫訪問次數(shù),從而提高訪問吞吐量和服務(wù)響應(yīng)速度。 最后,我們將本論文所研究的緩存機(jī)制應(yīng)用于多媒體會(huì)議系統(tǒng)中,并進(jìn)行了功能測試。結(jié)果表明本論文設(shè)計(jì)實(shí)現(xiàn)的緩存系統(tǒng)具有較高的字節(jié)命中率、內(nèi)存利用率以及較快的響應(yīng)速度。從而有效的提高了多媒體會(huì)議系統(tǒng)的性能。
[Abstract]:With the rapid development of the Internet and the continuous improvement of browser technology, Web has become the main platform for users to obtain and publish information. However, with the increase of users' visits, Web servers are unable to keep up with the needs of users, resulting in service response. To solve this problem, Many new technologies have been proposed that, without changing the existing Web services architecture, caching is considered one of the most effective ways to increase the response speed of Web services. Therefore, it is of great significance to study the cache mechanism. This paper studies the cache mechanism in Web services from many aspects, combining with the multimedia conference system. The main work includes:. Firstly, we study the principle of static cache technology in Web service by combining the header fields related to cache in HTTP protocol, and realize the cache of static file in Web service. Then, by analyzing the mainstream cache replacement strategy and combining the characteristics of multimedia conference application data, we design and implement a cache system based on LRU cache replacement strategy. The system consists of four functional modules: cache controller, cache replacement policy module, cache listener and cache data storage module. In the cache replacement policy module, an improved replacement strategy based on LRU is implemented. Compared with the traditional replacement strategy, it can effectively improve the byte hit ratio of the cache system. In the cache data storage module, the cache data storage method based on the marking method is implemented, which can effectively improve the memory utilization and reduce the memory fragmentation. In order to improve the cache system response speed. Then, aiming at the problem that session sharing can not be realized among server clusters in distributed environment, this paper proposes a solution using Memcached caching technology. In addition, the database data cache is implemented by applying Memcached technology to Hibernate framework. Reduce the number of database visits, thereby improving access throughput and service response speed. Finally, we apply the cache mechanism studied in this paper to the multimedia conference system, and test the function of the system. The results show that the cache system designed in this paper has a high byte hit ratio. Memory utilization and fast response speed improve the performance of multimedia conference system.
【學(xué)位授予單位】:北京郵電大學(xué)
【學(xué)位級別】:碩士
【學(xué)位授予年份】:2014
【分類號】:TP393.09;TP333
【參考文獻(xiàn)】
相關(guān)期刊論文 前8條
1 蔡志剛;閻潔;;基于緩存框架的Web緩存研究[J];電腦知識與技術(shù);2009年31期
2 楊雨露;薛鳳云;李文田;;一種高效的池式內(nèi)存管理器的設(shè)計(jì)[J];計(jì)算機(jī)光盤軟件與應(yīng)用;2013年03期
3 沈進(jìn),顧其威,尹渝;代理服務(wù)器的研究與實(shí)現(xiàn)[J];南京航空航天大學(xué)學(xué)報(bào);2000年06期
4 張彬;李自臣;;緩沖技術(shù)在JSP中的應(yīng)用[J];科技信息(學(xué)術(shù)研究);2007年15期
5 馬振萍;楊?yuàn)欐?;基于Web3.0的網(wǎng)絡(luò)信息交流模式[J];情報(bào)資料工作;2011年01期
6 顧麗紅;周濤;;Hibernate性能優(yōu)化研究[J];計(jì)算機(jī)工程與設(shè)計(jì);2008年07期
7 羅肖輝;;基于負(fù)載均衡的代理服務(wù)器集群研究與應(yīng)用[J];現(xiàn)代計(jì)算機(jī)(專業(yè)版);2013年22期
8 咸容禹;;四項(xiàng)技術(shù)助你快速訪問政府網(wǎng)[J];信息化建設(shè);2013年02期
,本文編號:1601837
本文鏈接:http://sikaile.net/guanlilunwen/ydhl/1601837.html
最近更新
教材專著