2

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
    You may also want to re-title this as bi-directional communication with .Net or Full Duplex programming with .Net. You aren't really looking for real-time programming as much as the bi-directional comm. – Matthew Whited Jun 02 '09 at 14:38

7 Answers7

4

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

Jerod Venema
  • 44,124
  • 5
  • 66
  • 109
3

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

WCF + Silverlight

Matthew Whited
  • 22,160
  • 4
  • 52
  • 69
  • 2
    Unless you have a replacement standard you wish to propose you might try sticking to constructive comments instead of just complaining – Matthew Whited Jun 02 '09 at 16:52
  • @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 Jun 02 '09 at 17:33
  • 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 Jun 02 '09 at 18:12
  • @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 Jun 02 '09 at 18:20
  • 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 Jun 02 '09 at 19:13
  • I hope mono/moonlight can catch up. – Aiden Bell Jun 03 '09 at 01:35
  • 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 Jun 03 '09 at 13:52
1

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
  • 28,212
  • 4
  • 75
  • 119
0

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
  • 279
  • 2
  • 7
0

Since its a Web app, I'd suggest you to try etherpad!

There is a .NET Client example on HTTP API and a page on other examples

DL Narasimhan
  • 731
  • 9
  • 25
0

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

Varun Mahajan
  • 7,037
  • 15
  • 43
  • 65
0

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).

JohnK
  • 171
  • 1
  • 9