Design consideration for data retrieval : pooling vs SqlDependency and SqlCacheDependency

爱⌒轻易说出口 提交于 2020-01-06 04:05:14

问题


I am little confused in one of the design consideration. Following are my requirements:

  1. My web-application need to retrieve real time data through database.

  2. Every update in the data should be reflected back to user.

  3. A session can last for couple of hours

  4. Every user will have their personal data in the report (eg select * from user where User = ‘A1’;)

  5. There can be around 300-400 users at a time

  6. Data retrieval mechanism should be outside the main application (eg. Web services)

  7. Database is shared between my app and other apps

  8. I am using C#.

Now the following are the options I was considering:

  1. WCF web service: Every user will poll for the update for eg in every 5 sec make request to web service.

  2. Query Notification using SqlDependency and SqlCacheDependency: where every change in database will be notified to my web service and then my web service will notify every user (PS: additional mechanism to send data from my web service to my web app) http://www.codeproject.com/Articles/144344/Query-Notification-using-SqlDependency-and-SqlCach#heading0010

Aim is to minimize the load on database as much as possible. I really like the approach 1 because of its simplicity but not sure polling for so many user for very long time will have any performance issue?

来源:https://stackoverflow.com/questions/21833741/design-consideration-for-data-retrieval-pooling-vs-sqldependency-and-sqlcached

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!