This post gives an overview of the features that are unique to JBoss Data Grid or are otherwise implemented in a different manner with Oracle Coherence. These features range from low level configuration options (e.g. single node locking) to programming models (e.g. batching).
This summary is based on the data sheets and documentation available for both JBoss Data Grid (6.0.1) and Oracle Coherence (3.7.1). If, in fact, Oracle Coherence supports one or more of these features please leave a comment with a link to the relevant documentation and this summary will be corrected.
|Map / Reduce Framework & Programming Model||Y||N|
|Asynchronous Configuration Options||Y||N|
|Operations with Versions||Y||N|
|Locking Configuration Options||Y||N|
|Server Hinting||Y||Y, Centralized|
|Data Affinity via Annotations||Y||N|
|Eviction with Activation & Passivation||Y||Y|
|Store as Binary||Y||Y|
|Per Invocation Flags||Y||N|
Map / Reduce Framework & Programming Model
JBoss Data Grid includes a map / reduce framework and programming model. It includes Mapper, Collector, Reducer, and Collator interfaces. While Oracle Coherence is capable of aggregating the results of distributed functions, it does not do so within the context of a map / reduce programming model.
JBoss Data Grid supports the memcached protocol. There are memcached clients available in a number of languages including, but not limited to, C / C++, PHP, Java, Python, Ruby, Perl, C# / .NET, Erlang, and Lua.
JBoss Data Grid includes an asynchronous API including asynchronous clear, get, put all, put, put if absent, remove and replace operations. These operations return a NotifyingFuture. In fact, a NotifyingFuture extends Future so that a listener (FutureListener) can be attached.
Asynchronous Configuration Options
JBoss Data Grid supports asynchronous configuration options including asynchronous communication, asynchronous execution, and replication queueing.
JBoss Data Grid supports invocation batching.
Operations with Versions
JBoss Data Grid supports operations with versions including remove with version and replace with version.
JBoss Data Grid supports the recovery of XA (distributed) transactions.
JBoss Data Grid supports full participation in JTA and XA (distributed) transactions. However, it supports the option for JTA synchronization as well . It can participate in an XA (distributed) transaction by registering itself as a Synchronization instead of an XA resource. This allows for the use of one-phase commit (1PC) rather than two-phase commit (2PC) using the last resource commit optimization (LRCO).
Locking Configuration Options
JBoss Data Grid supports locking configuration options including lock striping and single node locking. With lock striping, entries are locked with a fixed number of shared locks. With single node locking, a local or remote lock is acquired on the primary owner only.
JBoss Data Grid supports server hinting. When used with distributed data and multiple owners, server hinting ensures that owners are not on the same machine, rack, and / or site. With Oracle Coherence, the default partitioning strategy (autonomous) can be replaced with a centralized strategy that incorporates server hinting (Simple Partition Assignment Strategy).
JBoss Data Grid supports node affinity via the key affinity service. The key affinity service generates a key using a node’s address. It can be used to ensure that an entry is stored on a specific node.
Data Affinity via Annotations
JBoss Data Grid supports data affinity via the @Group annotation or the Grouper interface. The @Group annotation identifies the method that will return the group key. Objects with the same group key will be stored on the same node.
Eviction with Activation & Passivation
JBoss Data Grid supports eviction with activation and passivation. If an entry is evicted, it is removed from the data grid and it is written to the cache store. If an evicted entry is read, it is removed from the cache store and it is stored in the data grid.
Store as Binary
JBoss Data Grid supports storing entries as binary (byte arrays) instead of deserialized objects.
Per Invocation Flags
JBoss Data Grid supports per invocation flags that can be use to optimize operations. For example, put or remove operations can use flags to disable returning the previous value.
This post is the third in a series introducing the concepts of data grids and JBoss Data Grid itself.