Forum Stats

  • 3,815,831 Users
  • 2,259,097 Discussions


Issue with synching up coherence cache across servers

livehed Member Posts: 1
edited Sep 20, 2017 12:37PM in Coherence Support


I've a java web application(A) hosted on server X that subscribes to coherence cache exposed by another java application(B) hosted on server Y.
So ideally, at any point in time, cache in A and cache in B should be in sync.

In a situation, where A goes down for some reason(network error, server crash etc.), A will be restarted.
In the timespan when A is down, its possible that B cache could have some new updates.
So I want to make sure that A's cache is in sync with B's cache when its restarted.
What would be the best strategy to achieve this please?

Should A replicate its cache to a database(keys and values) on a continuous basis?
And when A goes down and is back up again, it can  check for the number of keys in its database.
If this count does not match with the count in B's cache, then it can repopulate its using B's cache?
Does this approach make sense?



  • Shyam Radhakrishnan-Oracle
    Shyam Radhakrishnan-Oracle Member Posts: 80
    edited Sep 20, 2017 12:37PM

    Can you please explain your scenario a bit more. In Coherence there is client as well as server. In your case the client should be A and the server should be B. Client does not store any data, it goes to server for any data. So your question of in sync etc does not matter. Coherence does have near caches and replicated caches etc, but it depends on your scenario. So I would suggest you explain what exactly is your scenario ans we can help, the solution that you are proposing seems really complicated and not suitable for Coherence use.

This discussion has been closed.