"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


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


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

Latest Posts

Popular Posts