This link has been bookmarked by 161 people . It was first bookmarked on 26 Apr 2006, by Alexander Dodonov.
-
26 Aug 11
-
10 Jan 09
-
17 Jul 08
-
15 Jul 08
-
14 Jul 08
-
07 Jul 08
-
31 May 08
-
03 May 08
-
21 Mar 08
-
25 Feb 08
-
23 Feb 08
-
23 Jan 08
-
20 Jan 08
-
18 Dec 07
-
10 Dec 07
-
05 Dec 07
-
28 Nov 07
-
22 Nov 07
-
So how well will a server cope with 1000’s of open sockets? Obviously, the problem of the server having a thread allocated (for threaded servers) will have to be fixed, but assuming they are, and we learn the new models of how to deal with this, I’m wondering if servers will really be able to handle the sheer number of open sockets.
There’s definitely something to be said for stateless …
<script type="text/javascript"><!-- if(!mmcomments){var mmcomments=[];}mmcomments[mmcomments.length]="288"; //--></script> <!-- mmc mmid:288 mmdate:20060304151942 mmauthor:Pat --> - alex Says:
March 4th, 2006 at 3:37 pmPat: If your server is using a threaded network responder layer, you’re pretty effed. OSes will handle that many open (10K+) fd’s without any problem whatsoever, however the deamons that read/write from them often run into scalability issues. Select and poll are O(n) in these cases, and we really want something closer to O(1). Linux’s epoll and FreeBSD’s kqueue give this to us at a kernel IO level. Your web daemon has to take advantage of them, however.
This is where tools like Apache’s mpm\_event, Twisted Python, and POE come into play. They are event driven web daemons. That is to say that they don’t allocate an OS thread or process per connection. Instead, they deliver data asynchronously to waiting listeners on an event driven basis. These are the kinds of tools that let your server handle this kind of load without breaking a sweat. If, OTOH, you go with something like a traditional Apache+mod_whatever infrastructure, you’re just not going to scale.
Consider that your traditional web server is designed to take a request, satisfy it as fast as possible, and close the connection and you can easily see that they just aren’t optimized for this kind of workload. I expect that all of our tools will lurchingly come up to speed for use with things like Comet, but the transition isn’t going to be pretty for folks who don’t grok the problems (and the potential solutions).
Regards
-
From the perspective of network activity, we can modify JJG’s original Ajax diagram to illustrate how Comet differs:

As is illustrated above, Comet applications can deliver data to the client at any time, not only in response to user input. The data is delivered over a single, previously-opened connection. This approach reduces the latency for data delivery significantly.
-
-
10 Nov 07
-
08 Nov 07
-
01 Oct 07
Dan Connolly"long-lived HTTP connections instead of polling" but... "So how well will a server cope with 1000’s of open sockets?"
-
13 Sep 07
-
02 Aug 07
-
calling this style of event-driven, server-push data streaming “Comet”
-
use long-lived HTTP connections to reduce the latency with which messages are passed to the server
-
they do not poll the server occasionally. Instead the server has an open line of communication with which it can push data to the client
-

-
Comet applications can deliver data to the client at any time
-
The data is delivered over a single, previously-opened connection.
-
event driven on both sides of the HTTP connection.
-
Ajax improves single-user responsiveness. Comet improves application responsiveness for collaborative, multi-user applications and does it without the performance headaches associated with intermittent polling.
-
the patterns for event-driven IO on the server side are becoming better distributed
-
“Ajax” was coined to describe background request/response data transfer.
-
-
22 Jul 07
-
29 Jun 07
-
21 Jun 07
-
14 Jun 07
-
11 Jun 07
-
28 May 07
-
24 May 07
-
20 Apr 07
-
05 Apr 07
-
02 Apr 07
-
18 Mar 07
-
05 Mar 07
-
25 Feb 07
danWhile Comet is similar to Ajax in that it’s asynchronous, applications that implement the Comet style can communicate state changes with almost negligible latency. This makes it suitable for many types of monitoring and multi-user collaboration applicat
-
12 Feb 07
-
29 Nov 06
-
28 Nov 06
-
24 Nov 06
-
10 Nov 06
-
26 Oct 06
-
25 Oct 06
-
15 Oct 06
-
14 Oct 06
Luca Pallia collaborative database of Creative Commons licensed sounds
ajax web2.0 javascript development server technology performance streaming delicious
-
10 Oct 06
-
07 Oct 06
-
26 Sep 06
-
20 Sep 06
-
13 Sep 06
-
05 Sep 06
-
28 Aug 06
-
24 Aug 06
-
14 Aug 06
-
09 Aug 06
-
06 Aug 06
-
02 Aug 06
-
25 Jul 06
-
21 Jul 06
-
18 Jul 06
-
multipart/x-mixed-replace
-
-
13 Jul 06
-
17 Jun 06
-
07 Jun 06
-
04 Jun 06
-
01 Jun 06
Greg GannicottArticle about using Push (Comet) rather than Pull (Ajax) for communicating wth the server.
comet JavaScript web2.0 programming web ajax article development dom dhtml latency reference technology xmlhttprequest
-
23 May 06
-
20 May 06
-
17 May 06
-
29 Apr 06
The BudimanFundamentally, they all use long-lived HTTP connections to reduce the latency with which messages are passed to the server. In essence, they do not poll the server occasionally. Instead the server has an open line of communication with which it can push d
-
26 Apr 06
-
21 Apr 06
-
20 Apr 06
-
18 Apr 06
-
16 Apr 06
-
15 Apr 06
-
13 Apr 06
Aaron GustafsonAJAX's server-side sibling
Bookmarks comet ajax web scripting javascript programming webdev
-
11 Apr 06
Jonathan PetersonInteresting discussion of a server-pushed AJAX technique used by JotSpot live for shared web whiteboard and google for GAIM/GMAIL integration. See also pushlets.
-
05 Apr 06
-
29 Mar 06
-
27 Mar 06
-
-
As is illustrated above, Comet applications can deliver data to the client at any time, not only in response to user input. The data is delivered over a single, previously-opened connection. This approach reduces the latency for data delivery significantly. The architecture relies on a view of data which is event driven on both sides of the HTTP connection. Engineers familiar with SOA or message oriented middleware will find this diagram to be amazingly familiar. The only substantive change is that the endpoint is the browser. While Comet is similar to Ajax in that it’s asynchronous, applications that implement the Comet style can communicate state changes with almost negligible latency. This makes it suitable for many types of monitoring and multi-user collaboration applications which would otherwise be difficult or impossible to handle in a browser without plugins.
-
As is illustrated above, Comet applications can deliver data to the client at any time, not only in response to user input. The data is delivered over a single, previously-opened connection. This approach reduces the latency for data delivery significantly. The architecture relies on a view of data which is event driven on both sides of the HTTP connection. Engineers familiar with SOA or message oriented middleware will find this diagram to be amazingly familiar. The only substantive change is that the endpoint is the browser. While Comet is similar to Ajax in that it’s asynchronous, applications that implement the Comet style can communicate state changes with almost negligible latency. This makes it suitable for many types of monitoring and multi-user collaboration applications which would otherwise be difficult or impossible to handle in a browser without plugins.
-
-
25 Mar 06
-
21 Mar 06
David Corkingold technology... new platform (the web) and new tools => huge market impact
-
Dojo already supports Comet via dojo.io.bind(). More than a year ago we designed the API with Comet in mind. In the next couple of weeks I’ll be showing how bind’s pluggable transport layer can be combined with Dojo’s event topic mechanism to provide message delivery on top of a message bus....This is where tools like Apache’s mpm_event, Twisted Python, and POE come into play. They are event driven web daemons. That is to say that they don’t allocate an OS thread or process per connection. Instead, they deliver data asynchronously to waiting listeners on an event driven basis. These are the kinds of tools that let your server handle this kind of load without breaking a sweat.
-
-
16 Mar 06
-
10 Mar 06
-
09 Mar 06
-
08 Mar 06
Page Comments
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.