Personally, I prefer Juggernaut (http://juggernaut.rubyforge.org/) for this. Sure, it's Flash, but it just seems like a bit less of a hack than long-polling.
Have you had any problems using this in production? My understanding with using Flash/Java is that all traffic has to be tunneled through port 80 to not interfere with proxy servers. Even then sometimes traffic that doesn't look like HTTP can be blocked. Has this been a problem for you?
I'm using it in production since last week, about 50,000 connections / day. For some reason it seems to stop/crash after 24-36hrs without leaving anything in the logs.
I'm a systems administrator for a medium sized company. Every single time there is a security hole in flash, computers get infected with a virus. I roll out updates as soon as they're available but with enough people going to enough sites, someone gets hit.
That aside, I also can't run flash on my iphone, or my blackberry.
Javascript on the other hand is supported nativity across the board.
The advantages/disadvantages listed on the juggernaut website seem fishy to me.
1) it's not hack
2) I don't know of js crashing your browser *more* then flash
3) Any browser that supports flash supports JS
4) You can use http over any port as well
With Comet you get the added benefit (which is small or large depending on your implementation) of http caching and you remove reliance on 3rd party libraries.
Looks like I just rewrote what was previously mentioned in the articles about juggernaut