Coherence Federated Caching Overview

Introduction Coherence clusters rely on the ability to enlist multiple servers connected by a reasonably reliable network. This allows strong cache consistency guarantees — in the absence of a catastrophic failure, one can reason about state in a Coherence cluster in a similar manner to how one reasons about state in a local memory space. […]

Caching in OSB 12c without Out-Of-Process Coherence Servers

Introduction One of the most popular use cases for Oracle Service Bus (OSB) is the mediation of synchronous service interactions. In this scenario, a client invokes the service through a proxy instead of the actual service endpoint, guaranteeing that the consumer is decoupled from the producer. This type of architecture allows producers to be changed […]

Memcached Adapter in Coherence 12.1.3

* Reposted with permission from Oracle Coherence Blog by Dave Felcey.   Overview Coherence 12c (12.1.3) adds support for Memcached clients to directly store data a in Coherence cluster using the Binary Memcached protocol. This post outlines how to configure the Coherence Memcached Adaptor and includes a simple PHP example to show how Memecached clients […]

Unable to See Coherence MBean in Enterprise Manager Configured for WebCenter Portal Content Presenter

Introduction After configuring Coherence Cache for WebCenter Portal Content Presenter customer was not able to see the Coherence MBeans in the Enterprise Manager. Futher investigation revealed that the issue was due to configuration in WebLogic Server. Main Article After configuring Coherence Cache for WebCenter Portal Content Presenter customer was not able to see the Coherence […]

Basic JVM Garbage Collection Tuning for Coherence

Because Coherence cache servers are built on top of Java, they must deal with the heap size limitations that arise from garbage collection (GC). This is often at odds with the intended use case for Coherence, which is to manage large amounts of data in memory. In order to fully utilize the available memory on […]

Coherence Monitoring Management in Oracle Enterprise Manager 12c – Part 1

Coherence monitoring can be challenging depending on the number of nodes and hosts. Users use Jconsole for getting a view of their Coherence applications. This is done by creating a JMX node that joins the cluster and thereby enabling monitoring. This is good to get current view. However if you are looking for metrics history […]

WebLogic Server 12.1.2 and Coherence 12.1.2: New Technical Whitepapers

Several new technical whitepapers on WebLogic Server 12.1.2 and Coherence 12.1.2 have recently been released. In case you missed them, this post provides links to some of the more interesting ones.  You’ll need to log into Oracle.com to download these.   Oracle WebLogic: 12.1.1 Business Overview – PDF download This whitepaper provides an overview of […]

Coherence 12.1.2 Released

In case you did not already know, Coherence version 12.1.2 was recently released.  This new version of Coherence offers a diverse of important new features.  As part of the release, the Coherence team has released a set of videos which provide an introduction to some of the new features.  Some of these videos are embedded […]

Bulk loading a Coherence cache from an Oracle Database

Recently, I’ve worked on a couple of projects that required pre-loading data from an Oracle Database table into an Oracle Coherence cache. There are many ways to accomplish this task, but what I’ve found to work well is to distribute the load processing to the Coherence grid itself. To do this, I use the Coherence Invocation Service. To get […]

Visualizing the Coherence Datagram Test

The graph above was generated from the output of the Coherence Datagram Test utility. The Coherence Datagram Test is a tool that sends and receives UDP packets between two ore more machines to evaluate the health and performance of the network between those machines. The above test was run for 100 secs on two server-class machines with […]

New Maven support in Coherence 12c

Coherence 12.1.2 was recently released, including the new Coherence Managed Servers and also Maven support.  You can read more about it here. You may also be interested in these two excellent video introductions/demonstrations from the Coherence team – both cover the new Maven support in Coherence.           All content listed on […]

Making Coherence play nice in your test environment

This issue has popped up a couple of times for me recently, so I thought I would do a quick post on it. When you are running a number of Fusion Middleware environments in the same IP subnet, as you … Continue reading

Using XA Transactions in Coherence-based Applications

While the costs of XA transactions are well known (e.g. increased data contention, higher latency, significant disk I/O for logging, availability challenges, etc.), in many cases they are the most attractive option for coordinating logical transactions across multiple resources.

 

There are a few common approaches when integrating Coherence into applications via the use of an application server’s transaction manager:

  1. Use of Coherence as a read-only cache, applying transactions to the underlying database (or any system of record) instead of the cache.
  2. Use of TransactionMap interface via the included resource adapter.
  3. Use of the new ACID transaction framework, introduced in Coherence 3.6.

Each of these may have significant drawbacks for certain workloads.

 

Using WKA in Large Coherence Clusters (Disabling Multicast)

Disabling hardware multicast (by configuring well-known addresses aka WKA) will place significant stress on the network. For messages that must be sent to multiple servers, rather than having a server send a single packet to the switch and having the switch broadcast that packet to the rest of the cluster, the server must send a packet to each of the other servers.

 

Using the Coherence ConcurrentMap Interface (Locking API)

For many developers using Coherence, the first place they look for concurrency control is the com.tangosol.util.ConcurrentMap interface (part of the NamedCache interface).

 

The ConcurrentMap interface includes methods for explicitly locking data. Despite the obvious appeal of a lock-based API, these methods should generally be avoided for a variety of reasons.

 

Using Queries with Coherence Write-Behind Caches

Applications that use write-behind caching and wish to query the logical entity set have the option of querying the NamedCache itself or querying the database.

 

Using Queries with Coherence Read-Through Caches

Applications that rely on partial caches of databases, and use read-through to maintain those caches, have some trade-offs if queries are required. Coherence does not support push-down queries, so queries will apply only to data that currently exists in the cache.

Using Bulk Operations with Coherence Off-Heap Storage

Some NamedCache methods (including clear(), entrySet(Filter), aggregate(Filter, …), invoke(Filter, …)) may generate large intermediate results. The size of these intermediate results may result in out-of-memory exceptions on cache servers, and in some cases on cache clients. This may be particularly problematic if out-of-memory exceptions occur on more than one server (since these operations may be cluster-wide) or if these exceptions cause additional memory use on the surviving servers as they take over partitions from the failed servers.

Coherence Data Guarantees for Data Reads – Basic Terminology

When integrating Coherence into applications, each application has its own set of requirements with respect to data integrity guarantees. Developers often describe these requirements using expressions like “avoiding dirty reads” or “making sure that updates are transactional”, but we often find that even in a small group of people, there may be a wide range of opinions as to what these terms mean. This may simply be due to a lack of familiarity, but given that Coherence sits at an intersection of several (mostly) unrelated fields, it may be a matter of conflicting vocabularies (e.g. “consistency” is similar but different in transaction processing versus multi-threaded programming).

Coherence Query Performance in Large Clusters

Large clusters (measured in terms of the number of storage-enabled members participating in the largest cache services) may introduce challenges when issuing queries. There is no particular cluster size threshold for this, rather a gradually increasing tendency for issues to arise.