Design consideration for data retrieval : pooling

2019-08-07 18:39发布

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?

0条回答
登录 后发表回答