1 copyright © 2012, oracle and/or its affiliates. all ... · in-memory database cache accelerates...
TRANSCRIPT
1 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
2 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Oracle In-Memory Database Cache Overview
Simon Law
Product Manager
3 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Needs of the Real-Time Enterprise Blazingly Fast Response Competitive Advantage
• Fraud detection
• Order matching
• Compliance
• Provisioning
• Authentication
• Authorization
• Personalization
• CRM
• Business Activity Monitoring
• Real-time Billing
NEW CUSTOMER
SIGN-UP
WEB
SELF-CARE
MGMT
DASHBOARD
MOBILE DATA
SERVICES
PROCESS AN ORDER
SCHEDULE CALCULATE BILL VERIFY CREDIT & TERMS CHECK ADDRESS
ACTIVATE A NEW SUBSCRIBER MONITOR FOR CRITICAL EVENTS
4 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Typical Application Deployment Model
• Applications communicating to
the database over network
• Business logic in PL/SQL
• Different caching techniques to
improve database application
performance
– Result set caches
– Object caches
– Application / Database tier
caches
SQL
PL/SQL
Application
Application
Application
5 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Challenges with different caching techniques
• Data Model
– Object vs. Relational – application transparency
• Read-Only or Read-Write Cache
– Content gets stale over time – invalidate or refresh cache
– Updates require propagation to Oracle database
• Query Capability
• Persistency and High Availability
– Can cache be available if database is not available?
• Significant development effort to achieve all the above
6 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Oracle In-Memory Database Cache
Real-Time Applications
TimesTen In-Memory Database
Application TimesTen In-Memory Database
Application
TimesTen In-Memory Database
Application
• Built using Oracle TimesTen
In-Memory Database – Full featured RDBMS
– Scale up and scale-out with in-memory
cache grid
• Cache Oracle database tables and
run SQL and PL/SQL in the
application-tier – Extremely fast response time and very
high throughput
7 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
TIMESTEN IN-MEMORY DATABASE
8 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Oracle TimesTen In-Memory Database Memory-Optimized Relational Database
• In-memory RDBMS optimized for RAM speed
• Exceptional performance
– Low latency response time
– High throughput
– Embeddable
• Persistent and durable
– Transactions and checkpoints persisted to
disk storage
• Compatible with Oracle Database
– Standard SQL, PL/SQL, Datatypes
– JDBC, ODBC, ADO.NET, OCI, Pro*C
Direct-Linked
Application TimesTen
Libraries
Client-Server
Application TimesTen
Client Lib
Memory-Resident
Database
Client/ Server
JDBC / ODBC / ADO.NET / OCI / PLSQL
Checkpoint Files
Transaction Log Files
Fast
data
access
9 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Lightning Fast Response Time
10 Millionths of
a second 2.5
Millionths of
a second 0
4
8M
icro
se
co
nd
s
Read a Record Update Transaction
Average Response Time
TimesTen In-Memory Database
7 Millionths of
a second
1.78 Millionths of
a second
Oracle TimesTen In-Memory Database 11.2.2.0 - Intel Xeon 5670 2.93Ghz, 2 CPUs, 6 cores/CPU - Oracle Linux 5.6
10 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
0
500,000
1,000,000
1,500,000
2,000,000
2,500,000
3,000,000
3,500,000
4,000,000
4,500,000
1 2 4 6 8 10 12
560,212792,858
1,550,766
2,155,411
2,890,719
3,553,895
4,144,896
Tra
ns
ac
tio
ns P
er S
ec
on
d
Number of Concurrent Processes
Throughput Scalability for OLTP Workloads 100% Read Workload on Oracle Exalogic
4.1M Reads
per Second
11 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
0
200,000
400,000
600,000
800,000
1,000,000
1,200,000
1,400,000
1,600,000
1,800,000
2,000,000
2,200,000
1 2 4 6 8 10 12
287,461
458,555
856,235
1,015,445
1,550,077
1,710,622
2,132,053
Tra
ns
ac
tio
ns
p
er
Se
co
nd
Number of Concurrent Processes
Throughput Scalability for OLTP Workloads Mixed-Transaction Workload on Oracle Exalogic
2.13M
Updates per
Second
12 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
IN-MEMORY DATABASE CACHE
13 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Oracle In-Memory Database Cache
• Oracle Database option
• Runs in the application-tier
• Caches subset of Oracle Database
• Accelerates applications with micro-second response time
• Scales up on SMP
• Scales out on commodity hardware
• Supports read/write caching
• Automatic synchronization with Oracle Database
• Built-in high availability
Real-Time Applications
TimesTen In-Memory Database
Application TimesTen In-Memory Database
Application
TimesTen In-Memory Database
Application
14 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
In-Memory Database Cache Accelerates Oracle Database Applications
• Cache subset of Oracle Database tables
• Applications access cache tables like
regular relational tables
– Standard SQL with JDBC, ODBC,
ODP.NET, OCI, Pro*C, PL/SQL
• Read-only and read/write cache tables – Transactions with ACID properties
– Persistent and durable
• Automatic data synchronization with the
Oracle database Database Tier
Client/ Server
JDBC / ODBC / ADO.NET / OCI / PLSQL Checkpoint Files
Transaction Log Files
App -Tier Server
Client-Server
Application TimesTen
Client Lib
Direct-Linked
Application TimesTen
Libraries
15 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
In-Memory Database Cache Flexible Cache Group Configurations Application
Transactions Cache Groups
Automatic Data
Synchronization
• Cache Group describes the data in the Oracle
database to cache
• Collection of related tables
– All or subset of rows and columns
– Defined via SQL clause CREATE CACHE GROUP PremierUsers
FROM OE.CUSTOMER (
CUSTID NUMBER NOT NULL,
NAME VARCHAR2(100) )
WHERE CUSTOMER.ORDER > 500;
• Cache tables are regular database tables in
TimesTen
– Joins/search, insert/update/delete
16 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
In-Memory Database Caching
Read-Write caching • Transactions committed in TimesTen
cache
• Parallel write-through of committed
transactions to Oracle Database
Read-only caching • Transactions committed in Oracle
Database
• Multi-stream refresh of committed
transactions to TimesTen
Automatic
Data
Synchronization
Data Synchronization
Application Application
Application
Reads/Write
transactions Reads/Write
transactions
Reads/Write
transactions
17 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
In-Memory Database Cache Grid
• Location transparency
• Usage-driven, adaptive
redistribution of cached data
• Online addition/removal of
cache nodes
• Scale out with growth
• Parallel searches
• Transactional consistency
Application
Application
Application
Application
Incremental Scalability
18 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
DEMO
IN-MEMORY DATABASE CACHE
19 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Mobile Prepaid Subscriber Application Demo
Presentation
Exalogic Cloud
• Java/JDBC application
• X2-2 quarter-rack Exalogic
• Transactions executed and committed
in TimesTen, then asynchronously
write-through to Oracle Database
• Five transactions types – Authenticate account user
– Check account balance
– Update account profile
– Refill, credit, or debit account
– Search accounts with a low balance
20 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
HIGH AVAILABILITY AND
MAXIMUM AVAILABILITY ARCHITECTURE
21 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Real-Time Replication High Availability and Disaster Recovery
• Real-time transactional parallel replication
– Memory to memory
• High performance
– Asynchronous replication
– Synchronous replication
• Low-latency durability
• Multiple topologies, including
– Active Standby Pair
– Active Active – Split Workload
• Robust and reliable
– LAN and WAN configurations
– Data compression
Read-Only Subscribers
- Reader Farm
- Disaster Recovery
Application
Transactions
Active
Application Reads
on Hot Standby
Standby
Subscriber Subscriber
Subscriber
22 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Read-write and Read-only Caching
• Read-write caching – Parallel replication of transactions from
Active to Standby
– Parallel write-through of transactions to Oracle Database
• Read-only caching – Multi-stream refresh of transactions
from Oracle Database
– Parallel replication of refresh transactions to Standby
• Application continues even if Oracle Database connection is down
High Availability
Automatic
Synchronization
Hot Standby
available for reads Application
Transactions
Active Standby
23 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Automatic Client Connection Failover
• Available for Client / Server connections
– Configurable by the application
• Automatic connection failover
– When TimesTen database failovers to Standby server
• Automatic re-connect application to the new Active server
– Connection handle is preserved
• Connection failover notification (like TAF)
– Available if subscribed
24 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Integration with Oracle RAC Cross-tier High Availability
• Automatic recovery from
Oracle Database RAC node
failures using TAF and FAN – Automatic reconnection to the cluster
– Automatic resumption of data refresh
from Oracle to TimesTen
– Automatic resumption transaction
propagation from TimesTen to Oracle
– No loss of transactions
Active Standby
25 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Integration with Oracle Clusterware Automated Management, Monitoring and Failover
• Manages TimesTen / IMDB
Cache processes
• Monitors and detects failure of – Nodes
– TimesTen / IMDB Cache processes
– Applications
• Manages automatic failover
• Assign new roles
• Recovers automatically
• Provision spare nodes
Shared
Storage
Clusterware
Active Standby Subscriber Subscriber
Subscriber
Spare Nodes
26 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
In-Memory Database Cache Grid
• Cache Grid is resilient to
Grid Member failure
• High availability with
replication providing fast
failover
• Automated failover and
recovery via Oracle
Clusterware integration
Built-In High Availability
Standby
Active
Standby
Active
Standby
Active
Standby
Active
27 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Integration with Oracle Data Guard
• Support synchronous
physical standby
• Failover
• Switchover
• Rolling upgrade
Oracle Maximum Availability Architecture
Real Application Clusters Standby Oracle Database
Data Guard
Application
In-Memory Database Cache
Application
Application
28 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
APIS AND TOOLS
29 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Application Development
SQL
PL/SQL
Languages C/C++/C#
ODBC
ttClasses
OCI, Pro*C
ADO.NET
J2EE App Servers OR Mapping Java/JDBC
30 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
TimesTen Support in SQL Developer
• Browse, Edit, Create, Alter TimesTen database objects
• Simplify Caching of Oracle Database tables
– Create, Drop, Alter cache groups
– Load, Unload, Flush, Refresh cache data
• Develop PL/SQL procedures, functions, and packages
• Show SQL execution plans, update statistics
• Run pre-defined, create reports
• Access SQL Worksheet for ad-hoc
queries, execute TimesTen
built-in procedures
Database Application Development
31 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
TimesTen System Monitoring Tool Plug-In for Oracle Enterprise Manager
• Monitor key performance
metrics
• User defined thresholds for
alerts and notifications
• Out-of-the-box reports for
TimesTen metrics
• Create custom reports with
graphical report wizard
• Low overhead
32 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Summary
• Scalable, highly available database architecture
• TimesTen for real-time access
• Oracle Database for long-term
storage and analysis
• Fault Tolerant with TimesTen
replication
• In-memory response time and
massive throughput … the best of
all worlds
Application Application
Application
33 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
For More Information
• Technology white papers
• Quick Start Guide and tutorials
• Discussion Forum
• And more..
http://www.oracle.com/technetwork/database/timesten
34 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Q&A Q&A
35 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
36 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.