开发者

Performance difference between using IIS Static Content Serving Vs Fetching data from SQL Server Jquery WCF

We have a portal developed in ASP .Net hosted in Windows 2008 IIS server accessed globally (extra-net) by over 200,000 people out of which 40% of them concurrent.

  1. part of the portal, we will need to show notifications specific to the user

    (there could be 50+ notifications daily, which will contain say 20 lines of presented content shown through HTML)

  2. portal should also have capability to search those notif开发者_如何学编程ications specific to the user.

  3. notifications can be received at the server as XML files.(either real time or scheduled way)

  4. we want to build this piece of architecture highly performant

  5. Let me know which one of the subject will meet the same.


Ah this reminds me of something I did in my previous startup Pageflakes. We had to push alerts, notifications to individual users and allow each user to mark them as read.

First, we thought of doing it the usual way. create a Notification table having a userID and the notification title and read flag. But that gets heavily fragmented over time and gets slower and slower and indexes need to be rebuilt etc as millions of notifications get added/updated/deleted.

So, we chose alternative. We added a Notification table which has a UserID, but it has a giant char column that holds an XML that has all the notifications user can see. Since you never need to search across users, one user will always look at the notifications of that user only. This means the Notification table can at worst have the same number of rows as the user table, never more. And we aren't adding/updating/deleting rows on this table frequently, thus no DB framentation, index rebuild etc issues.

You can try the same. Create a Notification table that has:

Notification:
=============
UserID int FK to user table
RecentNotifications  char(4000)
ArchivedNotifications char(4000)

On the RecentNotifications, you store the XML that has the notifications that needs to be shown to user. The ArchiveNotifications contains the archived messages that user can see when user goes to some Notification page.

You can use some xml to store it:

<notifications>
  <notification title="" datetime="" read="yes/no" />
</notifications>

Does this answer your question?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜