节点文献

基于HTTP长连接的WEB实时通信技术的研究

The Research on WEB Real-time Communication Technology Based on HTTP Long Connection

【作者】 张琴

【导师】 刘勇国;

【作者基本信息】 电子科技大学 , 计算机软件与理论, 2014, 硕士

【摘要】 现阶段,WEB应用的形式越来越丰富,各种WEB应用层出不穷,实时WEB的应用也逐渐变得广泛,实时天气、股票行情、实时系统监控等,这些WEB实时应用的流行推动着实时通信技术的发展。从传统的轮询方式到Flash XMLSocekt,再到AJXA流行后的基于AJAX的长轮询方式,每种技术都在前者的基础上取得了进步,但是都或多或少存在一定不足。目前,最新的WEB实时通信技术是HTML5标准中的WebSocket,现阶段还处于草案时期,但是大多数厂商在各自的产品中已经开始支持它了。然而现在大多数实时通信解决方案都是对已有技术的简单运用,很难全面地解决现实环境中实时通信所遭遇的一些棘手问题。本论文的目的就是针对目前WEB实时应用中的不足,通过最新的WebSocket技术,结合现有的一些理论技术提出一种WEB实时通信的解决方案,旨在解决WEB实时通信中低网络吞吐率、低资源利用率、高延时等问题,并针对云计算环境下产生的高并发实时应用进行优化与改进。具体的研究过程为:首先提出了基于HTTP长连接的WEB实时通信模型,在模型中,通过WebSocket实现客户端与浏览器的持久连接,并且结合Comet解决浏览器兼容问题;其次分别对模型的客户端和服务器端进行相应设计,包括客户端浏览器支持的设计,服务器长连接管理的设计,连接复用与连接负载均衡的设计等;然后综合运用现有的理论基础和技术对模型进行初步的设计与实现;接着运用该模型实现一个支持高并发的实时网页聊天系统,以及实现云平台中系统状态监测的WEB端实时通信功能;最后对模型进行理论测试并进行分析,以及对实现的应用系统进行相应测试得出实验结果。本文提出的基于HTTP长连接的WEB实时通信模型,能够改善实时通信中常见的低网络吞吐率、高延时等问题,特别针对大规模实时通信提出了连接复用和负载均衡的处理,能够适应目前大规模实时通信系统的要求。通过验证,该实时通信技术方案可以满足高并发实时通信要求,能有效减少服务器资源的利用,提高用户体验。

【Abstract】 Now, the WEB application is becoming richer and richer and all kinds of application are appearing. Real-time WEB application such as real-time weather, stocks, real-time system monitoring also gradually becomes widespread. The population of the WEB real-time application contributes to the development of real-time communication technology. From the traditional way of polling to Flash XMLSocekt, then to long polling based on AJAX, each technology makes a breakthrough progress based on its former. But, all of them still have certain shortcomings more or less. At present, the latest WEB real-time communication technology is the WebSocket in HTML5 standard and it is still in the period of the draft, but most of the vendors have begun to support it in their respective products.But, the most of real-time communication solutions are simple use of the existing technology. It is difficult to fully solve the problems encountered in real-time communication in real environment. The purpose of this thesis is in allusion to the shortcomings of current WEB real-time application to raise a WEB real-time communication solution which is based on the latest WebSocket technology and the theory of some existing technology, aiming at solving problems such as low throughput, low resource utilization, high delay in real-time WEB communication. Also this thesis will make some optimization and improvement on the high concurrency real-time application caused by large-scale data in cloud computing environment. In the process of research, it gradually goes on through the combination of theory and practice.In this thesis, it firstly raises a WEB real-time communication model based on HTTP long connection in which we use WebSocket to implement long connection between a browser and a server. And we solve browsers’ compatibility problems through Comet. Secondly, it comes to design the client and the server partly, including the design of the WEB client browser support in real-time application, the design of connection management on servers, connection reuse, and the design of the link load balancing and so on. Thirdly, we carry on the preliminary design and implementation of the model by the integrated use of the existing theoretical foundation and technology. Then, we apply this model to implement a real-time WEB chat system which can support high concurrency, and realize the real-time communication function in monitoring system status on the cloud platform of WEB side. In the end, some theory test on the model and a corresponding test on the application system is been done to come to the conclusion by analyzing the result of the experiment.As a result, The WEB real-time communication model based on HTTP long connection, which can significantly improve the common problems in the real-time communication such as low network throughput, high delay. It especially proposes connection reuse and the processing of load balancing for large scale real-time communication, making it able to adapt to the requirement of large scale real-time communication system at present. Through the verification, the real-time communication technology solution can meet the needs of high concurrent communication under the cloud computing environment and effectively reduce the use of server resources, also improve the user’s experience.

  • 【分类号】TP393.09
  • 【被引频次】18
  • 【下载频次】262
节点文献中: