tags:

views:

6420

answers:

10

I've been looking at ways to implement gmail-like messaging inside a browser, and arrived at the Comet concept. However, I haven't been able to find a good .NET implementation that allows me to do this within IIS (our application is written in ASP.NET 2.0).

The solutions I found (or could think of, for that matter) require leaving a running thread per user - so that it could return a response to him once he gets a message. This doesn't scale at all, of course.

So my question is - do you know of an ASP.NET implementation for Comet that works in a different way? Is that even possible with IIS?

+1  A: 

I think the Comet approach isn't really scalable unless you are prepared to expand the web farm horizontally (by adding more web servers to the mix). The way it works is that it leaves a TCP connection open per user session, just so the server can push stuff into that connection from time to time to immediately inform the user of a change or activity.

cruizer
Everything is only vertically scalable to a point, after which horizontal scaling has to take place.
Anton
+17  A: 

Comet is challenging to scale with IIS because of comet's persistent connectivity, but there is a team looking at Comet scenarios now. Also look at Aaron Lerch's blog as I believe he's done some early Comet work in ASP.NET.

Scott Hanselman
This is actually implemented; check out WebSync, per Anton's response below. (http://www.frozenmountain.com/websync/)
jvenema
A: 

There's a scalable COMET grid control available now:

http://www.codeproject.com/KB/aspnet/CometGrid.aspx

+2  A: 

you might also look at the http://www.kaazing.com/products/kaazingenterprisegateway which has made a production release of their webSocket [HTML5] gateway which supersedes the comet way completely and enables full-duplex connections between browsers & application servers.

you might also look at http://www.lightstreamer.com/demos.htm

Vikram
+2  A: 

Thanks Vikram for mentioning our solution.

I would like to add that Kaazing Enterprise Gateway also supports Silverlight, in case that is important. Besides that there are no requirements for what platform you use to develop your application - ASP.NET, HTML/JS, Flash, etc... If you need chat KEG (short for Kaazing Enterprise Gateway) comes with client-side XMPP protocol support so that you can use any XMPP-based server on the backend. We have a tutorial that explains how to get going with chat among other cool things :)

Cheers, Jonas

Btw, forgot to say that scalability is not a problem for us ;)
+14  A: 

WebSync is a standards-compliant scalable Comet server for IIS using .NET. It's also available on demand as a hosted service.

A simple $400 Acer desktop is capable of hosting at least 30,000 concurrent users on a single channel generating over 30,000 messages per second. It can be expected that bigger machines would give much higher numbers. Clustering servers together yields a near-linear increase in performance.

Right now, it includes a cross-browser JavaScript client and a .NET client, with partial support for PHP.

Anton
there should be a disclaimer here, as its your product ...
Sam Saffron
Sure, it's produced by the company I work for :) Definitely not trying to hide anything.
Anton
A: 

I once used a chat site long ago that utilized a custom built http streaming server. I actually reproduced that software at one point out of sheer curiosity, and it's easy enough to do, I think. I would never try to implement a similar type of "infinite request" in IIS, especially in ASP.NET, because the requests tie up a thread pool thread (or IO thread, if asynchronous handlers are used) indefinitely, which means you can only handle so much per server as your thread pool configuration allows.

If I had a strong legitimate need for such functionality, I'd honestly write a custom http server for it.

I know that doesn't really answer your question, but I thought the input might be relevant.

Chris
+1  A: 

Check out aspcomet.googlecode.com it does what you need

Neil Mosafi
+2  A: 

Actually there are many choice to create ajax supported website with ASP.NET but honestly, PokeIn is the proper way to create an ajax supported web site with server push feature. It has saved one of the projects of my company.

but the library is still under the beta statue and I'm very eager for incoming new releases.

BigbangO
A: 

I prefer PokeIn Comet Ajax Library

Zuuum