-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Caching in a cluster and the nonstrict-read-write strategy
PostPosted: Sun Oct 29, 2006 11:58 am 
Beginner
Beginner

Joined: Mon Apr 24, 2006 10:42 am
Posts: 23
Hi all,

I am working on adding clustering-support to our application, which is using osCache as the cache provider, and after reading the on-line docs, Hibernate in Action and searching the forum, I am still somewhat unclear about something. According to the documentation, read-write is not applicable when deployed in a cluster. On the other hand, nonstrict read-write evicts an entity from the cache upon update, and the osCache eventListener broadcasts this across the cluster, which seems exactly what I need. However this is what "Hibernate in Action" has to say about it:

Quote:
nonstrict-read-write—Makes no guarantee of consistency between the cache
and the database. If there is a possibility of concurrent access to the same
entity, you should configure a sufficiently short expiry timeout. Otherwise,
you may read stale data in the cache. Use this strategy if data rarely changes
(many hours, days or even a week) and a small likelihood of stale data isn’t
of critical concern. Hibernate invalidates the cached element if a modified
object is flushed, but this is an asynchronous operation, without any cache
locking or guarantee that the retrieved data is the latest version.


Could anyone provide an example for a scenario in which stale-data would be retrieved from the cache?

Is nonstrict-read-write suitable for implementing cache in a cluster?

Thanks,
Naaman


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.