"Real time" communication – client/server

How would you implement an online chat application?
Which technology would you use?

--------

We are building something similar and have the following requirements

  1. People on the web should be able to use it
  2. No download of an application
  3. Broadcasting messages to all user (server to clients)
  4. Everyone should be able to use it
    1. People behind firewalls, proxies, NATs, …
    2. People with 1 of the current browsers
  5. Lightweight solution needed

 

We tested and verified different technology options like:

  • HTML+ Reverse AJAX
  • Silverlight 2: Duplex WCF over HTTP (Long polling HTTP connection under the hood or Comet-style)
  • Silverlight 4: Duplex WCF over TCP (is using net.tcp, socket connection under the hood)
  • Silverlight raw Sockets (maybe even using SocketsLight)
  • Silverlight UDP
  • HTML 5 web sockets

The signs for HTML 5 web sockets are not so good, even though the promise for the socket implementation sounds interesting!
But it seems that HTML 5 is not going to be ready before ~201X, X > 2 and not sure what that X is…
More here
http://blogs.techrepublic.com.com/programming-and-development/?p=718
http://www.webmonkey.com/blog/HTML_5_Won_t_Be_Ready_Until_2022DOT_Yes__2022DOT

 

We finally are using "Silverlight with Duplex WCF over TCP
And falling back to "Silverlight with Duplex WCF over HTTP” when we have a firewall or proxy in the middle that causes connection problems.

The main reason for going in that direction was:

  • Ease of development and productivity in coding with Silverlight and WCF
  • Developing against one API (WCF) and doing an easy fallback behind the scenes (10 lines of code!)
  • Performance is awesome by using TCP (see Tomasz post about that)
  • Testing Silverlight means testing 1 environment against testing different browsers, operating systems, JavaScript versions, OS versions, browser versions,....

 

PS
There is a new HTTP polling duplex mode added in Silverlight 4 RC, called “MultipleMessagesPerPoll”, makes this technology even more interesting

3 comments:

Unknown said...

Sounds to be an interesting application to code. But what about these points

- No download of an application: Silverlight runtime?? Are people already accustomed to do so like they do with Flash??

- Testing against 1 environment: Is this really that simple? Ok, you surely do not have the cross-browser compatibility problems as you may have with native JavaScript, although libs like jQuery (or GWT environment) really help you in overcoming these issues. But about cross-operating system I'm not that sure. Is the OSX, Linux implementation really the "same" as for Windows?? That's often my fear with these runtimes. It's true that you're building a "web application" but in the end you always again depend on the underlying runtime implementation for the OS the user is using or not??
Actually I don't have any experiences with Silverlight so far (other than simple examples), although I'd like to experiment with it since it sounds to be an interesting technology.

Peter Gfader said...

>>Are people already accustomed to do so like they do with Flash??

Yes, the Silverlight installation is a no-brainer and even no browser restart is required (sometimes ;-))

Its just a matter of time, when Silverlight is installed on every machine... more on http://riastats.com/

-------------

>>Testing against 1 environment: Is this really that simple?

At least MUCH simpler than to test diff. browsers.

-----

>>Is the OSX, Linux implementation really the "same" as for Windows??

Yes, (same API) that is the good thing about a plattform like .NET (Silverlight is a subset)
more here about supported browsers
http://www.microsoft.com/getsilverlight/Get-Started/Install/Default.aspx

radhika said...

Grate blog !!
Each and every topic are covered in this blog about client-server testing .
Thanks for sharing,keep updating

Post a Comment

Latest Posts

Popular Posts