partner webcast - oracle coherence & weblogic server: close integration of application &...
DESCRIPTION
Oracle Coherence is the industry’s leading in-memory data grid solution that enables applications to predictably scale by providing fast, reliable and scalable access to frequently used data. The key to the linear scalability of Oracle Coherence is the partitioning of data across the nodes in the Data Grid. Oracle Coherence can be used with Oracle WebLogic Server applications to increase application performance, throughput and scalability. Managed Coherence Serversprovides tight integration between WebLogic Server and Coherence. [Read More @ https://blogs.oracle.com/imc/entry/oracle_coherence_weblogic_server]TRANSCRIPT
Stay Connected
BLOGS.ORACLE.COM/IMC
TWITTER.COM/ORACLEIMC
YOUTUBE.COM/ORACLEIMCTEAM
FACEBOOK.COM/ORACLEIMC
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Oracle Coherence and WebLogic Server: Close Integration of Application and Data Grid Tier
Emin Askerov FMW Technology Consultant ISV Migration Center July 24, 2014
Oracle Confidential – Internal/Restricted/Highly Restricted
Presented by
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Agenda
• Introducing Oracle Coherence 12c
• Managed Coherence Servers: Next generation integration
• Using Grid Archives (GAR): Simplifying Development and Deployment
• WebLogic Session Replication with Coherence*Web
• Solution Demos
• Summary & Q&A
4
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
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 remains at the sole discretion of Oracle.
5
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Agenda
• Introducing Oracle Coherence 12c
• Managed Coherence Servers: Next generation integration
• Using Grid Archives (GAR): Simplifying Development and Deployment
• WebLogic Session Replication with Coherence*Web
• Solution Demos
• Summary & Q&A
6
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Oracle Cloud Application Foundation
Oracle Weblogic Server 12c
Release 12.1.3
Oracle Coherence 12c
Release 12.1.3
Oracle Enterprise Manager 12c
Oracle Development Tools 12c
Deployment
Productivity & Management
Oracle Tuxedo 12c
Cloud Application Foundation
WebLogic Server
Application Services
Exalogic Private & Public IaaS
Coherence Tuxedo
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 7
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
8
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
App App App
Middleware
9
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 10
Oracle Coherence: Market Leader and Pioneer since 2001
2000-2006 2008-2012 2013-2014 2015+
2000
Tangosol Founded
Coherence 3.5 – 3.7 Broadening popularity, integration across FMW
2013 12cR1 12.1.2 Strategic part of CAF HotCache, Managed Servers
2014 Coherence launched as part of JCS
2011 3.7.1 Exalogic Integration
2014 12.1.3 JSR-107 ratified, led by Oracle + Coherence
2001
Coherence 1.0
2007
Acquired by Oracle
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
11
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
?
12
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
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
13
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
14
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
15
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
16
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
17
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
PO
F
Cache
Java Client
Cach
e S
erv
er
Tie
r
Coherence Extend
.NET Client
C++ Client
Java Client
Pro
xy T
ier
POF
Objects
PO
F
Coherence Cluster
18
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Agenda
• Introducing Oracle Coherence 12c
• Managed Coherence Servers: Next generation integration
• Using Grid Archives (GAR): Simplifying Development and Deployment
• WebLogic Session Replication with Coherence*Web
• Solution Demos
• Summary & Q&A
19
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
• Domain - group of instances and clusters under unified control
• Administration Server - central configuration controller for the domain
• Managed Server - Instance that hosts applications and required resources
• Cluster - group of managed servers to provide increased scalability and reliability
• Node Manager - per-machine process used to start, stop and auto-restart instances
WebLogic Manageability WebLogic Terminology
Node Manager
Machine
Managed Server
Managed Server
Node Manager
Machine
Managed Server
Managed Server
Cluster
Node Manager
Machine
Managed Server
Managed Server
Node Manager
Machine
Administration Server
Domain
20
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
• Configuration Wizard
– Create configurations from templates
– GUI and scripting support
– Automate domain creation and replication
• WebLogic Scripting Tool
– Automate management via Jython-based scripts
– Config, deploy, monitor, lifecycle
– “Record” console actions to script
– WLST script editor in OEPE
WebLogic Manageability Configuration Management, Automation
21 21
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Traditional Deployment Approach • Traditional Deployment & Management Approach
– Coherence applications have traditionally been deployed as a jar incorporated into a Java application such as a WAR/EAR or standalone Java application
– Typically there are usually two roles within a Coherence application:
• Servers – hold cache data and perform server processing
• Clients – do not hold data but perform data operations
– Servers are usually started by Running a Java class (DefaultCacheServer) using scripts specifying an array of JVM arguments to configure an instance
• Challenges with this approach
– The lifecycle of these artifacts are usually managed separately by custom shell scripts/utilities and not by WebLogic Server (WLS)
– This can make the 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/coherence/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
22
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
• Simplified and streamlined development and management environment
• Introduces the Grid Archive (GAR) – Follows the Java EE model
– Consolidates configuration into a single distributable entity
– Provides Application Isolation & Lifecycle Events
• 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
– Release and install Coherence libraries on the system classpath (no need to package in your application)
• Coherence remains available “standalone” including support for GARs
Managed Coherence Servers - Introduction
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/C Managed Coherence Servers
Cluster
Cluster
Standalone Coherence Clusters
23
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Managed Coherence Servers - Use Case • 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.
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
24
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Managed Coherence Servers - Benefits • Simplified Operations Management
– Configure, manage and deploy Coherence from the WebLogic Server administration console
– Manage Coherence resources centrally
– Automatic WKA generation based on domain servers
– Tight Maven integration
– Ability to carry out rolling Restarts
– Separates Operational Config from Cache Config
• Simplified development and deployment
– GAR manages all application build artifacts
– Simplified application deployment across entire data grid
– Based on industry standard Java EE
– Automatic application isolation
– OEPE tooling available
• Easier integration for WebLogic Server-based applications that leverage Coherence
– GAR’s deployed in an EAR automatically make Coherence resources available to WAR’s and EJB’s in the EAR
25
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Agenda
• Introducing Oracle Coherence 12c
• Managed Coherence Servers: Next generation integration
• Using Grid Archives (GAR): Simplifying Development and Deployment
• WebLogic Session Replication with Coherence*Web
• Solution Demos
• Summary & Q&A
26
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
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)
27
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Pointer to POF configuration file
What is a Grid Archive (GAR)? • 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 ConfigurableCacheFactory
28
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
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
29
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
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: – Data Tier cluster is storage-enabled
– Application Tier cluster is storage-disabled
– Proxy Tier cluster is storage-disabled
– MyApp.gar deployed to DataTier cluster
– WebApp.war deployed to App Tier Cluster
Domain
WebLogic Cluster: DataTier (storage-enabled)
MS1 MS2 MS3
MyApp.gar MyApp.gar MyApp.gar
Coherence Cluster
WebLogic Cluster: Application Tier (storage-disabled)
MS7
MyApp.ear
MyApp.gar
WebAp.war
MS8
MyApp.ear
MyApp.gar
WebAp.war
MS9
MyApp.ear
MyApp.gar
WebAp.war
WebLogic Cluster: Proxy Tier (storage-disabled)
MS4 MS5 MS6
MyApp.gar MyApp.gar MyApp.gar
30
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Agenda
• Introducing Oracle Coherence 12c
• Managed Coherence Servers: Next generation integration
• Using Grid Archives (GAR): Simplifying Development and Deployment
• WebLogic Session Replication with Coherence*Web
• Solution Demos
• Summary & Q&A
31
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
WebLogic Suite & Coherence*Web
• “Standard” WebLogic Server HTTP session replication
• “Optimized” HTTP session replication option with WebLogic Suite
32
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
• Web Tier – Servlet engines handle HTTP requests
– Sessions are replicated between Servlet engines according to defined “replication groups”
– Servlets use replica-aware stubs to look up EJBs in the Object Tier
– Primary/Replica pair are distributed according to defined “replication groups” and order of precedence rules
• Object Tier – Object Tier provides EJB container services, JCA
adapters, JDBC, LDAP or other connectivity
Standard Two-Tier WebLogic Cluster Typical Two-tier WebLogic HA Cluster Architecture
WebLogic Server
Sessions HTTP/JSP
WebLogic Server
JDBC EJB
33
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Example of Standard Cluster Topology
Web Tier Object Tier
RDBMS
WebLogic Server
Sessions HTTP/JSP
WebLogic Server
Sessions HTTP/JSP
WebLogic Server
Sessions HTTP/JSP
WebLogic Server
JDBC EJB
WebLogic Server
JDBC EJB
WebLogic Server
Sessions HTTP/JSP
34
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
WebLogic Server
HTTP/JSP
• Engine Tier • Engine Tier is “stateless”
• Optimized for request processing
• Engine Tier nodes may be added/removed with no impact on ongoing sessions
• Session Tier • Stand-alone (POJO) Coherence nodes
• Zero code change for applications that use standard WebLogic session replication or a plug-in solution from another vendor
• Sessions are shared between all Web-tier instances, even different applications
• Low memory/CPU overhead, fast startup
• Easily handles large sessions (10MB+)
• Optimized networking, serialization
«Optimized» Web Tier Dedicated session «grid» & session-less traffic processors
Coherence*Web
Sessions
35
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Optimized Web Tier Topology Separate traffic processing, session management
Engine Tier Session Tier
WebLogic Server
JDBC EJB
Coherence*Web
Sessions
Coherence*Web
Sessions
WebLogic Server
HTTP/JSP
WebLogic Server
HTTP/JSP
RDBMS
“Optimized” Web Tier
Object Tier
WebLogic Server
JDBC EJB
36
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Solution Demos
37
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Q&A
38
Emin Askerov Oracle ISV Migration Center Consultant [email protected] ISV Migration Center blog: http://blogs.oracle.com/imc ISV Migration Center email: [email protected]