coherence goldengate hotcache
DESCRIPTION
Watch on YouTube: http://www.youtube.com/watch?v=O0TIG3hgbg0TRANSCRIPT
<Insert Picture Here>
Oracle Coherence 12.1.2 HotCache
Shaun Smith Senior Principal Product ManagerOracle Cloud Application Foundation
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.2
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.
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.3
Cloud Application FoundationCoherence 12c Demonstration – HotCache
Complete
Open
Integrated
Best in Class
On Premise – Private Cloud
Public Cloud
Cloud Application Foundation
Traffic Director/Web Tier
WebLogic Server Coherence Tuxedo
Virtual Assembly Builder
ORACLE Cloud
Exalogic Elastic Cloud
Coherence 12c HotCache
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.4
Agenda
The Shared Database Challenge
Coherence GoldenGate HotCache
Integrated Products
Demo
Summary
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.5
The Shared Database Challenge
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.6
Database Backed Coherence Application
Database access/update via CacheStore read/write
Works well when Coherence application is the only source of database changes
Database
Coherence
CacheStore CacheStore CacheStore
Read / W
rite
Read / W
rite
Read / W
rite
Coherence ApplicationCoherence Application
Coherence Application
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.7
Challenge: Shared Database
Coherence applications backed by a relational database can suffer from stale caches due to 3rd party database updates.
Existing solutions:– Cache Expiry
Inefficient—expires fresh data
– Refresh Ahead Inefficient pull model refreshes
fresh data Possible high latency
Database
Coherence ApplicationCoherence ApplicationCoherence Application
3rd PartyApplication
Read / W
rite
Coherence
Read / W
rite
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.8
Solution: Update Cache on DB Change
Ideally– Event Driven
– Low Latency
– Efficient
– Understand what objects in what caches are affected by a change to a given column in a given table.
Database
Coherence ApplicationCoherence ApplicationCoherence Application
3rd PartyApplication
Coherence
Update C
acheUpd
ate
Dat
abas
e
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.9
Coherence GoldenGate HotCache
Built on TopLink, it integrates with GoldenGate to push database changes into Coherence cache
– Maps data changes to affected objects using JPA metadata
– Zero to minimal change to Coherence application
– Efficient push model—only stale data is processed
– Low latency—push happens on change
Database
Coherence
Coherence ApplicationCoherence ApplicationCoherence Application
3rd PartyApplication
Read / W
rite
GoldenGate HotCache
GoldenGate
Read / W
rite
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.10
Coherence HotCacheSolution Products
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.11
Oracle GoldenGate
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.12
Oracle GoldenGate for Java
Through Oracle GoldenGate for Java, transactional data captured by Oracle GoldenGate can be delivered to targets such as BPM / CEP & ETL through JMS or integrating with a custom application’s Java API.
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.13
Coherence GoldenGate HotCache
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.14
Oracle TopLink
Comprehensive Java Persistence Solution– Java Persistence (JPA 2.0 Reference Implementation), Java Architecture
for XML Binding (JAXB 2.x), Database Web Service (DBWS)
Strong Developer Support– Developed in open source EclipseLink project at Eclipse.org
– Tool support in OEPE (Eclipse EE), NetBeans, JDeveloper
Performance– Key contributor to Oracle's SpecJ World Record
– Superior results across the board against key competitors in internal benchmarks
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.15
Coherence GoldenGate HotCache and JPA
Coherence GoldenGate HotCache uses Java standard Java Persistence API (JPA) mappings to map from database changes to affected objects
<entity class="example.model.Employee"> <attributes> <id name="id"> <generated-value /> </id> </attributes></entity>
XML Mappings Java Annotations
OR
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.16
Coherence GoldenGate HotCache
JPA object-table mappings– Can determine what entity class is affected by change to any table
JPA Id mappings– Can identify which specific object in cache is affected by database change
via PK mapping
JPA object field/column mappings enable updating basic values TLG—Object relationships are known so can determine which
embedded objects need updating
Leveraging JPA Metadata
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.17
Coherence GoldenGate HotCache and JPA (cont) HotCache identifies what objects in what cache need to be updated based on database change
EntryProcessors are used to update data in place JPA optimistic locking supported
– Only applies change if newer than cache value
Configurable error handling policy
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.18
Coherence HotCacheDemo
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.19
Database
Coherence
CacheStore
Read / W
rite
Get/Put/Remove Employee Objects
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.20
Database
Coherence
CacheStore
Read / W
rite
SELECT, INSERT,UPDATE EMPLOYEE rows
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.21
Database
Coherence
Read / W
rite
CacheStore
Read / W
rite
SELECT, INSERT, UPDATE, DELETE EMPLOYEE rows
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.22
Database
Coherence
CacheStore
Read / W
rite
GoldenGate HotCache
GoldenGate
Read / W
rite
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.23
Database
Coherence
GoldenGate HotCache
GoldenGate
CacheStore
Read / W
rite
EMPLOYEE tableevents
Read / W
rite
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.24
Database
Coherence
GoldenGate HotCache
GoldenGate
CacheStore
Read / W
rite
Employee Objects
Read / W
rite
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.25
Database
Coherence
GoldenGate HotCache
GoldenGate
CacheStore
Read / W
rite
Employee Objects
EMPLOYEE tableevents
Read / W
rite
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.26
How HotCache Works
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.27
Coherence
id: 1first: Bobsalary: $100,000
Employee-1
EMPLOYEE
ID FIRST SALARY
1 Bob $100,000
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.28
Coherence
EMPLOYEE
ID FIRST SALARY
1 Bob $200,000
EMPLOYEE
ID SALARY
BEFORE 1 $100,000
AFTER 1 $200,000
id: 1first: Bobsalary: $100,000
Employee-1
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.29
Coherence
<entity class=“example.model.Employee"> <attributes> <id name="id"> <generated-value /> </id> </attributes></entity>
EMPLOYEE
ID FIRST SALARY
1 Bob $200,000
id: 1first: Bobsalary: $100,000
Employee-1
EMPLOYEE
ID SALARY
BEFORE 1 $100,000
AFTER 1 $200,000
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.30
Coherence
<entity class=“example.model.Employee"> <attributes> <id name="id"> <generated-value /> </id> </attributes></entity>
EMPLOYEE
ID FIRST SALARY
1 Bob $200,000
id: 1first: Bobsalary: $100,000
Employee-1
EMPLOYEE
ID SALARY
BEFORE 1 $100,000
AFTER 1 $200,000
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.31
Coherence
<entity class=“example.model.Employee"> <attributes> <id name="id"> <generated-value /> </id> </attributes></entity>
EMPLOYEE
ID FIRST SALARY
1 Bob $200,000
id: 1first: Bobsalary: $100,000
Employee-1
EMPLOYEE
ID SALARY
BEFORE 1 $100,000
AFTER 1 $200,000
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.32
Coherence
<entity class=“example.model.Employee"> <attributes> <id name="id"> <generated-value /> </id> </attributes></entity>
EMPLOYEE
ID FIRST SALARY
1 Bob $200,000
id: 1first: Bobsalary: $100,000
Employee-1
EMPLOYEE
ID SALARY
BEFORE 1 $100,000
AFTER 1 $200,000
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.33
Coherence
id: 1first: Bobsalary: $100,000
Employee-1
EMPLOYEE
ID SALARY
BEFORE 1 $100,000
AFTER 1 $200,000
EMPLOYEE
ID FIRST SALARY
1 Bob $200,000
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.34
Coherence
Id: 1
First: Bob
Salary: $200,000
id: 1first: Bobsalary: $200,000
Employee-1
EMPLOYEE
ID FIRST SALARY
1 Bob $200,000
Cache matches Database!
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.35
Summary
Propagates database changes to corresponding objects in Coherence cache leveraging:
– GoldenGate for database change capture
– TopLink to map database changes to cached objects
Available in Coherence 12.1.2
Coherence GoldenGate HotCache
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.36
Join the Coherence Communityhttp://coherence.oracle.com
@OracleCoherence
/OracleCoherence
blogs.oracle.com/OracleCoherence
Group: Oracle Coherence Users
/OracleCoherence
coherence.oracle.com/display/CSIGCoherence Special Interest Group
<Insert Picture Here>
Oracle Coherence 12.1.2 HotCache
Shaun Smith Senior Principal Product ManagerOracle Cloud Application Foundation