Coherence in an Event Driven Architecture
Upcoming SlideShare
Loading in...5
×
 

Coherence in an Event Driven Architecture

on

  • 659 views

Presentation on Oracle Coherence and its potential within an Event Driven Integration Architecture.

Presentation on Oracle Coherence and its potential within an Event Driven Integration Architecture.

Statistics

Views

Total Views
659
Views on SlideShare
659
Embed Views
0

Actions

Likes
1
Downloads
15
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Coherence in an Event Driven Architecture Coherence in an Event Driven Architecture Document Transcript

  • Coherence in an Event Driven Architecture 24 Oct 2013 Friday, 25 October 2013 1
  • About Intelligent Pathways • Australian technology company founded in 2003 • Specialising in enterprise integration and application development • Our approach is aligning technology with business objectives • Strong track record of delivery • In depth knowledge of Oracle Fusion Middleware; early adopters of SOA Friday, 25 October 2013 2
  • The Customer Book Flights And Ancillary Products In-flight Services Process Payments Issue Travel Documents Operate Flights Passenger Check-in and Boarding Control Airport Transfers Operate Lounges Friday, 25 October 2013 Enterprise functions to serve customer Functions span business units Based on passenger journey Baggage Services 3
  • The Customer Data Book Flights And Ancillary Products In-flight Services Process Payments Issue Travel Documents Operate Flights PNR Check-in and Boarding Control Airport Transfers Operate Lounges Baggage Services Friday, 25 October 2013 Passenger represented as a PNR - Passenger Name Record Business functions update state on PNR PNR contains huge amounts of data on customer 4
  • The Reservation Platform Book Flights And Ancillary Products In-flight Services Process Payments Amadeus Operate Flights Issue Travel Documents Sell (RES) Fly (CM) Check-in and Boarding Control Airport Transfers Operate Lounges Baggage Services Friday, 25 October 2013 PNR source of truth is the reservation platform Great opportunity to mine the PNR for events for the journey of the passenger Sell = Booking and Ticketing Fly = Customer Journey 5
  • PNR Events Book Flights And Ancillary Products In-flight Services Process Payments Amadeus Operate Flights Issue Travel Documents Sell (RES) Fly (CM) Check-in and Boarding Control Airport Transfers Operate Lounges Baggage Services PNR Events Friday, 25 October 2013 The PNR Feed from Amadeus contains PNR messages based on changes to the PNR Data changes trigger a new message Message contains current state of the PNR, the previous state of the PNR and a report on what changed 6
  • Event Processing Concepts Event Produces Event Processor Classified As Classified As Destined For Published By Analyses Business Event Technical Event Entity Contains Event Sink Event Source Change May Trigger Primarily Impacts Primarily Transfers Business Process State Streamed onto Defined By Information Model Event Channel Friday, 25 October 2013 Events are an occurrence of behaviour at a specific point in time A EDA reference architecture classifies events into Technical Events and Business Events Technical Events are primarily used to transfer entity state from a source to a target. This is usually triggered by an update to entity state in an enterprise system. Business Events are put into context of a business process. A business event is used to react to the behaviour exhibited by the event. A business event trigger may be based on an update to entity state (simple business event) May be based on detecting patterns in streams of data including the absence of certain conditions (complex event scenario) Entities are enterprise object that are typically represented by an information model It is important to align events information and entity information using a consistent model An event source is just that, a source of an event stream. An event sink is a destination for an event. An event channel streams events for consumption. An event processor consumes event streams to potentially produce more events 7
  • What about Coherence? State Events Stores Contains Stores Is An Event Source Entity Hosts Is An Coherence Event Sink Event Channel Friday, 25 October 2013 Coherence can play a key role in an event driven architecture by Storing entity state for processing Storing events for availability as an event sink Hosting event channels for distribution Being a source of events using inbuilt features, which can then be connect to streams for processing 8
  • Coherence Features to Consider Friday, 25 October 2013 9
  • Cache Considerations Friday, 25 October 2013 10
  • Data Processing Options and Considerations Friday, 25 October 2013 The inverse of caching Sends the processing (e.g. EntryProcessors) to where the data is in the grid Standard EntryProcessors provided Out-of-the-box Once and only once guarantees Processing is automatically fault-tolerant Processing can be: Targeted to a specific key Targeted to a collection of keys Targeted to any object that matches a specific criteria (i.e. Filter) 11
  • Features in Context Friday, 25 October 2013 12
  • Accessing PNR Data On Demand On Demand Consumer 1 On Demand Consumer N Reservation Reservation Customer Service Bus Reservation Customer Txn Volume = $ Cost Amadeus Reservation Customer Friday, 25 October 2013 13
  • Accessing PNR Data on Demand On Demand Consumer 1 On Demand Consumer N Reservation Reservation Customer Service Bus Reservation Customer Result Cache Amadeus Reservation Customer Friday, 25 October 2013 14
  • Accessing PNR Data on Demand On Demand Consumer 1 On Demand Consumer N Reservation Reservation Customer Service Bus Reservation Customer Amadeus Reservation Customer Read only Entity Cache Friday, 25 October 2013 15
  • Event Driven PNR Data On Demand Consumer 1 Event Consumer 1 On Demand Consumer N Reservation Event Consumer N Reservation Reservation Reservation Customer Customer Service Bus Reservation Event Bus Reservation Customer Customer Amadeus Reservation Customer Entity Cache Friday, 25 October 2013 16
  • Caching PNRs in Coherence Amadeus Sell (RES) Fly (CM) Friday, 25 October 2013 17
  • Caching PNRs in Coherence XML XML XML PNR ABC123 Add Ticket Friday, 25 October 2013 XML PNR ABC123 Add Flight Leg PNR ABC123 Created PNR ABC123 18
  • Caching PNRs in Coherence XML ? Friday, 25 October 2013 19
  • Coherence POF The Portable Object Format (advanced serialization) •Simple Serialization Comparison •In XML •<date format=“java.util.Date”>2008-07-03</date> •47 characters (possibly 94 bytes depending on encoding) •In Java (as a raw long) •64 bits = 8 bytes •In Java (java.util.Date using ObjectOutputStream) •46 bytes •In ExternalizableLite (as a raw long) •8 bytes •In POF •4F 58 1F 70 6C = 5 bytes Slide courtesy of Oracle Product Management Friday, 25 October 2013 20
  • Caching PNRs in Coherence XML Friday, 25 October 2013 POJO with POF Serialisation 21
  • Caching PNRs in Coherence Friday, 25 October 2013 22
  • Transforming outside of Cache POJO with POF Serialisation XML J2EE Application Server J2EE Application Server J2EE Application Server ... MDB Cluster Message Volume Scale Out Message Processing Friday, 25 October 2013 23
  • Transforming inside of Cache XML Coherence Node Coherence Node Coherence Node ... Processing Task Task Processing Processing Task Message Volume Scale Out Message Processing Friday, 25 October 2013 24
  • Approach should consider • Upfront infrastructure costs – Large volumes and message size impact on initial infrastructure • Operating stack and associated cost – – – – – Message transformation should be low cost License cost if transformed in cache (albeit not large) License cost if transformed using MDB potentially a lot larger Opportunity cost to use cache processing power for more important things ie Analytics Operational management skillset cost if using open source stack • Scalability points and capacity – Scaling of data capacity versus processing capacity • Processing parallelism and tradeoff with guaranteed sequencing Friday, 25 October 2013 25
  • Message Sequencing XML XML XML POJO PNR ABC123 PNR ABC123 PNR ABC123 Add Ticket Add Flight Leg Created PNR ABC123 Coherence Coherence Task Processing Tranform Add Ticket Transform Add Flight Leg Coherence ... Transform Create Message Volume Scale Out Message Processing Friday, 25 October 2013 26
  • Message Sequencing Coherence Coherence Task Processing Tranform Add Ticket Transform Add Flight Leg Coherence ... Transform Create Message Volume Scale Out Message Processing Friday, 25 October 2013 27
  • Message Sequencing POJO POJO POJO PNR ABC123 PNR ABC123 PNR ABC123 Created Add Ticket Add Flight Leg Coherence Coherence Task Processing Coherence ... Message Volume Scale Out Message Processing Friday, 25 October 2013 28
  • Message Sequencing POJO PNR ABC123 Created Coherence Coherence Task Processing Coherence ... Message Volume Scale Out Message Processing Friday, 25 October 2013 29
  • Incubator Processing Pattern http://coherence-community.github.io/coherence-incubator/11.1.0/processingpattern/index.html Friday, 25 October 2013 30
  • Coherence And Event Processing Event Bus Reservation Customer Entity Cache Friday, 25 October 2013 31
  • Technical Events vs Business Events PNR Passenger Contact Add PNR SSR Add PNR Passenger Add PNR Create PNR Ticket Add Friday, 25 October 2013 Business Class Passenger Requests Special Service PNR Flight Leg Add 32
  • Bespoke Event Processing using Client Cache Client Entity Cache Event Listener onCreate() onUpdate() onDelete() Processing Session Submit Event Determination Tasks Task Factory Event Cache Entry Worker Manager API Create Old Handle Task Outcome New New Update Old New Delete Old Task Execution Event Listener API Data Changes Entity Cache Friday, 25 October 2013 Cache Server Event Cache 33
  • Bespoke Event Processing using Server Cache Client Entity Cache Event Listener onCreate() onUpdate() onDelete() Processing Session Submit Event Determination Tasks Handle Task Outcome Event Cache Entry Task Factory Old New Event Listener API Create New Data Changes Entity Cache Friday, 25 October 2013 Update Old New Delete Old Task Execution Cache Server Event Cache 34
  • Oracle Event Processor Friday, 25 October 2013 35
  • Event Processing using OEP Query push-down Events model Events display OEP Server Friday, 25 October 2013 36
  • Oracle Event Processing Example Event Consumer Cache Server(s) Technical Event Cache Entity Cache Processing Tasks Processing Tasks Entity Processor Technical Event Procesor Technical Event Channel Business Event Channel Message Channel JMS Business Event Processor JMS Adapter OEP Server(s) Friday, 25 October 2013 Event Bus 37
  • Coherence to Store Entities and Events Friday, 25 October 2013 38
  • Coherence to Store Entities and Events <wlevs:caching-system id="CoherenceCache" provider="coherence" advertise="true" /> <wlevs:cache id="PlatformTechnicalEventCache" caching-system="CoherenceCache" value-type="PNRTechnicalEvent" key-properties="sourceMessage"> </wlevs:cache> <wlevs:cache id="PlatformEntityCache" caching-system="CoherenceCache" value-type="PNR" key-properties="reloc"> <wlevs:cache-listener ref="PNREntityCacheListener" /> </wlevs:cache> <cache-config xmlns="http://xmlns.oracle.com/coherence/coherence-cacheconfig" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/coherence/coherence-cacheconfig coherence-cache-config.xsd"> <caching-scheme-mapping> <cache-mapping> <cache-name>PlatformEntityCache</cache-name> <scheme-name>PnrDistCache</scheme-name> </cache-mapping> <cache-mapping> <cache-name>PlatformTechnicalEventCache</cache-name> <scheme-name>MsgDistCache</scheme-name> </cache-mapping> Friday, 25 October 2013 39
  • Coherence as an Event Source <wlevs:cache id="PlatformTechnicalEventCache" caching-system="CoherenceCache" value-type="PNRTechnicalEvent" key-properties="sourceMessage"> <wlevs:cache-listener ref="PNRTechnicalEventCacheListener" /> </wlevs:cache> Friday, 25 October 2013 40
  • Coherence as an Event Sink <wlevs:event-bean id="PlatformMessageToTechnicalEventBean" class="au.com.intelligentpathways.event.bean.PlatformMessageToPNRTechnicalEventBean"> <wlevs:listener ref="PlatformTechnicalEventCache" /> </wlevs:event-bean> Friday, 25 October 2013 41
  • Coherence for Event Processing <wlevs:config xmlns:wlevs="http://www.bea.com/ns/wlevs/config/application" xmlns:jdbc="http://www.oracle.com/ns/ocep/config/jdbc"> <processor> <name>PNRBusinessEventProcessor</name> <rules> <query id="BusinessClassPassengerAddsSSR"> <![CDATA[ select 'BUSINESS_CLASS_SSR' as eventType, te.reloc as id from PNRTechnicalEventOutboundChannel [now] as te, PlatformEntityCache as e where te.reloc = e.reloc and te.eventType = 'PNR_SSR_ADDED' and e.bookingClass = 'BUSINESS' ]]> </query> </rules> </processor> <channel> <name>BusinessEventChannel</name> <selector>BusinessClassPassengerAddsSSR</selector> </channel> </wlevs:config> Friday, 25 October 2013 42
  • Take away points • Event Driven Architecture to remove ondemand access to core system • A lot to consider on approach • Coherence front and centre technology • Coherence and OEP work together nicely • Both technologies lay the foundation for real time response to customer and organisation behaviour Friday, 25 October 2013 43
  • Thank you for your time. Friday, 25 October 2013 44