seminar...oracle wins coherence data grid uses caching applications request data from the data grid...

20
<Insert Picture Here> WebLogic Innovation WebLogic Innovation Seminar Seminar Coherence & WebLogic Server integration with Coherence (Active Cache) Duško Vukmanović FMW Principal Sales Consultant

Upload: others

Post on 15-Apr-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Seminar...Oracle WInS Coherence Data Grid Uses Caching Applications request data from the Data Grid rather than backend data sources Analytics Applications

<Insert Picture Here>WebLogic Innovation WebLogic Innovation SeminarSeminar

Coherence & WebLogic Server integration with Coherence (Active Cache)

Duško Vukmanović

FMW Principal Sales Consultant

Page 2: Seminar...Oracle WInS Coherence Data Grid Uses Caching Applications request data from the Data Grid rather than backend data sources Analytics Applications

OracleOracle WInSWInS

Agenda

• Coherence Overview

• WebLogic Server & Coherence

– Active Cache

– Coherence Management using WebLogic Console

• Summary & Benefits

2

• Summary & Benefits

Page 3: Seminar...Oracle WInS Coherence Data Grid Uses Caching Applications request data from the Data Grid rather than backend data sources Analytics Applications

OracleOracle WInSWInS

Fundamental ChallengesCluster Scale Out Issues

• Scaling state is difficult

– State is heavy and expensive

– State consistency is difficult to manage

– Sharing sessions between heterogeneous

application servers not possible

• Increased load on back-end systems

3

• Increased load on back-end systems

– Difficult to scale back-end systems

– Expensive to scale back-end systems

– Difficult to buffer back-end systems

from spiky traffic profile

• Data demand outpacing data supply

• Rate of growth outpacing ability to cost effectively scale

Page 4: Seminar...Oracle WInS Coherence Data Grid Uses Caching Applications request data from the Data Grid rather than backend data sources Analytics Applications

OracleOracle WInSWInS

Address Cluster Scale Out IssuesUse Coherence Data & Compute Grid

• Oracle Coherence brokers data

supply with data demand

• Provides a reliable data tier with

a single, consistent view of data

• Enables dynamic data capacity

4

• Enables dynamic data capacity including fault tolerance and load balancing

• Ensures that data capacity scales with processing capacity

Page 5: Seminar...Oracle WInS Coherence Data Grid Uses Caching Applications request data from the Data Grid rather than backend data sources Analytics Applications

OracleOracle WInSWInS

CoherenceData Grid Uses

Caching

Applications request data from the Data Grid rather than

backend data sources

Analytics

Applications ask the Data Grid questions from simple queries to

advanced scenario modeling

5

advanced scenario modeling

Transactions

Data Grid acts as a transactional System of Record, hosting

data and business logic

Events

Automated processing based on event

Page 6: Seminar...Oracle WInS Coherence Data Grid Uses Caching Applications request data from the Data Grid rather than backend data sources Analytics Applications

OracleOracle WInSWInS

How Does Coherence Work?

• Data load-balanced in-memory across a cluster of servers

• Data automatically and synchronously replicated to at least

one other server for continuous availability

• Single System Image: Logical view of all data on all servers

• Servers monitor the health of each other?

6

• Servers monitor the health of each other

• In the event a server fails or is unhealthy, other

servers cooperatively diagnose the state

• The healthy servers immediately assume the

responsibilities of the failed server

• Continuous Operation: No interruption of service

or loss of data due when a server fails

?

X

Page 7: Seminar...Oracle WInS Coherence Data Grid Uses Caching Applications request data from the Data Grid rather than backend data sources Analytics Applications

OracleOracle WInSWInS

CoherenceCharacteristics of the Cluster

• In Coherence…

– Members share responsibilities (health, services, data…)

– Completely Peer-to-Peer

– No Single Points of Bottleneck (SPOBs)

– No Single Points of Failure (SPOFs)

7

– Linearly scalable to hundreds of servers by design

• Servers form a full “mesh”

– No Masters / Slaves etc.

– Data Grid members work together as a team

– Designed for commodity switched infrastructures

– Scalable throughput up to the limit of the backplane

Page 8: Seminar...Oracle WInS Coherence Data Grid Uses Caching Applications request data from the Data Grid rather than backend data sources Analytics Applications

OracleOracle WInSWInS

CoherenceCache Topologies

•Coherence provides many Topologies for Data Management

Data Access Topologies

8

Management

•Local, Near, Replicated, Overview, Disk, Off-Heap, Extend (WAN), Extend (Clients)

Partitioned Topology

Page 9: Seminar...Oracle WInS Coherence Data Grid Uses Caching Applications request data from the Data Grid rather than backend data sources Analytics Applications

OracleOracle WInSWInS

CoherencePartitioned Cache Topology

• Synchronous Update

• Avoids potential Data Loss & Corruption

• Predictable Performance

• Backup Partitions are

Update Characteristics

• Membership changes (new members added or members leaving)

• Other members, in parallel, recover / repartition

Recovery Characteristics

• Each member has a portion of the complete data set

• Data spread and backed up across Members

• Transparent to developer

Partitioned Topology

9

• Backup Partitions are partitioned away from Primaries for resilience

• No engineering requirement to setup Primaries or Backups

• Automatically and Dynamically Managed

• No in-flight operations lost

• Some latencies (due to higher priority of recovery)

• Reliability, Availability, Scalability, Performance are the priority

• Degrade performance of some requests

• Transparent to developer

• Members have access to all data

• All Data locations are known – no lookup & no registry!

Page 10: Seminar...Oracle WInS Coherence Data Grid Uses Caching Applications request data from the Data Grid rather than backend data sources Analytics Applications

OracleOracle WInSWInS

CoherenceMore than Caching…

• Data Store Persistence

– Write-Through

– Write-Behind

• Event Listeners

• Parallel Querying

10

• Parallel Querying

• Continuous Querying

• Parallel Data Processing

– Invocations

– Triggers

Page 11: Seminar...Oracle WInS Coherence Data Grid Uses Caching Applications request data from the Data Grid rather than backend data sources Analytics Applications

OracleOracle WInSWInS

WebLogic Server & CoherenceWhat is ActiveCache?

• Integration of Coherence and WebLogic Server

• The whole is greater than sum of its parts!

– Coherence*Web SPI Support

– Coherence DI & Service +

11

– Coherence DI & Service

Aggregation

– Management and Monitoring

Page 12: Seminar...Oracle WInS Coherence Data Grid Uses Caching Applications request data from the Data Grid rather than backend data sources Analytics Applications

OracleOracle WInSWInS

WebLogic Server & CoherenceActiveCache Session State Management

What: Distributed HTTP Session Management

• Span Applications: Seamlessly share sessions between applications

• Span Heterogeneous Environments: Share sessions between WebLogic, OAS, WebSphere, JBoss

Handle Large Sessions:

12

• Handle Large Sessions: Store more information within the session

Why:

• Decouple session management from web container

• Handle more users without adding more application servers

• Restart/maintain applications/containers without loosing sessions

• Handle very large sessions efficiently

• Keep session data coherent under heavy load

Page 13: Seminar...Oracle WInS Coherence Data Grid Uses Caching Applications request data from the Data Grid rather than backend data sources Analytics Applications

OracleOracle WInSWInS

WebLogic Server & CoherenceActiveCache Deployment Models

• Session state maintained within app server process

• Default model for ease of demonstration and evaluation

• Not recommended for production deployments

In-Process

13

Out-of-Process• Two tiers – app server and cache server

• Session data storage is offloaded from the app server tier

• Each tier can be scaled independently

• Default recommendation due to flexibility

Page 14: Seminar...Oracle WInS Coherence Data Grid Uses Caching Applications request data from the Data Grid rather than backend data sources Analytics Applications

OracleOracle WInSWInS

WebLogic Server & CoherenceActiveCache Cluster Node Isolation

14

• All deployed applications in WLS Server instance will be part of one Coherence node

App-Server Scoped EAR Scoped WAR Scoped

• All deployed applications within each EAR will be part of one Coherence node

• Each deployed web applications will be its own Coherence node

Page 15: Seminar...Oracle WInS Coherence Data Grid Uses Caching Applications request data from the Data Grid rather than backend data sources Analytics Applications

OracleOracle WInSWInS

WebLogic Server & CoherenceActiveCache Dependency Injection

public class FooServlet extends

HttpServlet {

@Resource(mappedName=“CacheName”)

private NamedCache myNamedCache;

….

public void

service(HttpServletRequest

request, HttpServletResponse

<web-app><resource-ref><res-ref-name>store-dist</res-ref-name><res-type>com.tangosol.net.NamedCache</res-type><res-auth>Container</res-auth><mapped-name>myNamedCache</mapped-name></resource-ref></web-app>

15

request, HttpServletResponse

response) throws ..

{

//no need to instantiate

myNamedCache

Object value =

myNamedCache.get(request.getPar

ameter(“myKey”);

}

}

• Must deploy ActiveCache shared library

• Declare dependency on the shared library

• Declare all DI resource-entries

• Package coherence-cache-config.xml in modules classpath

Page 16: Seminar...Oracle WInS Coherence Data Grid Uses Caching Applications request data from the Data Grid rather than backend data sources Analytics Applications

OracleOracle WInSWInS

WebLogic Server & CoherenceActiveCache Manageability

• Coherence Clusters and Coherence Cache Servers

are topology constructs in WebLogic Domain

• WebLogic Tooling support

– Node Managed Cache Servers

– WLST Scripting of Active Cache mBeans

16

– WLST Scripting of Active Cache mBeans

Page 17: Seminar...Oracle WInS Coherence Data Grid Uses Caching Applications request data from the Data Grid rather than backend data sources Analytics Applications

OracleOracle WInSWInS

WebLogic Server & CoherenceActiveCache – Customizing Cache Servers

17

Page 18: Seminar...Oracle WInS Coherence Data Grid Uses Caching Applications request data from the Data Grid rather than backend data sources Analytics Applications

OracleOracle WInSWInS

WebLogic Server & CoherenceActiveCache – WLST Support

• WLST Scripting for Managing Clusters and Cache Servers

18

Page 19: Seminar...Oracle WInS Coherence Data Grid Uses Caching Applications request data from the Data Grid rather than backend data sources Analytics Applications

OracleOracle WInSWInS

WebLogic Server & CoherenceActiveCache Benefits

Decouple session management from web container

Handle more users without adding more application servers

19

Restart/maintain applications/containers without loosing sessions

Handle very large sessions efficiently

Manage & Monitor Coherence using WebLogic tools

Page 20: Seminar...Oracle WInS Coherence Data Grid Uses Caching Applications request data from the Data Grid rather than backend data sources Analytics Applications

OracleOracle WInSWInS

Questions

20