Ajax Long Voting Restrictions

So, friend and I are creating an AJAX web chat application with jQuery and PHP core. So far, we have used the standard break call procedure every two seconds or so to look for updates. However, I do not like this method, since it is not fast, and it is not "cost-effective" in that a lot of requests are sent to the server, even if the data is not returned.

One of our project supporters recommended that we study a technique known as COMET or, more specifically, Long Polling. However, having read about it in various articles and blog posts, I found that this is not all so practical when they are used with Apache servers. Most people seem to just say, “This is not a good idea,” but they don’t interfere with describing how many requests Apache can process at a time.

The whole purpose of PureChat is to provide people with a chat that looks great, runs fast and works on most servers. Thus, I suggest that about 96% of our users will use Apache rather than Lighttpd or Nginx, which are supposedly more suitable for a long survey.

Reaching point:

In your opinion, is it better to continue to use setInterval and re-request new data? Or is it better to go with Long Polling even though most users will use Apache? Also, is it possible to get a more concrete account of how many people can use chat before the Apache server rolls over and dies?

+3
source share
1 answer

, , WebSockets. socket.io - API , , WebSocket, , Flash, . API.

, . , , .

, . PHP ( Apache), - node.js, JavaScript api.

node.js , , . node.js . , , , ( Apaches). . , , Nginx, PHP . , () MySQL , MySQL. , , . , , , JavaScript (node.js), . , MySQL, , , .

, 50 . , 50 , , . 50 , , -. , . , , , .

+2

All Articles