5 ms·
This is a nice writeup that gives some good insight into what you're up against if you want to implement Comet today. It's a cool idea, but there's really noth
by jasonkester 17y ago
This is a nice writeup that gives some good insight into what you're up against if you want to implement Comet today. It's a cool idea, but there's really nothing out there that you can use to do it off the shelf. It's great that he's gone through and actually tested out a bunch of these candidate technologies under load, so the next guy will at least know what not to try.
I have faith that Comet will have its day eventually, but clearly it's not quite time. With the current crop of production quality web servers, handling 100k requests per second (polling) is a solved problem. Keeping 100k simultaneous connections alive (comet) is by no means solved. It'll be cool when it happens though.
- axod 17y ago>> "I have faith that Comet will have its day eventually, but clearly it's not quite time." ??? Many many big sites are already using comet, and have been for some years, so I'm not sure I understand your comments.
- jasonkester 17y agoCorrect. If you're Google, and can devote a team to build and maintain a webserver specifically designed to handle Comet, then you can use Comet. If you're small and need to use off-the-shelf tech to get your thing up and running quickly, you're still best off going with Polling today. A quick example would be to look at Thinkature vs. Twiddla. They had a team of two, one of which spent an entire year building a web server from the ground up so that they could use Comet. Twiddla only has me as a developer, and I'd rather spend my time improving the product, so we use Polling. One year later, Twiddla has a ~300ms lag between when you draw a line and when it appears on a remote screen, whereas Thinkature is out of business. I don't think it's that black and white of a tradeoff, but hopefully you see the thrust of what I'm saying. One day soon, there will be a mod_comet for Apache, or IIS 9 with Comet support built in. That will be the day it makes sense for small, lean teams to build a business around it.
- davidw 17y agoaxod is a team of one, and mibbit apparently uses "Comet".
- daleharvey 17y agoor you could not use general purpose web servers for edge cases, mochiweb for example is pretty great at handling comet requests. axod does mibbit by himself, we(hypernumbers) use comet and are a small team, meebo used comet from the start. there really isnt much of a barrier with comet, it was actually a hell of a lot easier than the flash sockets setup I implemented before it. * probably worth mentioning facebook used mochiweb for their chat (off the shelf), I do find it hard to believe the only lightweight webservers around are in erlang
- jasonkester 17y agoWouldn't you say that any application thinking of using Comet would by definition be an edge case? But yeah, I'd disagree that the barrier to Comet is low. The natural thing to compare it to is HTTP Polling, which has no barrier whatsoever beyond knowing about window.setInterval(); (is it correct to end a sentence containing code with a semicolon?:) Twiddla went from concept to launch in ten hours, largely because I didn't need to spend any time thinking about how to handle communications. The intention was to replace Polling with Comet at some point in the future, but you know what? It just isn't anywhere near as slow or problematic as I was expecting. Back to my original point, there are a lot of smart people (such as yourself) working on this problem. Before the year is out, I suspect that somebody will have a good, proven, out-of-the-box Comet server that you can simply drop your application onto. That's the day I'm waiting for.
- daleharvey 17y agoheh the point of all 3 of my comments is that there is a good, proven, out-of-the-box* comet server. mochiweb, I havent tested but I would imagine iserve and yaws handle themselves similarly well. * depending on your definition of out-of-the-box, mochiweb doesnt actually enforce any "protocol" for handling comet for you, those are application specific and reasonably trivial to code. * I also forgot about erlycomet, which is built on mochiweb, and is a straight out of the box comet server