Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Keeping Application Cache in synce Expand / Collapse
Author
Message
Posted Thursday, November 8, 2012 10:36 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Thursday, December 18, 2014 9:07 AM
Points: 429, Visits: 623
The current request is to have buckets of cache so when multiple people are looking at specific data statically we have a manager to tell the code that something within a bucket changed and to reload other people's screen. The idea here is to look at a smaller table so that we are not querying the larger tables to see when things change. This is extra overhead.
On a Save sproc now we have to update the sync manager when we save the record. Seems a bit wasteful to me. We will loose performance on the save and potentially get locks on that table. I don't see another avenue though. Has anyone done a project that I can pull off of on this?

Edit: This will not be a website. This is a windows form app that will probably support 20-40 concurrent users. I would think 40 would be max. The tables are heavy. Meaning that we could be looking at gigs of data. Better if I speak to the number of rows. The tables they want to know if the cache is in sync will have roughly a 4 million rows within a year of application start up. Here is a website I found that describes exactly what I am after
http://sqlserverperformance.idera.com/memory/forget-application-caching/
They go into the benefits and cons a bit, but no real context for data models.
The model that we are coming up with is similar to this
A Sync Manager table 
PK int sync Manager Id
Snyc Manager type smallint which is the entity within the bucket. So each entity will have there own ID
Owner ID uniqueidentifier (required datatype to match existing data structure) This is what it was opened from. Where in the tree it was opened to know the control level
TimeStamp - This will need to be updated whenever there is a change to know that something in cache is out of sync and needs to be refreshed

It is really managing two tables all the time. the OLTP table and the Sync table to make sure the cache is up to date
Hopefully this helps a bit
Post #1382623
Posted Friday, November 9, 2012 9:40 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Thursday, December 18, 2014 8:51 PM
Points: 7,140, Visits: 12,763
I suspect you're over engineering this a bit. A good cache manager will handle completely (or mostly facilitate) the monitoring and re-caching of data that has changed. In terms of .NET there are technological alignments with SQL Server. What's the application language?

__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Post #1383324
Posted Monday, November 12, 2012 10:02 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Thursday, December 18, 2014 9:07 AM
Points: 429, Visits: 623
The applications language is C#. This is not something we are rolling out internally. This is going to clients.
Post #1383759
Posted Monday, November 12, 2012 11:53 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Thursday, December 18, 2014 8:51 PM
Points: 7,140, Visits: 12,763
There are built-in caching frameworks from Microsoft for ASP.NET as well as Windows Forms that are mostly configuration-based. Depending on your requirements you may not have to write one lick of home-grown code to implement a robust caching solution, certainly nothing custom in the way of coding in data layer.

Caching in .NET Framework Applications (.NET Framework 4.5)


__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Post #1383806
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse