Blog dedicated to Oracle Applications (E-Business Suite) Technology; covers Apps Architecture, Administration and third party bolt-ons to Apps

Wednesday, September 26, 2007

Oracle Coherence

I attended an Oracle session on its product called Coherence.

Just as Oracle Application Server is Oracle’s answer to the application grid, Oracle Coherence is the answer to the data grid. Coherence is a reliable in memory data management system. It acts both as a broker between application demand and data supply as well as a distributed computing platform to perforformance

What makes Oracle Coherence unique is that it was designed for reliability or to withstand system faults and outages. Additionally, it was built to scale out as needed and handle load gracefully. It is the leading solution in the market both in terms of production applications deployed (over 1500) and size of grids (over 400 servers in a single data grid)




Oracle Coherence is a JCache-compliant in memory distributed data grid solution for clustered applications and application servers. Oracle Coherence makes sharing and managing data in a cluster as simple as on a single server. It accomplishes this by coordinating updates to the data using cluster-wide concurrency control, replicating and distributing data modifications across the cluster using the highest performing clustered protocol available, and delivering notifications of data modifications to any servers that request them.

Developers can easily take advantage of Oracle Coherence features using the standard Java collections API to access and modify data, and use the standard JavaBean event model to receive data change notifications. Functionality such as HTTP Session Management is available out-of-the-box for applications.

Here are some points on Oracle coherence:

What is Coherence ?
Cluster-based Data Management Solution for Applications
Or… Distributed Memory Data Management Solution (aka: Data Grid)

What is Coherence ? Its clustering:

Coherence Clustering is special… It means…
• Collection of processes (members) that work together
• All members have equal responsibility*
• for the health of the cluster
• No static/tight coupling of responsibilities to hardware
• No masters and workers/slaves
• No centralized registries of data or services
• No single points of failure
• No single points of bottleneck

What is Coherence? Data
Data in Coherence…
• Any serializable* Object
• No proprietary classes to extend**
• Fully native Java & .NET interoperability (soon C++)
• No byte-code instruction manipulation or weaving
• Not forced to use Relational Models, Object-Relational-Mapping, SQL etc
• Just real POJOs and PONOs (soon POCOs)
• Domain objects are fine!
*serialization = writing to binary form
** implementing specialized interfaces improves performance!

What is Coherence? Management Solution
Management Solution…
• Responsible for Clustering, Data and Service management,
including partitioning
• Ideally engineers should not have to…
• design, specify and code how partitioning occurs in a solution
• handle Remote Exceptions
• manage the Cluster, either manually or in code
• shutdown the system to add new resources or repartition
• use “consoles” to recover or scale a system.
• These are impediments to scaling cost effectively
• As #members → ∞, management cost should be C
• Ideally log(#members)
• Clustering technology should invisible in your solution!

What is Coherence? For Applications
It’s for Applications!
• Coherence doesn’t require a container / server
• A single library*
• No external / open source dependencies!
• Won’t cause JAR / classloader hell (cf: DLL hell)
• Can be embedded or run standalone
• Runs where Java SE / EE, .NET runs
• Won’t impose architectural patterns**
* May require addition libraries depending on features required.
EG: spring, web, hibernate, jta integration are bundled as separate libraries.
** Though we do make some suggestions ☺

Clustered Hello World…
public static void main(String[] args)
throws IOException {
NamedCache nc = CacheFactory.getCache(“test”);
nc.put(“message”, “Hello World”);
System.out.println(nc.get(“message”));
System.in.read(); //may throw exception
}
• Joins / Establishes a cluster
• Places an Entry (key, value) into the Cache “test” (notice no configuration)
• Retrieves the Entry from the Cache.
• Displays it.
• “read” at the end to keep the application (and Cluster) from terminating.

Clustered Hello World…
public static void main(String[] args) throws
IOException {
NamedCache nc = CacheFactory.getCache(“test”);
System.out.println(nc.get(“message”));
}
• Joins / Establishes a cluster
• Retrieves the Entry from the Cache.
• Displays it
• Start as many applications as you like… they all cluster the are able to
share the values in the cache

What Coherence isn’t!
• It’s not an in-memory-database
• Though it’s often used for transactional state and as a
transient system-of-record
• Used for eXtreme Transaction Processing
• You can however:
• do queries – in a parallel – but not restricted to relationalstyle
(it’s not a RDBMS)
• use SQL-like queries
• perform indexing (like a DB)
• do things like Stored Procedures
• establish real-time views (like Materialized Views).

What Coherence isn’t!
• It’s not a messaging system
• You can use Events and Listeners for data inserts, updates,
deletes
• You can use Agents to handle data changes
• You can use Filters to filter events
• It’s not “just” a Cache!
• Caches expire data!
• Customers actually turn expiry off!
• Why do they take that risk? Why do we let them?
• Data management is based on reliable clustering technology. It’s stable, reliable and highly available.

What is Coherence?
Dependable resilient scalable cluster technology
that
enables developers to effortlessly
cluster stateful applications
so they can
dynamically and reliably share data,
provide services and respond to events
to
scale-out solutions to meet business demand.

You can read more about it in the Coherence knowledge base wiki.

No comments: