Oracle Coherence Technical Overview
Ashok Aletty
1 CopyrightSr. © 2011, Director, Oracle and/or its affiliates. Product All rights reserved. Management | Oracle Cloud Application Foundation 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.
2 Copyright © 2011, Oracle and/or its affiliates. All rights reserved. reserved. Oracle Cloud Application Foundation Core Capabilities for Modern Cloud Infrastructure
Java Server Messaging
Transactions Framework Data Grid Modern Cloud Infrastructure XA
Traffic Virtualization Management
4 Copyright © 2011, Oracle and/or its affiliates. All rights reserved. You Can Roll Your Own …
Traffic Management
Framework
Java Server
Messaging
Data Grid • Complex • Hard to Maintain Virtualization • Unintegrated • Non Standard • Multiple Vendors • Mission Critical? • Multiple Consoles • Provisioning? • How Elastic? • Consistent Security?
5 Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Cloud Application Foundation Out of the Box, Best of Breed, Pre-Integrated Cloud Infrastructure
Oracle Traffic Director
WebLogic Server Coherence WebLogic JMS WebLogic & Tuxedo Java EE Java SE XA
Virtual Assembly Builder
Cloud Application Foundation
6 Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Oracle Cloud Application Foundation Out of the Box, Best of Breed, Pre-Integrated Cloud Infrastructure
Web Social Mobile
Oracle Public Cloud
User Engagement
Traffic Director Business Process Content Business Management Management Intelligence WebLogic Coherence Tuxedo Server Service Integration Data Integration Virtual Assembly Builder Identity Management & Security Cloud Application Foundation
Development CloudCloud ApplicationApplication Enterprise Tools Foundation Management Exalogic Elastic Cloud
7 Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Coherence Problem Domain of Coherence High load, stateful, middle tier services using shared services
Service Clients Browsers, supplier and partner clients, application • Grow and scale naturally clients, mobile apps, and other service consumers.
• Facing rapidly increasing Service Implementation load • Commonly stateful Custom applications, BPM processes, service bus • Highly dependent on endpoints, reporting and batch services … shared services
Shared Services • Complex and expensive to scale RDBMS, cloud services, supplier and partner • High latency SPOB and services, mainframe applications, and so on. SPOF
9 Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Oracle Coherence Data Grid Distributed in Memory Data Management
Enterprise Real Time Clients Applications • Provides a Reliable data Web services tier with a single, consistent view of data Data Services • Enables dynamic data capacity including fault tolerance and load Oracle balancing for Availability Coherence Data Grid • Ensures Scalability of data capacity and processing capacity
Web services • Increase the overall Performance Databases Mainframes Coherence Clustered Caching Explained Partitioned, Fault Tolerant, Self-Healing Cache
• 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 • In the event a server fails or is unhealthy, other servers cooperatively diagnose the state
• The healthy servers immediately assume the responsibilities of X the failed server • Continuous Operation: No interruption of service or loss of data due when a server fails 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
12 Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Coherence Use Cases
REDUCE COSTS IMPROVE USER EXP EXTREME SCALE OUT 1 Seamless Consolidation 6 Cross-App User Session 12 Enhanced Data Mapping 7 Cross-Page Form Data Data Grid Computing 2 DB offload 13 8 Query Results Pagination 14 Geo replication 3 Mainframe offload 9 User Profiles 15 Real Time System 4 “Always On” Information 10 Large context data 16 State machine 5 Web Scale Out 11 Object Interoperability 17 Complex Event Process
Confidential – Proprietary Partitioned Topology : Data Access
Data Access Topologies
• Coherence provides many Topologies for Data Management • Local, Near, Replicated, Overview, Disk, Off-Heap, Extend (WAN), Extend (Clients)
Partitioned Topology
• Data spread and backed up across Members • Transparent to developer • Members have access to all Data • All Data locations are known – no lookup & no registry! Partitioned Topology : Data Update
Partitioned Topology
• Synchronous Update • Avoids potential Data Loss & Corruption • Predictable Performance • Backup Partitions are partitioned away from Primaries for resilience • No engineering requirement to setup Primaries or Backups • Automatically and Dynamically Managed Partitioned Topology : Recovery
Partitioned Topology
• Membership changes (new members added or members leaving) • Other members, in parallel, recover / repartition • 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 Partitioned Topology : Local Storage
Partitioned Topology
• Some members are temporary in a cluster • They should not cause repartitioning • Repartitioning means work for the other members (and network traffic) • So turn off storage! Topology Composition : Near Topology 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 automatically – Updates to cache written synchronously to the data source • Write Behind – All data writes occur through cache – Updates to cache written asynchronously to the data source
19 Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Querying The Data Grid
• Query • Programmatic query mechanism • Queries performed in parallel across the grid • Standard indexes provided out- of-the-box and supports implementing your own custom indexes • Continuous Query Cache • Automatically, transparently and dynamically maintains a view locally based on a specific criteria Data Processing and Map/Reduce Aggregation
• Processing on the grid • The inverse of caching • Sends the processing to where the data is in the grid - Once and only once guarantees - Processing is automatically fault-tolerant • Processing can be - Targeted to a specific key or collection of keys - Targeted to any object that matches a specific criteria • Parallel Aggregation • Aggregates at each cluster node • Final “reduce” at client node
Eventing
• Complex Event-Driven Apps • Java Bean Model • Key-Based • Filter-Based • “Live Objects” • Objects can respond to own state changes • State always recoverable • Build complex Staged Event Driven Architectures WebLogic and Coherence Integration Summary Built in Out of the Box
• Administration, operations and management built into WebLogic • Declarative scale out session management • Cache data access with synch/asynch read /write through • Analytics, events and compute
WebLogic WebLogic WebLogic WebLogic WebLogic WebLogic Coherence Coherence Coherence Coherence Coherence Coherence
Coherence Coherence Coherence Coherence Coherence Coherence Data Cache Data Cache Query/Event Query/Event Coherence Coherence Coherence Coherence Query/Event Query/Event
Declarative Session Persistence Caching with Query, compute and Management Read and Write Through event
23 Copyright © 2011, Oracle and/or its affiliates. All rights reserved. WebLogic with Coherence in WebLogic Suite Scale Session, Cache and Data Grid as Independent Architectural Tier
WebLogic Server Cluster WebLogic Server WLS WLS Coherence Coherence Coherence
In Memory Data Grid Coherence Coherence Coherence Coherence WebLogic Server with Coherence Coherence Real Customers, Real Business Value Oracle Coherence Customer Case Studies
• Application supports 25,000 events each year, including webcasts, event portals, virtual events, and virtual environments • Eliminated service interruptions for events of 30,000 attendees
• Provides timely risk and P&L data to traders, researchers, and financial controllers in a growing and volatile trading market • Replaced legacy spreadsheets to provide resilient, scalable risk platform • Real-time game show requires powerful, reliable, and scalable back-end technology for best customer experience • Provided sub-second response time to quiz show users with 100% uptime. • Gains Edge in Intraday Credit Risk Management with In-memory, Distributed Data Grid Solution • Achieve 5 millisecond response times for pre-transaction credit checks against counterparties globally and scale by up to a factor of ten without risk of increase in latency
25 Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Coherence on Exalogic Oracle Exalogic Elastic Cloud HARDWARE & SOFTWARE ENGINEERED TO WORK TOGETHER
EXTREME PERFORMANCE FOR JAVA APPLICATIONS
EXTREME PERFORMANCE FOR ORACLE BUSINESS APPLICATIONS
NATIVELY LEVERAGES EXADATA
BEST CONSOLIDATION PLATFORM
27 | © 2012 Oracle Corporation – Proprietary and Confidential
Exalogic Elastic Cloud Software
Middleware and Business Applications
Traffic
WebLogic Coherence Tuxedo Director Exalogic Exabus Exabus Exabus Exabus Control Integration Integration Integration Integration
Oracle Linux Guest OS Physical Oracle Linux/Solaris
Oracle VM for Exalogic Enterprise Enterprise Manager Enterprise Enterprise Manager Exabus
Exalogic Elastic Cloud Hardware
= Exalogic Elastic Cloud Software
28 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Exabus - High Speed Network Virtualization Direct Memory I/O for Java and C++
Standard Hardware I/O Exabus Application Application Application Application
Application Buffer Application Buffer
Copy TCP IP Transport
Kernel 20% Buffer Copies Zero Buffer Copy 40% Transport Processing Direct Memory Access 40 % Kernel Context Switches Kernel Bypass
4X Throughput, 6X Lower Latency
29 Coherence Optimizations for Exabus 4x bandwidth, 1/6 latency Provider-based Transport Layer .One per service for scalability to multiple cores
.Increased message parallelism to max network
.Context Switches reduced from 3 to 1
Services .Datagram still used for cluster protocol
JVM Infiniband Message Bus Provider
Coherence Message Busses .RDMA offloads host processor .Zero copy and kernel bypass .Predictive notifications avoid costly interrupts .Custom off-heap DirectByteBuffer reduces GC JRockit/HotSpot
30 Exalogic: Simplified Coherence Deployments Fewer, Larger JVMs in EECS 2.0
Number of JVMs Conventional Exalogic Needed for Coherence Infrastructure Infrastructure Single System, Many JVMs Fewer JVMs
8-12 Datagram Data Message Bus JVM Communications Data Communications • Scalability data communications to maximize network 1-2 JVM bandwidth with fewer JVMs. • Memory Buffers allocated off-heap dramatically reduces Conventional Hardware object allocation and thus garbage collection pauses Exalogic • Scalable communications and reduced GC pressure favors fewer, larger JVMs for simplified deployment
31 Exalogic: Coherence Cluster Rebalancing Exabus increases availability
Time to Recovery
Coherence Cluster 194 seconds Coherence Coherence Coherence
16X Faster Gbe 12 seconds Exabus Conventional Hardware Exalogic
32 node = physical machine node Higher Performance # of nodes: ½ clients + ½ servers IPoIB: 6 Coh server 12Gb heap jvm / server node 10GbE and IPoIB vs. Exabus Exabus: 2 Coh server 36Gb heap jvm / server node 2x to 4x more throughput 4x better latency (on average at the lowest latency) 4k payload 64k payload 4k payload 64k payload # nodes for 100K ops/s # of nodes for 40K ops/s latency latency 16 nodes 2.2 ms 10 nodes 0.7 ms 8 nodes
0.9 ms 5 nodes 6 nodes 0.5ms 4 nodes 0.2ms 0.5ms
10GbE IPoIB Exabus 10GbE IPoIB Exabus 10GbE IPoIB Exabus 10GbE IPoIB Exabus
33 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insurance company based in Spain 20x faster response time • Company Overview – Spain based holding company created in 1933, positioned ~20x faster with as one of the biggest insurance players worldwide, oriented Exalogic towards businesses and individuals. – More than $ 18.8B in annual revenues and 35,000 employees • Application/Workload – Proposed: Coherence Data Grid running on Exalogic – Current : COBOL and C on an IBM Mainframe – Existing system: IBM Z10 [2094-704] , 3226 MIPS, 401 MSU – New system: ExaLogic ¼ rack, 8 Compute nodes, 96 cores • Results – 20x faster response time
More Information Join the Coherence Community
http://coherence.oracle.com
@OracleCoherence
facebook.com/OracleCoherence
blogs.oracle.com/OracleCoherence
Oracle Coherence Users
youtube.com/OracleCoherence
coherence.oracle.com/display/CSIG Coherence Special Interest Group
36 37