Tuesday, October 07, 2008

LIVE Data Update (.Net)

What if you want to update data on webpage real time? The exisitng option is "PULL" where client polls server for updates and when retrieved it updates data on page. This works but issues
  1. There is a lag between data update and data refresh and this depends on delay between each refresh call.
  2. Unnecessary load on server and network even though there is no data update.
PUSH technolgy is around for ages but somehow it is not mapped to Web based applications. Reason being that Web is inherently server-client model. Client asks, server serves.
But the scenario is changing. HTML 5 is coming up with Web-Sockets and Server-Sent Events (http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html).

But what if you want to implement PUSH implementation now?
Well. you have couple of options:
1. COMET - Works but is not scalable as it relies on keeping a thread open on the server till client closes the connection. Not feasible for high volume websites.
2. http://www.themidnightcoders.com/weborb/dotnet/
3. http://www.lightstreamer.com/

Hope this helps you in your next project :)