Using SqlCacheDependency to get real time updates? - ASP.NET

Posted by user102533 on Stack Overflow See other posts from Stack Overflow or by user102533
Published on 2010-01-09T14:01:02Z Indexed on 2010/04/01 4:03 UTC
Read the original article Hit count: 329

Filed under:
|
|
|

I would like to display real time updates on a web page (based on a status field in a database table that is altered by an external process). Based on my research, there are several ways of doing this.

  • Long Polling (Comet) - This seems to be complex to implement
  • Regular Polling - I can have an AJAX method trigger a database hit every 5seconds to get the current status. But I fear this will have performance issues.

Then I read about using SqlCacheDependency - basically the cache gets invalidated based on a field in the table. I am assuming I can use the event trigerred when the cache is invalidated to show the new update to the user?

What's an easy solution that will not have performance issues?

anyone?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about .NET