| With the rapid development of Internet technology the research of web real-time communication has become more and more popular. The main real-time communication models for web are Ajax polling, Comet and WebScoket. Ajax polling regularly sends request to get the fresh data from web server. Comet establishes HTTP long connection to push data from server to browser. WebSocket proposed by HTML5 is a new service push protocol, and realizes the full duplex communication between the browser and the server.At present, the mature service push technology mainly includes Pushlet, DWR, Flash XMLSocket and Java Applet. If we only use one of the above push technology, it will results in problems such as server resource overhead but concurrent page views decrease, poor stability of the system, the browser is not compatible because of the version problem, higher failure rate. The main causes of these problems is that the principle and application of the scene implementation of push technology are not same. If we can dynamically adjust push mode according to the actual situation and make full use of advantages of each push mode, the quality of push services will be improved.Consequently, this paper constructs a dynamic decision model and calculates decision value to adjust push mode according to the actual scene, and the advantage of that is that we can avoid the problem of using single push mode. The main research work of this paper is as follows:1. This paper analyses various existing services push technology and framework, and summed up the implementation principle and usage scenarios of push delivery; 2. This paper raises a dynamic prediction model based on entropy weight method and analytic hierarchy process method, which makes decision according to the actual situation of request, users and server rather than use the fixed mode to realize the information push. By doing so, it can improve the utilization efficiency of resources of the server, and reduce the response time of requests; 3. This paper presents a dynamic service push framework based on middleware, which use decision middleware to encapsulate comprehensive prediction model. Decision middleware provides decision cache, and improve the speed of decision making. Push server uses the thread pool technology which creates a certain number of threads before pushing task has arrived. Besides, it also improves the processing ability and the speed of the response.Finally, this paper verified the performance of the proposed dynamic push mechanism by simulation experiments compared with Ajax polling, long polling and DWR. We compared processing ability, the average response time, throughput and resource usage between the four kind of model. The experimental results show that the proposed dynamic server push mechanism can make full use of server resources, decrease the push failure rate and improve the system throughput but also push information real time. |