views:

382

answers:

6

After seeing the Google Wave demos, I thought of incorporating "real-time" capabilities into my web application, where one user will be able to see text another user is typing in as it happens...

Besides the soft real-time capabilities built into .NET based on how the framework handles threads...

Is there anything else I would need? Is there any pattern or architectural reference for real-time web apps out there? Something I should read?

Thanks!

+1  A: 

Short of using a Java applet or similar, your HTML/JavaScript front-end will need to poll the server for relevant events and changes.

On the backend, there are a multitude of ways to implement a distributed event queue or similar to share between individual processes serving requests.

Aiden Bell
Why poll? What does AJAX say?
xtofl
AJAX *is* polling. :)
Vilx-
I was indicating that the browser can't just be magically informed of server-side events. It has to ask.
Aiden Bell
How is your Java applet idea any different than Silverlight, other then he was asking for a .Net solution?
Matthew Whited
"Short of using", I was trying to imply that it is less than ideal.
Aiden Bell
+2  A: 

You could try to use a full duplex channel with Silverlight. Similar to the Java applet idea except in .Net.

WCF + Silverlight

Matthew Whited
Oh no, not another "active control" thingy. I wish people would improve web "standards". And I don't accept flash as a standard. Silverlight just makes the putrid mix worse imho.
Aiden Bell
Unless you have a replacement standard you wish to propose you might try sticking to constructive comments instead of just complaining
Matthew Whited
@Matthew - I was not levying criticism at your suggestion, just at the situation that bi-direction communication requires an embedded component as best solution. No offence intended.
Aiden Bell
Sorry about the back lash. I get your point about the standards. But at the same time we have taken a protocol that was originally designed for retriving static content and made one heck of an interactvie world. If we never change the underlaying platforms we may not get much futher. (Think RS-232 and IRQs)
Matthew Whited
@Matthew , and I agree and things are getting better with various new proposals in the standards. And business will always meet demands first. I suppose business pushes the pens of standards. Just makes for wild-west development sometimes :) I dread "new plugin x" being all the rage and making things worse.
Aiden Bell
Good news is Silverlight shouldn't make things worse. On the Windows side it may become one with the OS over time. And for OS-X and Linux Silverlight may be bringing better .Net support (backed by Microsoft and Novell)
Matthew Whited
I hope mono/moonlight can catch up.
Aiden Bell
I think part of the problem with mono is they are using different namespaces for similar features. This will cause losts of messing conditional code blocks if you try to make code that can be cross compiled.
Matthew Whited
A: 

Ajax,SUP and XMPP will help you in this regard. Also study how Twitter Search and Friendfeed works.

Varun Mahajan
A: 

Comet, although not always appropriate, in a sense it is "polling", although it only polls once at the beginning of a potentially long'ish job; the server then keeps the HTTP connection open until it is ready to respond.

As defined by Wikipedia: "In web development, Comet is a neologism to describe a web application model in which a long-held HTTP request allows a web server to push data to a browser, without the browser explicitly requesting it."

Found this to be useful for a job that may take the server five minutes to finish, instead of polling every x seconds, the client makes the request and the server essentially says "hang on..." and does it the work and returns the data when completed.

There are several libraries that support this type of Ajax implementation including Dojo (dojo.com) and ExtJS 3.0 (extjs.com).

Derp Developer
A: 

We have developed a operational transformation engine, the technology backend that powers Google Wave, and did simultaneous drawing and text editing demos available using DuplexChannel on Silverlight. You can download it from http://www.corvalius.com/blog/index.php/technology/announcing-the-availability-of-the-beweevee-sdk-september-ctp/ .

We plan to release the SDK (that it is in preview right now) completely free for non-commercial/academic purposes; so it may be of your interest to take a look. At least you will be able to find a very simple example of how to do full duplex for collaborative apps in source (small WCF server included).

Red Knight
+2  A: 

Check out WebSync. It's a .NET comet server that should do exactly what you need.

jvenema