Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

implementing asp.net mvc chat full duplex

I want to create a Facebook/Gmail like chat me for my social network.

I'm looking for the best technique to achieve it. I found several libraries, but I do not know what the most appropriate

The prerequisites are:

  • framework c#
  • low bandwidth consumption
  • chat integrated into the site, if the user changes page, the connection should stay alive
  • Free library (not paid)
  • shared hosting, can not install nothing on web server
  • if possible take advantage webSocket for browsers that support it and fall back to flash or similar automatically if not supported
  • one to one chat
  • If possible I would avoid Silverlight (with full duplex wcf) and use HTML / jquery chat
  • compatible with all browsers

I found the following libraries, but many do not provide a c# implementation or need to install a COMET web server or need to install components on web server

  • http://pokein.com/
  • http://www.ape-project.org/ajax-push.html
  • http://code.google.com/p/jwebsocket/
  • http://www.igniterealtime.org/projects/openfire/
  • http://socket.io/

I believe that use a technique such as Reverse Ajax consume a lot of bandwidth, right? What is the best,free,documented and c# implemented libray with low consume of bandwith that you would use?

thanks

like image 613
Marco Casiraghi Avatar asked Jan 01 '11 19:01

Marco Casiraghi


1 Answers

Personally, until you have measures that you need things like comet, I would use basic JSON polling with things like throttling (so you slow down the polling on quiet rooms). And a very basic "nothing had changed" message. For an example, click the "chat" link above. It is simple and pragmatic...

Re keeping between pages; trickier especially if you don't want Silverlight. We use a few HTML 5 tricks there to avoid hammering the connections.

like image 117
Marc Gravell Avatar answered Sep 21 '22 12:09

Marc Gravell