-
1. Re: Why ClusteredCacheLoader?
brian.stansberry Sep 13, 2007 10:38 AM (in response to brucespringfield)Couple things come to mind; there may be others:
1) Avoid having to do an initial state transfer, which can be expensive if there's lots of state.
2) Avoid overhead of writing to a persistent store if you want to support recovering data that's been evicted. Note this is a less than perfect solution, as it's possible all nodes will evict the data, and thus it won't be recoverable. -
2. Re: Why ClusteredCacheLoader?
brucespringfield Sep 13, 2007 12:38 PM (in response to brucespringfield)"bstansberry@jboss.com" wrote:
2) Avoid overhead of writing to a persistent store if you want to support recovering data that's been evicted. Note this is a less than perfect solution, as it's possible all nodes will evict the data, and thus it won't be recoverable.
So, ClusteredCacheLoader calls to another cache won't cause that cache to load the data from persistent store if the data has been evicted? Unlike a replicated cache? -
3. Re: Why ClusteredCacheLoader?
brian.stansberry Sep 13, 2007 1:25 PM (in response to brucespringfield)You'd better test it, unless someone more intimately familiar responds.
If you had a chaining cache loader and one of the cache loaders in the chain was a regular cache loader, then logically the cluster-wide get from the ClusteredCacheLoader should trigger a load from the regular cache loader.
But the whole idea behind my #2 was saving overhead by not writing to a persistent store. So if you are writing to a persistent store, you're not getting that benefit. -
4. Re: Why ClusteredCacheLoader?
manik Sep 14, 2007 8:04 AM (in response to brucespringfield)A clustered cache loader, if unable to find the result, will cause the chaining cache loader to consult the next cache loader in the chain, and load from disk.
The benefit is *only* so that you don't need to rely on a state transfer to transfer initial state, but instead load this lazily using a CCL.
The other reason for using a CCL is if you don't want any replication at all - i.e., caches are configured as LOCAL, but use a shared database as a cache loader. This way, you could use a CCL as well to prevent overloading your shared DB.