简体   繁体   中英

Creating a “Live” ASP.NET MVC Application

From either a high-level perspective, or a low level and very specific one, what is the best way to constantly poll a database for updates?

I would like to create a "live" application which, using ajax, displays the most current data. I have partial views which Ajax.ActionLink the correct data in, but only OnClick of that generated link.

Is using a trigger and some sort of application code the best way to do this? For example, a trigger on all tables, which sets some field as "changes have been made since last read"?

Or is it better to use a function to poll the database on an interval to check for changes (I for-see this possibly being taxing with all the constant chatter to the DB)?

Or is a combination of these 2 approaches best? Or is there something I am leaving out completely?

SignalR旨在解决这个问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM