2 Replies Latest reply on Jan 19, 2005 8:32 AM by Thomas Cherel

    CacheLoader and cached data invalidation in a cluster

    Thomas Cherel Novice

      I went through the CacheLoader documentation of JBossCache1.2.

      I was wondering if the following use case has been (or is being) considered: cache distributed in a cluster, each nodes configured with the same CacheLoader and backend storage. When an update is done in one of the node, the data is simply invalidated (evicted) in all the other nodes. If needed, it will be reloaded from the backend storage.

      I looked at the roadmap, and some of th items could apply to this use case, but I am not 100% sure.



        • 1. Re: CacheLoader and cached data invalidation in a cluster
          Bela Ban Master

          Yes, we have thought about it, but decided to go for updates rather than invalidation.

          If you have to send an invalidation message, why not simply add the modified data ?

          Is there a specific use case you have in mind ? If it is a valid use case, we can add it to the roadmap.

          • 2. Re: CacheLoader and cached data invalidation in a cluster
            Thomas Cherel Novice

            I guess I do not have a precise use case in mind, only some performance questions in certain configurations:

            1) In case where synchronous replication is required (I want all the node to always be in synch after an update), just sending an invalidation message might be faster (from an update completion point of view) than sending the replicated data.

            2) With invalidation, you can potentially save the update to the nodes for which the data was already invalidated and not yet reloaded.

            3) With TreeCacheAop, invalidation message or data replication might be fairly close in term of network traffic. But if I am not using TreeCacheAop, depending of the size of my objects, invalidation message should be much faster than the data replication.

            I think this is also a mechanism that can make sense with the notion of Cache hierarchy (as explained in the latest JBossCache 1.2 documentation), where is an update occurs in a cache at the top of the hierarchy, you might just want to invalidate the data from that cache on all node and let it be reconstructed from one of the underlying cache in the hierarchy (where that one might use state replication instead of invalidation).