Coherence in an Event Driven Architecture

1,626 views
1,429 views

Published on

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

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,626
On SlideShare
0
From Embeds
0
Number of Embeds
8
Actions
Shares
0
Downloads
38
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Coherence in an Event Driven Architecture

  1. 1. Coherence in an Event Driven Architecture 24 Oct 2013 Friday, 25 October 2013 1
  2. 2. 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
  3. 3. 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
  4. 4. 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
  5. 5. 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
  6. 6. 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
  7. 7. 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
  8. 8. 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
  9. 9. Coherence Features to Consider Friday, 25 October 2013 9
  10. 10. Cache Considerations Friday, 25 October 2013 10
  11. 11. 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
  12. 12. Features in Context Friday, 25 October 2013 12
  13. 13. 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
  14. 14. 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
  15. 15. 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
  16. 16. 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
  17. 17. Caching PNRs in Coherence Amadeus Sell (RES) Fly (CM) Friday, 25 October 2013 17
  18. 18. 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
  19. 19. Caching PNRs in Coherence XML ? Friday, 25 October 2013 19
  20. 20. 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
  21. 21. Caching PNRs in Coherence XML Friday, 25 October 2013 POJO with POF Serialisation 21
  22. 22. Caching PNRs in Coherence Friday, 25 October 2013 22
  23. 23. 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
  24. 24. 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
  25. 25. 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
  26. 26. 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
  27. 27. 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
  28. 28. 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
  29. 29. Message Sequencing POJO PNR ABC123 Created Coherence Coherence Task Processing Coherence ... Message Volume Scale Out Message Processing Friday, 25 October 2013 29
  30. 30. Incubator Processing Pattern http://coherence-community.github.io/coherence-incubator/11.1.0/processingpattern/index.html Friday, 25 October 2013 30
  31. 31. Coherence And Event Processing Event Bus Reservation Customer Entity Cache Friday, 25 October 2013 31
  32. 32. 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
  33. 33. 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
  34. 34. 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
  35. 35. Oracle Event Processor Friday, 25 October 2013 35
  36. 36. Event Processing using OEP Query push-down Events model Events display OEP Server Friday, 25 October 2013 36
  37. 37. 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
  38. 38. Coherence to Store Entities and Events Friday, 25 October 2013 38
  39. 39. 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
  40. 40. 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
  41. 41. 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
  42. 42. 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
  43. 43. 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
  44. 44. Thank you for your time. Friday, 25 October 2013 44

×