0

As title says, I will be developing an asp .net web-application all geared around displaying data. This data will change many many times through the day, so it's a matter of time before what the UI is displaying is expired.

What's the way around this problem? Polling? Timed 'refreshes'? Ajax? I want to avoid having to tell the user the only way to display upto date data is to hit refresh.

EDIT: I've just stumbled upon knockout framework - could this be a candidate for solving this problem? Can knockout detect changes from an sql database and reflect these accordingly on the UI?

  • definitely a candidate for Jquery/AJAX. – Furqan Hameedi Aug 16 '12 at 08:48
  • So will I run the functions to refresh the UI as defined by timers? –  Aug 16 '12 at 08:52
  • exactly, but not only this, you also need to think of some chaching mechanism on server side to cater if number of simultaneous users(opening your page) are expected to be greater. – Furqan Hameedi Aug 16 '12 at 08:55
  • Thanks a lot Furgan, I'm assuming such performance considerations are only necessary if the amount of users is quite substantial? –  Aug 16 '12 at 09:02
  • 1
    Take a look at these as well `http://www.lightstreamer.com/?gclid=CL-9vtvx67ECFYcLfAodi1kATw` , and `http://www.ape-project.org/` – Furqan Hameedi Aug 16 '12 at 10:01
  • These are amazing suggestions Furgan, I'll look into these definitely. –  Aug 16 '12 at 10:12

1 Answers1

2

Take a look at SignalR, it's a framework like socket.io for node.js (if you're familiar with that concept.) Essentially, it's a high level channel architecture for communicating in "real time" between the server and the client, in both directions. It uses web sockets, if possible, and fall backs to long polling ajax.

By using SignalR the server can simply tell all relevant clients whenever some data has changed

Onkelborg
  • 3,927
  • 1
  • 19
  • 22
  • Sounds very very interesting. I'll look into this now, thanks a lot. I wonder if it's difficult to implement? –  Aug 16 '12 at 09:07