We are developing an application which needs to get data from database frequently which type should we use?

Topics: Developer Forum, Project Management Forum, User Forum
Coordinator
Apr 23, 2009 at 8:12 AM
A question which was emailed to me: We are developing an application which needs to get data from database frequently. So for avoiding the DB calls frequently we are planning to use shared cache. Which topology would you advice. Please check my understandings are correct or wrong. That is if I used distributed caching topology, and one of the cache server is down, then the data will be lost. But by using this topology we can over come the 2gb limit of 32 bit os by using mutiple servers.

It doesn't mattter which type of caching you are using you will upon usage of caching avoid frequent calls to your database - depends on your usecase. In your case with 32bit systems you have the problem of max. amount of 2 GB (3 GB with fix). I don't know how much data you plan to store within your cache but if its more then 2 GB then you only be able to use distributed caching. Distributed caching is working like that:

total amount of cache = 2 GB (amount you configured within web.config) x amount of your servers

for the replicated caching its different:
relplicated caching = 2 GB (amount you configured within web.config) x 1

for more information about what you like to use please consult the startpage (http://sharedcache.codeplex.com/) or our cms (http://www.sharedcache.com) - checkout especially: result, benefit and limits.
Apr 24, 2009 at 9:25 AM
Dear Rony,

Thank you for your reply.

total amount of cache = 2 GB (amount you configured within web.config) x amount of your servers

for the replicated caching its different:
relplicated caching = 2 GB (amount you configured within web.config) x 1


In which config node we specify the total amount of cache. Is there any documentation that explaining the usage of each node in the configuration of server and client?

Thanks and Regards
Shihab

Coordinator
Apr 24, 2009 at 11:38 AM
Hi Shihab,

you configure each server. if we have 3 server and you define them like that:

Server A: CacheAmountOfObjects="200"
Server B: CacheAmountOfObjects="500"
Server C: CacheAmountOfObjects="100"

you get a total amount of 800 MB. Please let me notice this can but should not be configured like this. The client has no idea how much data each server can have - therefore i suggest you to give each server the same amount.

There is no such possibility to configure 800 MB as an overall configuration.

regards, roni
Apr 28, 2009 at 9:09 AM
Dear Roni,

Thank you for your reply.

I have some doubts regarding the configuration of client and server. Is there any documentation or link that explaining the usage of each node in the configuration of server and client?

Thanks and Regards
Shihab
Coordinator
Apr 28, 2009 at 10:14 AM
Hi Shihab,

did you try this: http://www.sharedcache.com/cms/shared_cache_config.aspx

regards,
roni
Jul 7, 2011 at 6:26 AM
Edited Jul 7, 2011 at 6:33 AM

If you want to decrease your expensive database trips then you surely need to implement distributed caching. Caching decreases you expensive database trips and it doesn't access the database every time. It first checks data from cache if not found in cache then it goes to the Database. Cache and database are synchronized so application would get updated data from cache. NCache is the best option for this because it fits your requirements. NCache uses different Caching Topologies (Mirrored Cache, Replicated Cache, Partitioned Cache, Partitioned-Replica Cache and Client Cache) for data distribution. I'd suggest you to go for NCache.

Reference: http://www.alachisoft.com/ncache/index.html

                     http://www.alachisoft.com//ncache/caching_topology.html

Coordinator
Jul 7, 2011 at 6:35 AM
Ncache is a commercial product, ergo you pay a lot of money. In the meanwhile microsoft offers it's own product, appfabric if you don't want use sharedcache.


Kind regards,
Roni Schuetz

Sent from mobile
Jul 7, 2011 at 10:45 AM
Edited Jul 7, 2011 at 11:27 AM

well you are right that AppFabric is free BUT it gives limited features. NCache provides more features than AppFabric. Again here is trade-off.

NCache also offers a free version(NCache Express) but with limited functionality like Microsoft is offering free AppFabric with limited functionality.

Coordinator
Jul 7, 2011 at 6:40 PM
I can give you access to the source code - the time you are evaluting products you probl. can fix the problem you have and share it with the community. this is the point of open source, right?
regards,
roni

On Thu, Jul 7, 2011 at 12:46 PM, camreon <notifications@codeplex.com> wrote:

From: camreon

well you are right that AppFabric is free BUT it gives limited features. NCache provides more features than AppFabric. Again here is trade-off.

NCache also offers a free version but with limited functionality like Microsoft is offering free AppFabric with limited functionality.

Read the full discussion online.

To add a post to this discussion, reply to this email (SharedCache@discussions.codeplex.com)

To start a new discussion for this project, email SharedCache@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com




--
Kind regards,
Roni Schuetz

speed up your .net app's - http://www.sharedcache.com/