Nichole
Nichole

Reputation: 219

How is data consistency handled in disturbed caching using Oracle coherence where each cluster node is responsible only for a piece of data?

How is data consistency handled in the distributed cache using Oracle coherence where each cluster node is responsible only for a piece of data?

I also have confusion about below

  1. Are cluster nodes on different servers and each has its own local cache? For instance say I have node A, with cache "a" and node B and with cache "b", is the database on a separate server D?

  2. When is an update, is update first made on D and written back to cache a and b, or how does data consistency work.

Explanation in laymen terms will be helpful as I am new to Oracle Cohernace

Thank you!

Upvotes: 1

Views: 363

Answers (1)

cpurdy
cpurdy

Reputation: 1236

Coherence uses two different distribution mechanisms: full replication and data partitioning; each distributed cache is configured to use one of these. Most caches in most large systems use the partitioned model, because they scale very well, adding storage with each server and maintaining very high performance even up to hundreds of servers.

The Coherence software architecture is service based; when Coherence starts, it first creates a local service for managing clustering, and that service communicates over the network to locate and then join (or create, if it is the first server running) the cluster.

If you have any partitioned caches, then those are managed by partitioned cache service(s). A partitioned cache service coordinates across the cluster to manage the entirety of the partitioned cache. It does this dynamically, starting by dividing the responsibilities of data management evenly across all of the storage enabled nodes. The data in the cache(s) is partitioned, which means "sliced up", so that some values will go to server 1, some values to server 2, etc. The data ownership model prevents any confusion about who owns what, so even if a message gets delayed on the network and ends up at the wrong server, no damage is done, and the system self-corrects. If a server dies, whatever data (slices) it was managing is backed up by one or more other server, and the servers work together to ensure that new back-ups are made for any data that does not have the desired number of backups. It is a dynamic system.

There are several different APIs provided to an application, starting with an API as simple as using a hash map (in fact it is the Java Map API).

Upvotes: 1

Related Questions