0

Users can do CRUD operations for web application mostly. But the situation is different for my specific web application. Users never do CUD. They can only Retrieve data.

So the picture:

1- There is a service updating database frequently (7-8 updates per second)(Scheduling framework is Quartz.Net)

2- Sql Server 2008 R2

3- Asp.Net MVC 4 ( The web users can only read data from Sql Server!)

Requirement: Web Users never get data from Sql Server!

Strategy A: (Code Name: The Host is Web App)

1- Calling service library from Asp.Net MVC, so we can update database and cache transactionally

2- Web users can read from cache

3- On App_Start we update cache data from sql server.

4- Time based application pool recycling is closed

Strategy B: (Code Name: Web Pipe)

1- Service runs as exe.

2- Service does not make Sql Update, it sends web requests to Asp.Net MVC Application.

3- So Asp.Net MVC application (Controller's Action) does update and cache transactionally

4- On App_Start we update cache data from sql server.

5- Time based application pool recycling is closed

For both scenerio the web users never get data from SqlServer. They always read data from cache. They always use object cache. The fastest cache for Asp.Net Mvc. There is no serialization overhead.

Oguz Karadenizli
  • 3,449
  • 6
  • 38
  • 73
  • How big is your DB going to be? Will the size increase over time? The definition of a cache is that the data you want _may_ be there, but it is never guaranteed. It means if it is not there, you need a fallback mechanism to fetch the data from the DB. If this is not OK with your requirement, then you are more likely looking for an in-memory DB instead of a cache. – yorah Oct 10 '12 at 10:05
  • 1
    You should also know that even though "Time based application pool recycling is closed", your app pool can recycle itself for [various reasons](http://blogs.msdn.com/b/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx) on which you may have no control. – yorah Oct 10 '12 at 10:17
  • The size of db will increase but necessary data (for reading) will not increase. I will update Db and Cache transactionally. I will fetch data from db only at AppStart. – Oguz Karadenizli Oct 10 '12 at 14:06

0 Answers0