I'm trying to figure out how to achieve the following and it looks like it isnt possible. Could anyone tell me if there is way to make such thing with Infinispan?
I would like to use Infinispan in replicated mode so that all members of cluster would have the same information and access local copy for reads (zero latency) while applying any updates cluster wide. Information stored in cluster needs to be preserved between restarts and file store with preload=true does this job nicely. Now the question is what happens when node joins the cluster. There are 3 options:
1) Node has the same data as cluster
2) Node has older information than cluster
3) Node has newer information than cluster
2) and 3) easily happen because of random start/stop order of cluster members so this is reality (you have A, B, C; stop C to reconfigure it; A updates some info; C comes up; C has older information).
1) and 2) are easily covered by fetchInMemoryState=true or fetchPersistentState=true - new node just fetches state from cluster. However, in case of 3) newer version of data that node has read from its store is overwritten from the older data that cluster has.
Is there any kind of possibility of covering all 3 cases at once? Fetch newer data from cluster if cluster has newer data and update cluster from new node if node has newer data? I'm ok with implementing custom store or anything else if necessary.