1 of 1 people found this helpful
We essentially want a cache of Database entities, and want to invalidate these, when they change, without distributing the data across the cluster. We want very cheap put()s, which JBossCache can not really provide. Infinispan seems a good fit.
So we need to be able to
Insert current data (not do any invalidations) but put() invalidates? What is the method to make a local put() that does nothing over the network? A pointer to a document or the code would be helpful.
cache.getAdvancedCache().withFlags(Flag.CACHE_MODE_LOCAL, Flag.SKIP_REMOTE_LOOKUP).put(key, value);
We also want to use the new funky async methods to be able to handle errors asynchronously, currently we do log minitoring.
So we would call putAsync() or removeAsync() and handle Exceptions in a separate thread.
Where can I find details of Exceptions throw?
If one of the cluster members is offline for a while, we want to sent a durable message so that when it comes back it evict()s invalid entries.
This is for the wierd case when a JVM under really heavy load stops responing, GC sakes too long etc, but OS stays up and eventually JVM comes back and starts handling web requests with stale data since JBossCache has given up on it.
So we would like be able to determine the node that failed from the Exceptions, is that possible?
Hmm, sounds like you need to tune your JGroups failure detection to detect such lags and to make sure any messages are delivered. Have a read of FDVersusFD_SOCK.
With that one liner I think we are probably good to go, at least for a PoC.
We both FD vs FD_SOCK running in the JGroups stack and that works quite well.
But now you come to mention it, the problem in JBossCache is there is a trade off between failing fast enough to not hang the system and catching errors.
With these async methods that trade-off is no longer ther, we just let JGroups keep trying.
Thanx Manik for the prompt reply.