I would like to develop a real-time chat system in real time. Any suggestions on how to implement this using jQuery, any problems that you need to pay attention to, and what kind of comet I keep reading about?
Ideally, I would like to support about 5,000 simultaneous conversations.
The comet, also known as Ajax Push, is often referred to as "Reverse AJAX." Instead of receiving information from the server at regular intervals, data is sent from the server to the browser when necessary. This requires an open connection, for which there are several implementations.
I recommend you use APE . Here is a demo: http://www.ape-project.org/demos/1/ape-real-time-chat.html
- "push", , ( javascript) . , () TCP-, http-, . , , (, ), .
, .
tecnique - iframe, , .
, HTML5 websokets, ( , )
Node.js nowjs node.js. node.js JavaScript , nowjs - , - . , 12 .
Socket.io, node, , ( WebSockets, Flash Sockets, AJAX long polling, JSONP Polling Forever IFrames).
, PHP, ( ), node.js ( , , JS).