Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Oracle Coherence Overview
Damien McAullay
Oracle Fusion Middleware
July 2014
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Coherence: Core Enterprise Challenges
 Scaling applications to support growth
 Offloading and protection of
shared services
 Delivery of information in real time
Batch
Processing
App
App
Coherence
In-Memory Data Grid
AppApp App
Middleware
2
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Modern Best Practice Caching Architecture
Pioneered By Coherence
First Generation Cache Solutions
Difficult to scale, complex to synchronize, limited capacity
Modern Best Practice Cache Solutions
Easy to Scale, Clustered, Synchronized, Advanced Capabilities
3
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Application Server with Coherence
• Offload session and application data
management from the app server tier
• Scale tiers independently
• Coherence*Web
• Decouple session management from web
container
• Handle more users without adding more
application servers
• Restart/maintain applications/containers
without losing sessions
• Handle very large sessions efficiently
Scale Session, Cache and Data Grid as Independent Architectural Tier
4
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Partitioned, Fault Tolerant, Self-Healing Cache
Coherence Clustered Caching Explained
• Cluster of nodes holding % of primary data locally
• Back-up of primary data is distributed across all other nodes
• Logical view of all data from any node
• All nodes verify health of each other
• In the event a node is unhealthy, other nodes diagnose state
• Unhealthy node isolated from cluster
• Remaining nodes redistribute primary and back-up responsibilities to healthy
nodes
?
5
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
In-Memory Data Grid
Data
Partitioned Caching
• Data load balanced across data grid.
• Data/processing scales linearly.
• Ownership responsibilities
partitioned.
• Access/update latency are constant.
• Best for large sets of frequently
updated data.
Unlimited Data and Processing Capacity
Applications
Process Process Process Process
Virtual Load Balancing
Coherence Cluster
6
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
In-Memory Data Grid
Data
Partitioned Fault Tolerance
• Backups stored on separate machine.
• Even distribution of backup
responsibilities.
• Configurable number of backup
copies.
• Once-and-only-once processing
guarantees.
Automatic fault tolerance management
Applications
Process Process Process Process
Virtual Load Balancing
Fault Tolerance Management
Coherence Cluster
7
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
In-Memory Data Grid
Replicated Caching
• Entire data set is replicated.
• Data is stored as native Java object
• Data access is immediate.
• Updates are replicated across grid.
• Best for small sets of static data.
Rapid Access to Reference Data
Process Process Process Process
Replication
Data
Applications
Coherence Cluster
8
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
In-Memory Data Grid
Data
Near Caching
• Recently used data is stored locally.
• Repeated access local and immediate.
• Automatically populated upon data
access.
• Automatic invalidation of updated
data.
• Scale tiers independently.
Rapid Data Access From Clients
Process Process Process Process
Virtual Load Balancing
Coherence Cluster
Application Application Application
9
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Clients, Proxies, and POF
• Java, .NET, C++, and REST Clients
• Client types
– Coherence*Extend (external to cluster)
– Compute Clients (Java cluster members)
– REST Clients
• Portable Object Format (POF)
– Highly compressed object format
• Stores data more efficiently on data grid
• Optimizes network usage
– Quick indexing to access individual fields
Optimized Native and REST Support
REST Client
POF
Cache
Java Client
CacheServerTier
Coherence Extend
.NET Client
C++ Client
Java Client
ProxyTier
POF
Objects
POF
Coherence Cluster
10
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Coherence Caching Patterns
• Cache Aside - Developer manages cache
– Check the cache before reading from data source
– Put data into cache after reading from data source
– Evict or update cache when updating data source
• Read Through/Write Through
– All data reads/writes occur through cache
– Cache miss causes load from data source
– Cache updates written synchronously to data source
• Write Behind
– All data writes occur through cache
– Updates to cache written asynchronously to the data source
DAO Cache
DAO Cache
Cache
DAO
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Parallel Processing
• Send processing to where the data
lives.
• Processing in parallel across grid.
– Query the Data Grid
– Continuous Query Cache
– Parallel Processing on the Data Grid
– Map/Reduce Aggregation
• Once-and-only-once guarantees.
• Processing scales with the grid.
Querying, Processing, Aggregating in the Data Grid
In-Memory Data Grid
Process Process Process Process
Coherence Cluster
Application
Processing
Unit
12
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Event Notifications
• Grid based event notification
– Java Bean Model, key and filter based
events
• Compliments scalable grid
processing
– Real-time data
• “Live Objects”
– Objects can respond to own state
changes
– State always recoverable
Support for Event Based Applications
In-Memory Data Grid
Process Process Process Process
Coherence Cluster
Application Application Application
13
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Memcached Adaptor
• Migrate from Memcached
• Use popular Memcached Clients
• Leverage Coherence benefits and
features
– Scalability, availability, and reliability
– Data source integration including
HotCache
– Security
• SASL PLAIN authentication mechanism using
Coherence JAAS Identity Asserter
• Integrates with the Coherence Proxy Security
framework for custom authorization.
Memcached
… Client
Cache
Memcached
Acceptor
Memcached
Ruby Client
POF Serializer
CacheServerProxyServer
Memcached
Java Client
Memcached
PHP Client
14
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
JCache (JSR-107) Support
The Standard API for Caching on the Java EE Platform
• JSR-107
– Oracle Co-Spec Lead
– Unanimously passed in 2014
• Full Support in Coherence
– Multiple Cache Topology support
– Interoperability with all Coherence clients
– Leverage Coherence features and benefits
• Server-side processing
• HotCache, Multi-Datacenter, etc.
15
Application
javax.cache.* API (JSR-107 JCache)
Coherence
Cache
Coherence Cluster
Coherence JSR-107 Adapter
Coherence API (NamedCache)
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
REST Security and Usability Improvements
• Secure SSL communications
– HTTP basic authentication, client-side
certificates
– Fine-grained authorization
• Query Enhancements
– “named queries”
– Limit query results
– Keyset Retrieval
• Pluggable Query Engines
Improved Client Integration
In-Memory Data Grid
Proxy Tier
Data Tier
16
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
• Detect and reflect database
changes in cache in real time
• Leverage existing technologies
– GoldenGate, TopLink Grid
• Broaden applicability/usability of
Coherence
• No code change
Coherence GoldenGate HotCache
Real Time Database Updates for Your Apps
AppApp App
Coherence
Batch
Process
GoldenGate HotCache
17
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Coherence Availability Options
• Synchronous and asynchronous
backups
• Asynchronous backups can
improve throughput 40-50%
• Tradeoff of availability and
consistency against
performance
Asynchronous Backup
Primary BackupClient
1
2 2
3
Asynchronous Backup
Primary BackupClient
1
3
2
4
Synchronous Backup
18
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Coherence Availability Options
• Multi-Level Backup
• Guaranteed backup in case of
simultaneous multi-machine failure
• Availability and consistency traded off
against performance
Multiple Backups
PrimaryClient Backup
Backup
Backup
Pre-12.1.2
PrimaryClient Backup Backup Backup
12.1.2
19
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Coherence Availability Options
• Node safe
• Machine safe
• Rack safe
• Site safe
Node, Machine, Site and Rack Safety Rack 2
Machine 5
P4’
P5
Machine 8
P2’
P8
Machine 7
P1’
P7
Machine 6
P3’
P6
MAN
Site 1
P1
P2’
Site 2
P2
P1’
Rack 1
Machine 1
P8’
P1
Machine 4
P5’
P4
Machine 3
P6’
P3
Machine 2
P7’
P2
20
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Managed Coherence Servers
• Combined WebLogic and Coherence
Infrastructure
– WebLogic Management Framework
– No Extra License Cost for Coherence Users
– Configuration Wizard, WebLogic admin
console, WLST, Node Manager
• Introduces the Grid Archive (GAR)
– Package and Deploy
• Coherence “standalone” includes
support for GARs
Administrative and Operational Efficiency WebLogic
Console
Enterprise
Manager
WebLogic
Scripting
Coherence Coherence
Coherence Coherence
Configure Deploy Start/Stop Monitor
WebLogic WebLogic
WebLogic Management Framework for Coherence
21
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Enterprise Manager 12c for Coherence
Coherence
JVM Diagnostics
Monitoring Across
Coherence Data Grids
SLAs for Composite
Java/Cache Applications
Coherence Configuration
Management
Provisioning
Coherence
Diagnostics
Images to MOS
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
• Controlled at business
services level
• Fine grained control for composite
services
• Only cache subset of final result of
composite service
• Requires no code change
• Service results cached using
xquery applied to requests
• Supports expiration policies
Service Result Caching improves response time, offloads services
Oracle Service Bus Checkbox Integration
23
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Join the Coherence Community
Visit us at: coherence.oracle.com
Oracle Coherence
Users
/OracleCoherence@OracleCoherence blogs.oracle.com/
OracleCoherence
/OracleCoherence
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 25

Coherence Overview - OFM Canberra July 2014

  • 1.
    Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Oracle Coherence Overview Damien McAullay Oracle Fusion Middleware July 2014
  • 2.
    Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Coherence: Core Enterprise Challenges  Scaling applications to support growth  Offloading and protection of shared services  Delivery of information in real time Batch Processing App App Coherence In-Memory Data Grid AppApp App Middleware 2
  • 3.
    Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Modern Best Practice Caching Architecture Pioneered By Coherence First Generation Cache Solutions Difficult to scale, complex to synchronize, limited capacity Modern Best Practice Cache Solutions Easy to Scale, Clustered, Synchronized, Advanced Capabilities 3
  • 4.
    Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Application Server with Coherence • Offload session and application data management from the app server tier • Scale tiers independently • Coherence*Web • Decouple session management from web container • Handle more users without adding more application servers • Restart/maintain applications/containers without losing sessions • Handle very large sessions efficiently Scale Session, Cache and Data Grid as Independent Architectural Tier 4
  • 5.
    Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Partitioned, Fault Tolerant, Self-Healing Cache Coherence Clustered Caching Explained • Cluster of nodes holding % of primary data locally • Back-up of primary data is distributed across all other nodes • Logical view of all data from any node • All nodes verify health of each other • In the event a node is unhealthy, other nodes diagnose state • Unhealthy node isolated from cluster • Remaining nodes redistribute primary and back-up responsibilities to healthy nodes ? 5
  • 6.
    Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | In-Memory Data Grid Data Partitioned Caching • Data load balanced across data grid. • Data/processing scales linearly. • Ownership responsibilities partitioned. • Access/update latency are constant. • Best for large sets of frequently updated data. Unlimited Data and Processing Capacity Applications Process Process Process Process Virtual Load Balancing Coherence Cluster 6
  • 7.
    Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | In-Memory Data Grid Data Partitioned Fault Tolerance • Backups stored on separate machine. • Even distribution of backup responsibilities. • Configurable number of backup copies. • Once-and-only-once processing guarantees. Automatic fault tolerance management Applications Process Process Process Process Virtual Load Balancing Fault Tolerance Management Coherence Cluster 7
  • 8.
    Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | In-Memory Data Grid Replicated Caching • Entire data set is replicated. • Data is stored as native Java object • Data access is immediate. • Updates are replicated across grid. • Best for small sets of static data. Rapid Access to Reference Data Process Process Process Process Replication Data Applications Coherence Cluster 8
  • 9.
    Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | In-Memory Data Grid Data Near Caching • Recently used data is stored locally. • Repeated access local and immediate. • Automatically populated upon data access. • Automatic invalidation of updated data. • Scale tiers independently. Rapid Data Access From Clients Process Process Process Process Virtual Load Balancing Coherence Cluster Application Application Application 9
  • 10.
    Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Clients, Proxies, and POF • Java, .NET, C++, and REST Clients • Client types – Coherence*Extend (external to cluster) – Compute Clients (Java cluster members) – REST Clients • Portable Object Format (POF) – Highly compressed object format • Stores data more efficiently on data grid • Optimizes network usage – Quick indexing to access individual fields Optimized Native and REST Support REST Client POF Cache Java Client CacheServerTier Coherence Extend .NET Client C++ Client Java Client ProxyTier POF Objects POF Coherence Cluster 10
  • 11.
    Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Coherence Caching Patterns • Cache Aside - Developer manages cache – Check the cache before reading from data source – Put data into cache after reading from data source – Evict or update cache when updating data source • Read Through/Write Through – All data reads/writes occur through cache – Cache miss causes load from data source – Cache updates written synchronously to data source • Write Behind – All data writes occur through cache – Updates to cache written asynchronously to the data source DAO Cache DAO Cache Cache DAO
  • 12.
    Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Parallel Processing • Send processing to where the data lives. • Processing in parallel across grid. – Query the Data Grid – Continuous Query Cache – Parallel Processing on the Data Grid – Map/Reduce Aggregation • Once-and-only-once guarantees. • Processing scales with the grid. Querying, Processing, Aggregating in the Data Grid In-Memory Data Grid Process Process Process Process Coherence Cluster Application Processing Unit 12
  • 13.
    Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Event Notifications • Grid based event notification – Java Bean Model, key and filter based events • Compliments scalable grid processing – Real-time data • “Live Objects” – Objects can respond to own state changes – State always recoverable Support for Event Based Applications In-Memory Data Grid Process Process Process Process Coherence Cluster Application Application Application 13
  • 14.
    Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Memcached Adaptor • Migrate from Memcached • Use popular Memcached Clients • Leverage Coherence benefits and features – Scalability, availability, and reliability – Data source integration including HotCache – Security • SASL PLAIN authentication mechanism using Coherence JAAS Identity Asserter • Integrates with the Coherence Proxy Security framework for custom authorization. Memcached … Client Cache Memcached Acceptor Memcached Ruby Client POF Serializer CacheServerProxyServer Memcached Java Client Memcached PHP Client 14
  • 15.
    Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | JCache (JSR-107) Support The Standard API for Caching on the Java EE Platform • JSR-107 – Oracle Co-Spec Lead – Unanimously passed in 2014 • Full Support in Coherence – Multiple Cache Topology support – Interoperability with all Coherence clients – Leverage Coherence features and benefits • Server-side processing • HotCache, Multi-Datacenter, etc. 15 Application javax.cache.* API (JSR-107 JCache) Coherence Cache Coherence Cluster Coherence JSR-107 Adapter Coherence API (NamedCache)
  • 16.
    Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | REST Security and Usability Improvements • Secure SSL communications – HTTP basic authentication, client-side certificates – Fine-grained authorization • Query Enhancements – “named queries” – Limit query results – Keyset Retrieval • Pluggable Query Engines Improved Client Integration In-Memory Data Grid Proxy Tier Data Tier 16
  • 17.
    Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | • Detect and reflect database changes in cache in real time • Leverage existing technologies – GoldenGate, TopLink Grid • Broaden applicability/usability of Coherence • No code change Coherence GoldenGate HotCache Real Time Database Updates for Your Apps AppApp App Coherence Batch Process GoldenGate HotCache 17
  • 18.
    Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Coherence Availability Options • Synchronous and asynchronous backups • Asynchronous backups can improve throughput 40-50% • Tradeoff of availability and consistency against performance Asynchronous Backup Primary BackupClient 1 2 2 3 Asynchronous Backup Primary BackupClient 1 3 2 4 Synchronous Backup 18
  • 19.
    Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Coherence Availability Options • Multi-Level Backup • Guaranteed backup in case of simultaneous multi-machine failure • Availability and consistency traded off against performance Multiple Backups PrimaryClient Backup Backup Backup Pre-12.1.2 PrimaryClient Backup Backup Backup 12.1.2 19
  • 20.
    Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Coherence Availability Options • Node safe • Machine safe • Rack safe • Site safe Node, Machine, Site and Rack Safety Rack 2 Machine 5 P4’ P5 Machine 8 P2’ P8 Machine 7 P1’ P7 Machine 6 P3’ P6 MAN Site 1 P1 P2’ Site 2 P2 P1’ Rack 1 Machine 1 P8’ P1 Machine 4 P5’ P4 Machine 3 P6’ P3 Machine 2 P7’ P2 20
  • 21.
    Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Managed Coherence Servers • Combined WebLogic and Coherence Infrastructure – WebLogic Management Framework – No Extra License Cost for Coherence Users – Configuration Wizard, WebLogic admin console, WLST, Node Manager • Introduces the Grid Archive (GAR) – Package and Deploy • Coherence “standalone” includes support for GARs Administrative and Operational Efficiency WebLogic Console Enterprise Manager WebLogic Scripting Coherence Coherence Coherence Coherence Configure Deploy Start/Stop Monitor WebLogic WebLogic WebLogic Management Framework for Coherence 21
  • 22.
    Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Enterprise Manager 12c for Coherence Coherence JVM Diagnostics Monitoring Across Coherence Data Grids SLAs for Composite Java/Cache Applications Coherence Configuration Management Provisioning Coherence Diagnostics Images to MOS
  • 23.
    Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | • Controlled at business services level • Fine grained control for composite services • Only cache subset of final result of composite service • Requires no code change • Service results cached using xquery applied to requests • Supports expiration policies Service Result Caching improves response time, offloads services Oracle Service Bus Checkbox Integration 23
  • 24.
    Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | Join the Coherence Community Visit us at: coherence.oracle.com Oracle Coherence Users /OracleCoherence@OracleCoherence blogs.oracle.com/ OracleCoherence /OracleCoherence
  • 25.
    Copyright © 2014,Oracle and/or its affiliates. All rights reserved. | 25