9 Coherence Adoption

This topic describes the Coherence adoption in the Oracle Banking Microservices Architecture products.

Coherence provides replicated and distributed (partitioned) data management and caching services on top of a reliable, highly scalable peer-to-peer clustering protocol.

Coherence includes network-level fault tolerance features and transparent soft re-start capability to enable servers to self-heal.

Pre-requisite

Before you proceed with the below, make sure cmc services are deployed in order.

Deployment of Plato coherence server

  1. Deploy the plato-coherence-server.
  2. One can change the min and max threads for distributed and proxy schemes for the coherence server by setting properties of "coherence.distributed.threads.max", "coherence.distributed.threads.min", "coherence.proxy.threads.min", "coherence.proxy.threads.min". This is optional and only needs to be done to fine tune performance after monitoring certain coherence metric.
    Property Value Description
    -Dtangosol.coherence.clusterport 7574 (default) The port on which the coherence server will start on

CMC service deployment

  1. Execute SQL scripts to insert data for COHERENCE_CACHE_KEY TABLE (Find the script in the attachment) in the CMC schema.
  2. Add the following properties in the PROPERTIES table.
    Key Value Description
    coherence.enabled true Through this flag, we can switch between normal implementation and coherence implementation of cmc-service.
    loadCacheOnStartUp false(default) Only if you want to load data on startup of CMC services then set this flag as true, else flag not needed.
  3. Add the following JVM params for cmc services:
    • -Dcoherence.server.port = (default value: 7574)
    • -Dcoherence.server.address = (address where your plato coherence server is deployed)
  4. Deploy the coherence-enabled cmc services.
  5. Hit the /loadData endpoint with applicationName, appId, and apiName(Optional) as parameters.

    Note:

    apiName is used to load data for a particular table only. For example: In the above image, apiName = corebranch will load data only for the corresponding table, in this case CMC_TM_CORE_BRANCH.
  6. Hit the /deleteData endpoint with applicationName, appId, and apiName(Optional) as parameters. This works same as /loadData just that it will delete data from cache.