oracle fusion middleware 12c - oracle coherence... coherence live events harvey raja consulting...

20
<Insert Picture Here> Coherence Live Events Harvey Raja Consulting Member Technical Staff, Cloud Application Foundation Oracle Coherence Oracle Fusion Middleware 12c Cloud Application Foundation You Video Series

Upload: others

Post on 18-Mar-2020

11 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Oracle Fusion Middleware 12c - Oracle Coherence... Coherence Live Events Harvey Raja Consulting Member Technical Staff, Cloud Application Foundation Oracle

<Insert Picture Here>

Coherence Live Events Harvey Raja Consulting Member Technical Staff, Cloud Application Foundation Oracle Coherence

Oracle Fusion Middleware 12c Cloud Application Foundation You Video Series

Page 2: Oracle Fusion Middleware 12c - Oracle Coherence... Coherence Live Events Harvey Raja Consulting Member Technical Staff, Cloud Application Foundation Oracle

Copyright © 2013, 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.

Page 3: Oracle Fusion Middleware 12c - Oracle Coherence... Coherence Live Events Harvey Raja Consulting Member Technical Staff, Cloud Application Foundation Oracle

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 3

Cloud Application Foundation Coherence 12c Demonstration – Live Events §  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

Live Events

Page 4: Oracle Fusion Middleware 12c - Oracle Coherence... Coherence Live Events Harvey Raja Consulting Member Technical Staff, Cloud Application Foundation Oracle

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 4

Coherence Eventing Mechanisms

§ MapListener –  Client-side “post”-events

§ Triggers –  Server-side “pre”-events

§ Backing Map Listeners –  Server-side “post”-events

§ Others –  PartitionListener, MemberListener, ServiceListener

Existing

Page 5: Oracle Fusion Middleware 12c - Oracle Coherence... Coherence Live Events Harvey Raja Consulting Member Technical Staff, Cloud Application Foundation Oracle

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 5

Coherence Eventing Mechanisms

§ Distinct registration mechanism per event type

§ No commonality for client interfaces or events

§ Are the events synchronously or asynchronously dispatched?

Disadvantages

Page 6: Oracle Fusion Middleware 12c - Oracle Coherence... Coherence Live Events Harvey Raja Consulting Member Technical Staff, Cloud Application Foundation Oracle

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 6

Live Event Model

§ EntryEvent –  Data related

§ EntryProcessorEvent –  EntryProcessor invocation

§ TransferEvent –  Partition redistribution

§ TransactionEvent –  Cross cache event

PartitionedCache PartitionedService

Page 7: Oracle Fusion Middleware 12c - Oracle Coherence... Coherence Live Events Harvey Raja Consulting Member Technical Staff, Cloud Application Foundation Oracle

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 7

Data-Related Events

§ BinaryEntry-based

public interface EntryEvent! extends Event<EntryEvent.Type> ! { ! /** ! * Return the immutable Set of {@link BinaryEntry entries} on which the ! * action represented by this {@link EntryEvent} occurred. ! * ! * @return the Set of entries represented by this event ! */ ! public Set<BinaryEntry> getEntrySet(); !!! public static enum Type ! { ! INSERTING, INSERTED, UPDATING, UPDATED, REMOVING, REMOVED ! } ! } !

Page 8: Oracle Fusion Middleware 12c - Oracle Coherence... Coherence Live Events Harvey Raja Consulting Member Technical Staff, Cloud Application Foundation Oracle

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 8

Data-Related Events

NamedCache.put()NamedCache.put()EventInterceptor

INSERTING

EventInterceptor

INSERTING

101101100010101011010011

Backup

(async)INSERTED

Backup

(async)INSERTED

Page 9: Oracle Fusion Middleware 12c - Oracle Coherence... Coherence Live Events Harvey Raja Consulting Member Technical Staff, Cloud Application Foundation Oracle

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 9

EntryProcessor-Related Events

§ BinaryEntry-based

public interface EntryProcessorEvent! extends Event<EntryEvent.Type> ! { ! public Set<BinaryEntry> getEntrySet(); !! /** ! * Return the {@link EntryProcessor} associated with this {@link ! * EntryProcessorEvent}. ! * ! * @return the entry processor associated with this event ! */ ! public EntryProcessor getProcessor(); !! public static enum Type ! { ! EXECUTING, EXECUTED ! } ! } !

Page 10: Oracle Fusion Middleware 12c - Oracle Coherence... Coherence Live Events Harvey Raja Consulting Member Technical Staff, Cloud Application Foundation Oracle

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 10

EntryProcessor-Related Events

NamedCache.invoke()NamedCache.invoke() EventInterceptor

EXECUTING

EntryProcessor

EventInterceptor

EXECUTING

EntryProcessor101101100010101011010011

101101100010101011010011

Backup(async)EXECUTED

Backup(async)EXECUTED

Page 11: Oracle Fusion Middleware 12c - Oracle Coherence... Coherence Live Events Harvey Raja Consulting Member Technical Staff, Cloud Application Foundation Oracle

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 11

Transfer-Related Events

§ BinaryEntry-based

public interface TransferEvent! extends Event<EntryEvent.Type> ! { ! public int getPartitionId(); ! public Member getLocalMember(); ! public Member getRemoteMember(); ! /** ! * Return a map of cache names and associated set of read-only {@link ! * BinaryEntry entries} encapsulated in this {@link TransferEvent}. The ! * returned map and contained sets are immutable. ! * ! * @return a map of cache names and associated set of entries ! */ ! public Map<String, Set<BinaryEntry>> getEntries(); !! public static enum Type ! { ! DEPARTING, ARRIVED ! } ! } !

Page 12: Oracle Fusion Middleware 12c - Oracle Coherence... Coherence Live Events Harvey Raja Consulting Member Technical Staff, Cloud Application Foundation Oracle

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 12

ARRIVEDARRIVED

Transfer-Related Events

EventInterceptor EventInterceptor

EventInterceptor

EventInterceptor

DEPARTING

EventInterceptor

DEPARTING

EventInterceptor

DEPARTING

EventInterceptor

DEPARTING

Page 13: Oracle Fusion Middleware 12c - Oracle Coherence... Coherence Live Events Harvey Raja Consulting Member Technical Staff, Cloud Application Foundation Oracle

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 13

Transaction-Related Events

§ All entries enlisted within a partition local transaction § BinaryEntry-based

public interface TransactionEvent! extends Event<TransactionEvent.Type> ! { ! /** ! * A set of {@link BinaryEntry entries} enlisted within this ! * transaction. ! * ! * @return a set of entries enlisted within this transaction ! */ ! public Set<BinaryEntry> getEntrySet(); !! public static enum Type ! { ! COMMITTING, COMMITTED ! } ! } !

Page 14: Oracle Fusion Middleware 12c - Oracle Coherence... Coherence Live Events Harvey Raja Consulting Member Technical Staff, Cloud Application Foundation Oracle

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 14

COMMITTEDBackup (async)

EventInterceptor

Transaction-Related Events

NamedCache.invokeAll({A,B})NamedCache.invokeAll({A,B}) EntryProcessor

Keys:{A,B}Keys:{A,B}

enlist:{C}enlist:{C}

COMMITTING:{A,B,C}COMMITTING:{A,B,C}

COMMITTEDBackup (async)

Page 15: Oracle Fusion Middleware 12c - Oracle Coherence... Coherence Live Events Harvey Raja Consulting Member Technical Staff, Cloud Application Foundation Oracle

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 15

Registration

§ distributed-scheme –  PartitionedService level interceptors: TransferEvent & TransactionEvent –  PartitionedCache events for all caches

§  cache-scheme-mapping –  PartitionedCache level interceptors: EntryEvent & EntryProcessorEvent –  Ties to caches that conform to the cache-name pattern

§ Use Annotation & Generics to filter events

Declarative – Cache Configuration

Page 16: Oracle Fusion Middleware 12c - Oracle Coherence... Coherence Live Events Harvey Raja Consulting Member Technical Staff, Cloud Application Foundation Oracle

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 16

Registration Declarative – Cache Configuration

Page 17: Oracle Fusion Middleware 12c - Oracle Coherence... Coherence Live Events Harvey Raja Consulting Member Technical Staff, Cloud Application Foundation Oracle

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 17

Registration

§ ConfigurableCacheFactory holds an InterceptorRegistry:

§ Annotation and Generics on interceptor are honored

§ Services and caches can be filtered by implementing: EventDispatcherAwareInterceptor

Programmatic

Page 18: Oracle Fusion Middleware 12c - Oracle Coherence... Coherence Live Events Harvey Raja Consulting Member Technical Staff, Cloud Application Foundation Oracle

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 18

Page 19: Oracle Fusion Middleware 12c - Oracle Coherence... Coherence Live Events Harvey Raja Consulting Member Technical Staff, Cloud Application Foundation Oracle

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 19

Join the Coherence Community http://coherence.oracle.com

@OracleCoherence

/OracleCoherence

blogs.oracle.com/OracleCoherence

Group: Oracle Coherence Users

/OracleCoherence

coherence.oracle.com/display/CSIG Coherence Special Interest Group

Page 20: Oracle Fusion Middleware 12c - Oracle Coherence... Coherence Live Events Harvey Raja Consulting Member Technical Staff, Cloud Application Foundation Oracle

<Insert Picture Here>

Coherence Live Events Harvey Raja Principal Member Technical Staff, Cloud Application Foundation Oracle Coherence

Oracle Fusion Middleware 12c Cloud Application Foundation You Video Series