CN103607423A - Distributed broadcast system based on WebSocket protocol - Google Patents
Distributed broadcast system based on WebSocket protocol Download PDFInfo
- Publication number
- CN103607423A CN103607423A CN201310503752.5A CN201310503752A CN103607423A CN 103607423 A CN103607423 A CN 103607423A CN 201310503752 A CN201310503752 A CN 201310503752A CN 103607423 A CN103607423 A CN 103607423A
- Authority
- CN
- China
- Prior art keywords
- websocket
- terminal
- server
- distribution server
- main control
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
The invention discloses a distributed broadcast system based on a WebSocket protocol. The distributed broadcast system comprises a main control server, a plurality of distributed servers and a plurality of mobile terminals and/or computer terminals. The main control server is in WebSocket connection with the distributed servers and is used for receiving data and distributing information; the distributed servers are connected with the main control server and the terminals and are used for transmitting and receiving information of the main control server and the terminals; and the terminals are in WebSocket connection with the distributed servers and are used for receiving broadcast information of the distributed servers and submitting requests of the terminals to the distributed servers through an HTTP protocol. According to the distributed broadcast system based on the WebSocket protocol, the pressure of a network can be greatly reduced, the service life of a network can be effectively increased, the response speed of the terminals can be improved, and reception of data of a PC client, a WEB terminal and a mobile terminal is supported.
Description
[technical field]
The present invention relates to network service, relate in particular to a kind of distributed broadcast system based on WebSocket agreement.
[background technology]
Fast development along with mobile mobile field, office software is not only used at pc client and WEB end, and also very abundant of the application of mobile terminal, in order better to improve user's experience, in the process of network interaction, the requirement of server is also increased thereupon.For terminal many, concurrent large, mutual frequent, data volume is large, real-time property and the high requirement of accuracy, traditional, single client can not satisfy the demands to the pattern of server end request msg; Traditional single network configuration has increased the complexity of enforcement and the maintenance in later stage, has improved cost, nor is convenient to the expansion of framework.
In the reciprocal process of terminal and server end, traditional settling mode is, adopt http protocol, the information of carrying out mutual, feature is exactly: simple, flexibly, without connecting, stateless, but this mode, can only realize terminal to server end and draw data, data can not be pushed to the operation of terminal from server end.In order to solve the problem of message push, also needing the technology of using is Socket, but for need to use the business that udp broadcast mechanism realizes time, still has certain limitation: the problems such as cross-network segment, high concurrent number, data volume are large are also following.
[summary of the invention]
The technical problem to be solved in the present invention is to provide a kind ofly can save bandwidth, transmission speed is high, security performance is good distributed broadcast system.
In order to solve the problems of the technologies described above, the technical solution used in the present invention is that a kind of distributed broadcast system based on WebSocket agreement, comprises main control server, plural platform distribution server, plural platform mobile terminal and/or terminal; Main control server is set up WebSocket with distribution server and is connected, and carries out the reception of data and the distribution of information; Distribution server connects main control server and terminal, is responsible for the transmitting-receiving of main control server and end message; Terminal is set up WebSocket with distribution server and is connected, and receives the broadcast message of distribution server, and to distribution server, submits the request of terminal to by http protocol.
The above-described distributed broadcast system based on WebSocket agreement, distribution server comprises WebSocket connection pool, for terminal, grows connection, distribution server, by the broadcast technology of WebSocket, is given connected terminal PUSH message; The state that distribution server monitor terminal connects, disconnects if connected, and just stops sending message to the connection disconnecting.
The distributed broadcast system that the present invention is based on WebSocket agreement has following beneficial effect:
It is few that 1.WebSocket connection takies resource, effectively reduces the resource anxiety of main control server and the defect of corresponding bottleneck.
2. the transmission data pressure of master control is shared to each distribution server, the consumption of having lowered Internet Transmission be connected concentrated pressure.Due to each distribution server again can be independent give out information, interference between each distribution server is dropped to minimum, the reliability and the fail safe that also improve whole system simultaneously.
3. distribute and dispose the entrance that has increased network, reduced the pressure of central access, effectively reduced network pressure, increased the life-span of network.
4. after setting up WebSocket and connecting, need to not shake hands separately, and the data that send do not comprise header packet information at every turn, accelerated the speed of the transmission of messages between each level.
[accompanying drawing explanation]
Below in conjunction with the drawings and specific embodiments, the present invention is further detailed explanation.
Fig. 1 is the theory diagram that the present invention is based on the distributed broadcast system embodiment of WebSocket agreement.
Fig. 2 is the schematic diagram that the present invention is based on the distributed broadcast system embodiment simulated scenario of WebSocket agreement.
[embodiment]
As shown in Figure 1, the distributed broadcast system based on WebSocket agreement comprises the main control server that connects by network, many distribution server, many mobile terminals and terminal.
Necessary software is installed on each server, and JDK, container (Tomcat, Jetty8.0 and more than), at main control server end, dispose controlling application program; On distributed server, dispose the service of corresponding primary control program, and be configured corresponding with main control server.Main control server by the pattern of WebSocket, is distributed to distributed server message, and distributed server, by the form of WebSocket, is distributed to mobile terminal and PC terminal.
Wherein, main control server is responsible for the control of program, the work such as distribution of the management of data, information.
Distribution server is responsible for the transmitting-receiving with main control server and end message, has played a connecting bridge beam action.
Terminal is responsible for receiving the broadcast of distribution server, submits the operation of terminal to.Distribution server both can independently be processed the affairs of various terminals, also can carry out alternately with other distribution server.
Main control server is set up WebSocket with each distribution server respectively and is connected, and carries out the reception of data.
Each distribution server has a WebSocket connection pool, for various terminals, grow connection, and by the broadcast technology of WebSocket, give each terminal PUSH message, can also monitor at any time the state of connection, if connected, disconnect, just receive and send message to this chain, can lower the WebSocket broadcast pressure of distribution server.
PC terminal or mobile terminal, only need to set up a WebSocket with distribution server and be connected, just can receiving broadcasting information.Terminal is by http protocol, completes mutual with distribution server.
Main control server of the present invention is disposed a set of management application, other distributed servers are disposed agent application, terminal has request, mutual prior to should being used as of proxy server, then proxy server sends request to host applications, and main control server is processed the request sending is unified, and upgrades data source, finally the data source of upgrading is sent to all distribution server agent application, then send to each terminal by agent application.
The invention belongs to the organizational structure of center-control, basic unit's broadcast, adopt the technology of WebSocket to carry out the communication between different frameworks, can significantly reduce the pressure of network, effectively increase network life, improve the response speed of terminal, and the reception of support pc client, WEB end and mobile terminal (IOS, Android, WP8) data.
As shown in Figure 2, a scene of embodiments of the invention 2 simulation electronic meetings illustrates the course of work of the present invention: the content of simulated scenario is, host's operating mobile terminal device A, carries out the page turning of PPT, operation is sent to each terminal of participating in electronic meeting.
Precondition in simulated scenario is: server is normally operation all, and main control server, terminal are all connected with distribution server.
1. mobile terminal A operation ppt carries out page turning, after page turning completes, sends a HTTP request, gives distributed server.
2. distributed server, by WebSocket passage, the information of user's request, is issued main control server.
3. main control server receives after information, carries out, after inter-process, the information exchange that broadcast being crossed to WebSocket passage, issues the distribution server in Beijing, Shanghai, Shenzhen.
4. distribution server receives after the broadcast of master control, and this message, by the broadcast mode of WebSocket passage, is issued to all terminals that connected, and finally each terminal receives after message, carries out the operation of page turning.
Because information is in mutual process, transmission speed is very fast, can reach the effect of real-time page turning.
The present invention has following beneficial effect:
1.WebSocket, unlike HTTP, needs to shake hands for 3 times at every turn, ability request message, and after having asked, link interruption, alternately, again shakes hands again, asks, interrupts if also need to continue.WebSocket only needs 1 once to shake hands, and just can send message, and keeps this link not interrupt, in each receipt sending, the gauge outfit information that does not comprise HTTP, so can reduce the time of request and the data volume of request, the present invention can significantly reduce mutual data volume and time.
2. can realize the broadcast of cross-network segment: no matter be that main control server arrives distribution server, or distribution server is to terminal, can carry out cross-network segment transmission of messages.Distribution server, can cross-network segment broadcast to the transmission information of terminal.Traditional broadcast mechanism adopts Socket mode, can only be to carry out information broadcast for some network segments, for example: can only send 192.168.1.1-192.168.1.254 to secondary network, send to this network segment of 192.168.2.1.If realize, cumbersome, incessantly to arrange hardware, and also higher to the performance requirement of hardware.
3. alleviate the pressure of server, and transmission is encrypted, guarantee that the Secure Web Socket of data is in the process of shaking hands, become to produce the key of a MD5, in the time of each interaction data, adopt this key to carry out Base64 encryption to data, so just prevent the deciphering after data are revealed, because key is preserved in both sides' hand again, can also prevent the WebSocket solicited message of personation.
4. support the data interaction (IOS, Android, WP8) of mobile terminal: if web end and server interaction can, in webpage, be called the WebSocket object of Js; WebSocket object and server interaction in the above version of pc customer end adopted Jetty8; Mobile terminal, for IOS or Android, adopts the third party WebSocket class libraries of increasing income, with server interaction; The mode of three kinds of above connections is as follows: with ws beginning, and to server request, for example, ws: // 192.168.1.34:8080/server/chart.do).
Claims (2)
1. the distributed broadcast system based on WebSocket agreement, is characterized in that, comprises main control server, plural platform distribution server, plural platform mobile terminal and/or terminal; Main control server is set up WebSocket with distribution server and is connected, and carries out the reception of data and the distribution of information; Distribution server connects main control server and terminal, is responsible for the transmitting-receiving of main control server and end message; Terminal is set up WebSocket with distribution server and is connected, and receives the broadcast message of distribution server, and to distribution server, submits the request of terminal to by http protocol.
2. the distributed broadcast system based on WebSocket agreement according to claim 1, it is characterized in that, distribution server comprises WebSocket connection pool, for terminal, grows connection, distribution server, by the broadcast technology of WebSocket, is given connected terminal PUSH message; The state that distribution server monitor terminal connects, disconnects if connected, and just stops sending message to the connection disconnecting.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310503752.5A CN103607423A (en) | 2013-10-23 | 2013-10-23 | Distributed broadcast system based on WebSocket protocol |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310503752.5A CN103607423A (en) | 2013-10-23 | 2013-10-23 | Distributed broadcast system based on WebSocket protocol |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103607423A true CN103607423A (en) | 2014-02-26 |
Family
ID=50125623
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310503752.5A Pending CN103607423A (en) | 2013-10-23 | 2013-10-23 | Distributed broadcast system based on WebSocket protocol |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103607423A (en) |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104980898A (en) * | 2014-04-04 | 2015-10-14 | 中兴通讯股份有限公司 | Information pushing method, system and equipment |
CN106209966A (en) * | 2016-06-15 | 2016-12-07 | 中国科学院信息工程研究所 | Management and control end updates the method for equipment state, the treating method and apparatus of service end |
CN107566492A (en) * | 2017-09-05 | 2018-01-09 | 珠海宇能云企科技有限公司 | A kind of implementation method of web terminal message push |
CN107888683A (en) * | 2017-11-10 | 2018-04-06 | 郑州云海信息技术有限公司 | A kind of client exchange method and device |
CN108289055A (en) * | 2018-01-05 | 2018-07-17 | 创盛视联数码科技(北京)有限公司 | A kind of distributed live chat system and method based on Redis subscription services |
CN108900575A (en) * | 2018-06-06 | 2018-11-27 | 深圳蓝贝科技有限公司 | Long connection hierarchical communication method and system based on mobile terminal |
CN109729115A (en) * | 2017-10-30 | 2019-05-07 | 北京临风云科技有限公司 | Realize method, apparatus, the proxy server, terminal device of distributed computing |
CN109769001A (en) * | 2019-03-19 | 2019-05-17 | 中信梧桐港供应链管理有限公司 | A kind of internet of things data transmission method and system |
CN112039899A (en) * | 2020-09-01 | 2020-12-04 | 深圳创维数字技术有限公司 | Virtual reality system control method, system and storage medium |
CN115378926A (en) * | 2022-08-16 | 2022-11-22 | 山东浪潮超高清智能科技有限公司 | Emergency broadcast pushing method under mobile terminal equipment |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101741696A (en) * | 2008-11-07 | 2010-06-16 | 中国测绘科学研究院 | Multi-user real-time cooperative system in distributed geographic information environment |
CN102045270A (en) * | 2010-11-30 | 2011-05-04 | 北京迅捷英翔网络科技有限公司 | Chat server system, method for constructing chat server system and chat system |
-
2013
- 2013-10-23 CN CN201310503752.5A patent/CN103607423A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101741696A (en) * | 2008-11-07 | 2010-06-16 | 中国测绘科学研究院 | Multi-user real-time cooperative system in distributed geographic information environment |
CN102045270A (en) * | 2010-11-30 | 2011-05-04 | 北京迅捷英翔网络科技有限公司 | Chat server system, method for constructing chat server system and chat system |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104980898A (en) * | 2014-04-04 | 2015-10-14 | 中兴通讯股份有限公司 | Information pushing method, system and equipment |
CN106209966A (en) * | 2016-06-15 | 2016-12-07 | 中国科学院信息工程研究所 | Management and control end updates the method for equipment state, the treating method and apparatus of service end |
CN107566492A (en) * | 2017-09-05 | 2018-01-09 | 珠海宇能云企科技有限公司 | A kind of implementation method of web terminal message push |
CN109729115A (en) * | 2017-10-30 | 2019-05-07 | 北京临风云科技有限公司 | Realize method, apparatus, the proxy server, terminal device of distributed computing |
CN109729115B (en) * | 2017-10-30 | 2023-03-21 | 张瑜 | Method, device, proxy server and terminal equipment for realizing distributed computation |
CN107888683A (en) * | 2017-11-10 | 2018-04-06 | 郑州云海信息技术有限公司 | A kind of client exchange method and device |
CN108289055A (en) * | 2018-01-05 | 2018-07-17 | 创盛视联数码科技(北京)有限公司 | A kind of distributed live chat system and method based on Redis subscription services |
CN108900575A (en) * | 2018-06-06 | 2018-11-27 | 深圳蓝贝科技有限公司 | Long connection hierarchical communication method and system based on mobile terminal |
CN108900575B (en) * | 2018-06-06 | 2021-07-20 | 深圳蓝贝科技有限公司 | Long connection hierarchical communication method and system based on mobile terminal |
CN109769001A (en) * | 2019-03-19 | 2019-05-17 | 中信梧桐港供应链管理有限公司 | A kind of internet of things data transmission method and system |
CN112039899A (en) * | 2020-09-01 | 2020-12-04 | 深圳创维数字技术有限公司 | Virtual reality system control method, system and storage medium |
CN115378926A (en) * | 2022-08-16 | 2022-11-22 | 山东浪潮超高清智能科技有限公司 | Emergency broadcast pushing method under mobile terminal equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103607423A (en) | Distributed broadcast system based on WebSocket protocol | |
CN104836821B (en) | A kind of network accelerating method based on router device, device and equipment | |
CN108270732B (en) | A kind of Streaming Media processing method and system | |
WO2023077952A1 (en) | Data processing method and system, related device, storage medium and product | |
CN102868728B (en) | Network proxy method based on virtual channel in virtual desktop infrastructure (VDI) environment | |
US10120673B2 (en) | Method and device for remotely updating application program | |
CN102761864A (en) | Data transmission method, system and device | |
CN108390881A (en) | A kind of distribution high concurrent real-time messages method for pushing and system | |
CN101883108B (en) | Document transmission method and system of dynamic authentication | |
CN102333065A (en) | Cloud interaction protocol design | |
JP2012160189A (en) | Method, system and storage medium for managing multiple queues of non-persistent messages in networked environment | |
CN107528891B (en) | Websocket-based automatic clustering method and system | |
CN108390950A (en) | A kind of information push method, device and equipment | |
CN109274747A (en) | Market gateway system and its processing method | |
CN112600926A (en) | Message pushing method and device and computer readable storage medium | |
CN107079057A (en) | Data transmission method, device, system, electronic equipment and computer program product | |
WO2017161757A1 (en) | Method and system for distributing streaming media file | |
CN104243610A (en) | Distributed file transmission service method | |
CN112416396A (en) | Application program updating method and system | |
CN105005500A (en) | Remote procedure calling method, server side and client | |
CN102594886B (en) | Method and device for direct communication between browsers, and communication system | |
CN106302699B (en) | Method for processing decryption tasks of PC (personal computer) ends of multiple decryptors | |
CN104378419A (en) | High-speed data push method and system | |
CN102891851A (en) | Access control method, equipment and system of virtual desktop | |
CN104486133B (en) | The method and system of network element proxy management |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20140226 |
|
RJ01 | Rejection of invention patent application after publication |