partner webcast – oracle coherence applications on weblogic 12c grid - 21st nov 2013
DESCRIPTION
Oracle Coherence is the industry leading in-memory data grid solution that enables organizations to predictably scale mission-critical applications by providing fast access to frequently used data. As data volumes and customer expectations increase, driven by the “internet of things”, social, mobile, cloud and always-connected devices, so does the need to handle more data in real-time, offload over-burdened shared data services and provide availability guarantees. The latest release of Oracle Coherence 12c comes with great improvements in ease of use, integration and RASP (Reliability, Availability, Scalability, and Performance) areas. In addition it features an innovating approach to build and deploy Coherence Application as an integral part of typical JEE Enterprise Application. Coherence GAR archives and Coherence Managed Servers are now first-class citizens of all JEE applications and Oracle WebLogic domains respectively. That enables even easier development, deployment and management of complex multi-tier enterprise applications powered by data grid rich features. Oracle Coherence 12c makes your solution ready for the future of big data and always-on-line world. [Read More @ https://blogs.oracle.com/imc/entry/partner_webcast_oracle_coherence_applications]TRANSCRIPT
Oracle Coherence Applications on WLS 12c Grid
Lukasz Romaszewski
ISV Migration Consultant
ISV Migration Center Team
• Who we Are: team of senior technical consultants based in Eastern and
Central Europe and represents Oracle's technical investment for partners.
• Mission Statement : Enable partners to rapidly and successfully adopt and
implement Oracle latest technology
• How can we assist: We offer a wide range of free services for partners such
as one2one assistance, webinars, seminars and hands-on workshops.
ISV Migration Center blog: http://blogs.oracle.com/imc
Contacts:
Thanos Terentes Printzios, ISV Migration Center Manager, EE&CIS
Safe Harbor Statement
The following is intended to outline our general product direction. It is
intended for information purposes only, and may not be incorporated
into any contract. It is not a commitment to deliver any material,
code, or functionality, and should not be relied upon in making
purchasing decisions.
The development, release, and timing of any features or functionality
described for Oracle’s products remain at the sole discretion of
Oracle.
Agenda
• Introduction to Oracle Coherence
• What’s new in Coherence 12c?
• HotCache
• Live Events
• POF Annotations
• Managed Coherence Servers
• Coherence Applications (GARs)
• Live Demo
• Summary
• Q&A
Agenda
• Introduction to Oracle Coherence
• What’s new in Coherence 12c?
• HotCache
• Live Events
• POF Annotations
• Managed Coherence Servers
• Coherence Applications (GARs)
• Live Demo
• Summary
• Q&A
2000 - 2007 2008 - 2012 2013 +
Oracle Coherence Through 12c Market Leader and Pioneer Since 2001
Origins of Coherence Coherence 12c +
Coherence 3.5 – 3.7.1.1
Tangosol founded in 2000
Coherence 1.0 in 2001
Acquired by Oracle 2007
Deep integration with FMW & Exalogic
In-memory data grids grow in popularity
Broadening vertical adoption
Foundation for Mobile & Cloud Architectures
In-memory grids become strategic standards
Scale for the Internet of Things (IoT)
Cloud Application Foundation Out of the Box, Best of Breed, Pre-Integrated Cloud Infrastructure
Cloud Application Foundation
Virtual Assembly Builder
Oracle Traffic Director
WebLogic Server WebLogic &
Tuxedo
XA
WebLogic JMS Coherence
Java EE
Java SE
Coherence Clustered Caching Explained Partitioned, Fault Tolerant, Self-Healing Cache
• 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
X
?
Example Uses Coherence In-Memory Data Grid
• Caching
– Client applications request data objects and state from the Data Grid rather than backend data sources
• Analytics
– Client applications ask the Data Grid questions from simple queries to scenario modeling
• Compute
– Applications execute compute – business logic and transactions - across the Data Grid
• Events
– Applications take action based on events from the Data Grid
Coherence Grid Applications (GAR archives) Next generation of distributed caching solution
• New deployment artifact
• New container in WLS
• Fully managable with
• WebLogic Console
• WLST
• Command line tools
• Dramatically simplifies grid
applications management
• WEB-INF •web.xml
•...
WAR
• META-INF •ejb-jar.xml
•...
JAR
• META-INF •ra.xml
•...
RAR
• META-INF •coherence-application.xml
•...
GAR
Agenda
• Introduction to Oracle Coherence
• What’s new in Coherence 12c?
• HotCache
• Live Events
• POF Annotations
• Managed Coherence Servers
• Coherence Applications (GARs)
• Live Demo
• Summary
• Q&A
Coherence GoldenGate HotCache
• Solves the “stale cache” problem
• Applications updating DB outside Coherence
• Leverages existing technologies
• Golden Gate
• TopLink Grid
• Golden Gate detects changes, drives Cache updates through JPA/TopLink Grid
• No programming
• Broaden the applicability/usability of Coherence in enterprise applications
Database Synchronization
Live Events
• Provides information about Server-Side activities and
lifecycle
• Supports interception to observe and/or change server-side behavior
• One programming model for all events
• Data Related Events
• EntryProcessor Related Events
• Transfer Related Events
• Transaction Related Events
• Configuration Lifecycle Events (e.g. Managed Coherence Servers)
• More suitable for event driven architectures
• Declarative configuration
Converged server-side programming model
• Available since Coherence 3.7
• Less XML to write and maintain
• POF definition goes along with code
• Makes the configuration a lot easier
• Coherence 12c can automatically generate
POF config files based on
• POF annotations
• existing configuration files (templates)
• Ideal for Maven / Ant / CI builds
POF Annotations
In-line configuration
Managed Coherence Servers
• Traditional Deployment & Management Approach
• Coherence applications as a jar incorporated into a JSE/JEE
application
• Two roles within a Coherence application:
• Servers – hold cache data and perform server processing
• Clients – do not hold data but perform data operations
• Servers usually started by running a Java class (DefaultCacheServer)
• Challenges with this approach • Separate lifecycle of cache servers (custom shell scripts/utilities)
• Development, deployment and management of these type of
applications more difficult
• No “standard” way to deploy/manage Coherence across different
platforms and environments
• Every customer has no option but to re-invent the wheel
<caching-scheme-mapping>
<cache-mapping>
<cache-name>dist-*</cache-name>
<scheme-name>example-distributed</scheme-name>
<init-params>
<init-param>
<param-name>back-size-limit</param-name>
<param-value>8MB</param-value>
</init-param>
</init-params>
</cache-mapping>
<cache-mapping>
<cache-name>near-*</cache-name>
<scheme-name>example-near</scheme-name>
<init-params>
<init-param>
<param-name>back-size-limit</param-name>
<param-value>8MB</param-value>
</init-param>
</init-params>
</cache-mapping>
<cache-mapping>
<cache-name>repl-*</cache-name>
<scheme-name>example-replicated</scheme-name>
</cache-mapping>
<cache-mapping>
<cache-name>opt-*</cache-name>
<coherence
xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"
xmlns="http://xmlns.oracle.com/coherence/coherence-
operational-config"
xsi:schemaLocation="http://xmlns.oracle.com/coheren
ce/coherence-operational-config coherence-
operational-config.xsd"
xml-override="/tangosol-coherence-
override.xml">
<cluster-config>
<multicast-listener>
<time-to-live system-
property="tangosol.coherence.ttl">4</time-to-live>
<join-timeout-milliseconds>3000</join-timeout-
milliseconds>
</multicast-listener>
</cluster-config>
<logging-config>
<severity-level system-
property="tangosol.coherence.log.level">5</severity-
level>
<character-limit system-
property="tangosol.coherence.log.limit">0</character-
limit>
</logging-config>
</coherence>
EAR
• Simplified and streamlined development and management environment
• Leverages WebLogic infrastructure
• Similar to EJB, JMS and JCA
• Management through Configuration Wizard,
WebLogic admin console, WLST, JMX, FMWC
• Deployment of Coherence applications (GARs)
• Node Manager for lifecycle management
• Coherence libraries on the system classpath
(no need to package in your application)
• Coherence remains available “standalone” including support for GARs
Managed Coherence Servers
Node Manager
Machine
Java EE/Coh
Server
Coherence
Server
Node Manager
Machine
Java EE/Coh
Server
Coherence
Server
Node Manager
Machine
Admin
Server
WebLogic Domain
Cluster
Cluster
Standalone Coherence Clusters
Create a Coherence Application (GAR) - Package GAR as separate artifact
- GAR can also be packaged in WebLogic EAR or as a shared library
- Include config files coherence-application.xml, coherence-cache-
config.xml, pof-config.xml
Establish Coherence Infrastructure - Coherence cluster general attributes – cluster port, name, etc
- Tiered topology (Application layer and Storage layer) via WLS Clusters
- Leverage Configuration Wizard, Console, WLST, FMWC
Deploy GAR into Coherence Infrastructure - Console, WLST, FMWC, webLogic.Deployer, ant
- Coherence services will be automatically started
Monitor Deployment and Cluster Infrastructure
Multiple Topologies Supported - Coherence-only, Coherence/Java EE, Storage-enabled/storage-
disabled, Coherence*Extend, Coherence*Web, etc.
Managed Coherence Servers - Use Case
Node Manager
Machine
Managed
Server
Node Manager
Machine
Managed
Server
Node Manager
Machine
Admin
Server
WebLogic Domain/ Managed Coherence
Servers
Cluster
Coherence
App
Coherence
App
Coherence Applications What is a Grid Archive (GAR)?
• A GAR file contains Coherence and dependent artifacts required for the operation of a Coherence application
• The structure of a GAR is as follows:
META-INF/MAINFEST.MF /coherence-application.xml /coherence-cache-config.xml /pof-config.xml
com/oracle/demo/Class1.class /Class2.class ....
lib/myjar.jar /myjar2.jar
GAR Deployment descriptor file
Cache configuration file
POF configuration file (optional)
Classes required by the Coherence
application such as entry processors,
POJO’s, aggregators, business logic.
Any supporting libraries (optional)
Pointer to POF
configuration file
• The GAR deployment descriptor, coherence-
application.xml contains the following:
<?xml version="1.0" encoding="ISO-8859-1"?>
<coherence-application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://xmlns.oracle.com/weblogic/coherence-application">
<cache-configuration-ref
override-property="cache-config/ExamplesGar">META-INF/example-cache-config.xml
</cache-configuration-ref>
<pof-configuration-ref>META-INF/pof-config.xml</pof-configuration-ref>
<application-lifecycle-listener>
<class-name>com.tangosol.examples.container.gar.LifecycleReactor</class-name>
</application-lifecycle-listener>
<configurable-cache-factory-config />
</coherence-application>
Pointer to cache
configuration file, with
optional override
property
Optional
implementation of
LifeCycleListener
for prę/post start
processing
Optional
implementation of
ConfigurableCache
Factory
Coherence Applications What is a Grid Archive (GAR)?
GAR Deployment Modes
• GAR modules can be deployed to a Managed Server in
number of ways to support Coherence based applications
MyApp.gar
Stand Alone – caches
are automatically isolated
Application.ear
MyApp.gar
MyApp2.gar WebApp.war
MyApp.gar
Embedded GAR - available
to war/jar files in EAR Deployed as shared library –
available to all WAR/EAR
WebEJB.jar
Application.ear
WebApp.war
WebEJB.jar
Example Deployment Architecture
• Best practice is to have a
storage-disabled client tier
• We can utilize the WebLogic
clustering capabilities to set this
in Coherence
• Example deployment example: • DataTier cluster is storage-enabled
• WebTier cluster is storage-disabled
• MyApp.gar deployed to DataTier
cluster
• MyWebApp.ear deployed to
WebCluster
Domain
WebLogic Cluster: DataTier (storage-enabled)
WebLogic Cluster: WebTier (storage-disabled)
MS1 MS2 MS3
MyApp.gar MyApp.gar MyApp.gar
MS4
MyApp.ear
MyApp.gar
WebAp.war
MS5
MyApp.ear
MyApp.gar
WebAp.war
MS6
MyApp.ear
MyApp.gar
WebAp.war
WebLogic Cluster
Coherence Cluster
Coherence Project Configuration
• GAR Support in 12.1.2
• Standalone Coherence Project
• Facets
• Library Management
Coherence Runtime Support
• Launch Configurations
• Run/Deploy/Debug from IDE
• Run as Managed Coherence Server
Cache Configuration Editor
• Rich Coherence descriptor editors
• Validation and Integrated F1 Help
Oracle Enterprise Pack for Eclipse (OEPE)
Agenda
• Introduction to Oracle Coherence
• What’s new in Coherence 12c?
• HotCache
• Live Events
• POF Annotations
• Managed Coherence Servers
• Coherence Applications (GARs)
• Live Demo
• Summary
• Q&A
DEMONSTRATION
Oracle Coherence 12c
Q&A
Lukasz Romaszewski
Oracle ISV Migration Center FMW Consultant
ISV Migration Center blog: http://blogs.oracle.com/imc