Hi,
is it really necessary to have real time data? Actually I mean, does the data gets updated every 3 seconds or less? If not you could, in your webservice, make use of the Cache object and have, you need SQL 2005 for this I believe, have SqlCacheDependency so that only when something in a table changes only then the Cache gets updated.
Grz, Kris.
|||The data are phone stats which are used to show calls received in an application.The application shows desks in a plan and is updated when a phone is ringing etc... This is why it needs to be in real time but I can't think of any better way to do this. The call events are stored in a table called CallRecords but I also have a snapshot table which the application uses. It selects all from this table which has the desk number, answered, missed and total calls columns which are incremented based on each event that comes through to CallRecords.|||Hi sichiu,
The accuracy of data and performance of the server are always a pair of conflicts.
You can for better performance, you can cache data and set an expire duration. However, that will cause data not being real time.
In this case, setting the expiration duration is very important.
Another way is that you can cache data locally, and use SqlDependency class to notify your app when the data is changed through SQL notification service. For more information, please check
http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqldependency.aspx
No comments:
Post a Comment