Event-Driven SOA: Events meet ServicesGuido Schmutz (guido.schmutz@trivadis.com)Senior Architect/Technology ManagerTrivadis AG
Guido SchmutzWorking for Trivadis for more than 14 yearsOracle ACE Director for Fusion Middleware and SOACo-Author of different booksConsultant, Trainer Software Architect for Java, Oracle, SOA and EDAMember of Trivadis Architecture BoardTrivadis Technology ManagerMore than 20 years of software development experienceContact: guido.schmutz@trivadis.comBlog: http://guidoschmutz.wordpress.com
Trivadis facts & figuresSwiss IT consulting company11 locationswithmorethan 550 employeesFinancially independent and sustainably profitableKey figures 2009Revenue CHF 100 / EUR 66 mio.Services for more than 650 clients in over 1‘600 projectsOver 160 Service Level AgreementsMore than 5'000 training participantsResearch and development budget: CHF 5.0 / EUR 3.3 mio.
Trivadis Integration Architecture Blueprint
AgendaIntroduction to EventsEvent ProcessingEvent Delivery NetworkEvents meet ServicesEvents and BPMSummary
Whatis an Event?An Event is a significant (in the sense that it may affect some action), atomic (happens completely or not at all) occurrence (e.g. fact becoming true, a state transition) in the reality.Events may represent various things:Update of a databaseState of Change in a process/workflowReported ProblemAnticipated ProblemAny “business situation” raised by an application
“Event-Driven”EventsEventsThings that happen or changeBusiness EventsEvents that are meaningful in a business contextEvent ObjectsDiscrete report of eventsEvent-DrivenThe behaviour of an entity that acts when it recognizes an eventEDAArchitectural style in which one or more components are event-driven and minimally coupledOtherEventsBusinessEventsEvent objectsEvent-drivenEDA
Event TypesOrdinary Eventscommon non-critical eventsTypically generated intermittentlyNotable EventsImportant and need to be acted uponTypically occur at low volumeStream EventsContinuous stream of eventsMay not be significant individually but part of a critical patternTransactional EventsImportant events generated through business transactionsCould be high volume without necessarily having a correlation patternSource: Oracle
Event MetamodelStandardize structure for events across enterpriseSimplifies event integrationEvents generally have to major partsHeaderBodySimilar to a Web Service (SOAP) message but there is no official standard yet
How does an Event look like?
EDA Simplified Conceptual ViewBasic conceptlarge number of inbound events and messages are captured and processed to produce a smaller number of outbound eventsSource: Oracle
EDA High Level Conceptual ViewSource: Oracle
5 Principles of an EDAReports current eventsNotification reports a discrete occurrence as it happensPushes notificationsPushed by the event producer, not pulled by the event consumerRespond immediatelyConsumer reacts immediately after it recognizes the eventCommunicates one-wayNotification is “fire-and-forget” type of communicationIs free of commandsNotification is a report, not a specific request or commandDoes not prescribe the action the event consumer will perform
When vs. WhatWhenEvent Processing(CEP, SEP)WhatSOA / BPM
AgendaIntroduction to EventsEvent ProcessingEvent Delivery NetworkEvents meet SOA/BPMEvents and BPMSummary
Event ProcessingEvents at sources are rarely directly actionableNot significant enough for the business to react and take meaningful actionEspecially true for streaming and high volume eventsEvent processing is the manipulation of eventsthrough the application of business rules to identify actionableThreadsOpportunitiesAnomalies
Building blocks of Event Processing
3 Typesof Event ProcessingRelativity can be causaltemporal, spatial or otherSource: Oracle
Simple Event Processing (SEP)
Event Stream Processing (ESP)
Complex Event Processing (CEP)
Complex Event Processing (CEP)ComplexEventProcessorEvent SourceFiltering; Temporal and causality constraintsValidateAggregation; event-data joinEnrichTransformCreate “complex event”Intelligent routing; content-based routing; event-driven flowsRouteOperateService invocation; alert; dynamic flowsEvent ConsumerSource: IBM
Complex Event Processing vs. Traditional Analysis
Fundamental CEP Design PatternFilteringIn-memory cachingAggregation over windowsDatabase lookupsDatabase WritesCorrelation (Joins)Event pattern matchingState machinesHierarchical EventsDynamic QueriesSource: http://www.coral8.com/system/files/assets/pdf/Coral8DesignPatterns.pdf
Event Processing Network (EPN)Event processing needs several processing steps intermingled with user logicEvents are filteredEvents are derivedRequires the components (event processors, channels) to be connected in a network fashion=> EPNSource: Oracle
Event Processing with Oracle CEPOracle CEP – Constructs & Visual ToolingEvent-driven componentsAdapterComplex Event ProcessorSinkEvent typesEvent objects are instances of event typesImplemented as JavaBeans, Maps or “Tuples”Graphical visualization and editing of Event Processing Network (EPN) through Eclipse
Event Processing with Oracle CEPCQL Source EditingSyntax HighlightingValidationQuery templates
Event Processing with IBM WebSphere Business EventEmpower Business Users to define and procatively manage business events
AgendaIntroduction to EventsEvent ProcessingEvent Delivery NetworkEvents meet Services (SOA/BPM)Events and BPMSummary
Event Delivery Network (EDN)Provides an abstract mediation layer for event publishing and deliveryGoal: Decrease coupling between producer and consumersSource: Oracle
Capabilities of EDNEvent DefinitionDefined using a neutral language such as Event Definition Language (EDL)Publish-subscribe abstractionDetails totally abstracted from consumers and producersRoutingRouted to interested parties using defined rulesDeclarative specificationEvents and rules specified in a declarative mannerRich semanticsRich subscription semantics allow flexibilitySubscription granularitySubscriptions can be based on namespaces, event names and contentImplementation abstractionTotally abstracted from the users of the EDN (JMS, Database)
Event Delivery Network in Oracle SOA platformPATTERNDETECTIONBUSINESSVISIBILITYMANAGEMONITORDESIGNSECUREJDEVPOLICYMANAGEREMBAMCEPBPEL /BPMNBUSINESS RULESHUMAN WORKFLOWORCHESTRATESERVICE BUS / MEDIATOREVENT DELIVERY NETWORK (EDN) DATA INTEGRATORINTEGRATEVIRTUALIZEREG/REPEVENTSSERVICESERPMAINFRAMEPARTNERSDBSource: OracleAdapters & B2B
AgendaIntroduction to EventsEvent ProcessingEvent Delivery NetworkEvents meet Services (SOA/BPM)Events and BPMSummary
Events meet ServicesUsing Events to increase decoupling in your SOA!Event-Driven ServicesEvents producedby a Service
Different Typesof InteractionTime-DrivenAn agent or group of agents initiates an interaction at a specified timeRequest-DrivenA client requests a service from a serverInitiated by the client and completes when server repliesEvent-DrivenEvent Producer initiates interaction by creating an event
Customer ManagementSample ScenarioCustomer Management Application is createdNew Customer operation is implemented in BPEL orchestrating service callsOne of the service calls is informing another system (Account Management) of the new customer
Customer ManagementSample ImplementationImplementation with Oracle SOA Suite
Customer ManagementEnhancement of ScenarioAn Other system is interested when a new customer is addedOffers a service Create New CustomerTherefore the Customer Management system has to be changeda new service call has to be added to the service orchestration
Customer ManagementEnhancement ImplementationImplementation with Oracle SOA Suite
Customer ManagementEvaluation of enhancementNew interested parties can only be added through changing the Customer Management systemResources need to be coordinatedDifficult if the responsibilities for those systems are differentEach new system will be a source for new errorsSystem will be less reliableAdaption has to be handledby Customer ManagementHas to bechanged!!
Customer ManagementScenario: Using Event insteadInstead of the Customer Management system having to inform each interested party, it just signals an “New Customer” eventAll interested party subscribe at the EDN and get informed, when such an event has been signaled
Customer ManagementImplementation with EventsImplementation using Business Events (EDN)
Customer ManagementImplementation with Events
Customer ManagementImplementation with EventsXML schemadefinespayloadEvent Definition Language (EDL) definesevent
Customer ManagementImplementation with EventsUsing BPEL invokeactivitytopublishtheevent
Customer ManagementImplementation with EventsMediator could also publishevents
Customer ManagementImplementation with EventsMediator with „Subscribe to Events“
Customer ManagementImplementation with Events
Customer ManagementImplementation with EventsFilter on eventpayloadusingXpathexpression
Customer ManagementEvaluation of “Using Events instead”Customer Management is decoupled from other systemsNo longer dependent on the availabilityPotential new interested parties can be introduced without having to change the Customer Management systemSeparation of Concerns => Transformation done when consuming eventDecoupling
Customer ManagementScenario Event with not enough infoTo reduce overhead, you might only want to pass minimal information with an eventNot the complete customer like shown beforeSubscriber can use any service offered to enrich the eventSimilar to Claim Check Pattern with messaging“Inversion of Control”
Event-Driven SOA (ED-SOA)Decoupling on Domain Level
Event-Driven SOA (ED-SOA)Decoupling on Domain LevelApplication Landscape organized through domains
Event-Driven improves agilityEvent-Driven systems are more agile than request-driven systems because they are minimally coupledWhen a reply to the transaction originator is required, a request-driven approach should be usedInserting request-driven service		Inserting event-driven service
Capture Events at the point of greatest valueRequirements determine which source of event data are most relevant
AgendaIntroduction to EventsEvent ProcessingEvent Delivery NetworkEvents meet Services (SOA/BPM)Events and BPMSummary
Event-Drivenand BPMBusiness Processes always involve business events in a general senseNot event-driven in every aspectNot EDA for all interactionsMost processes are a mix of event-, request- and time-driven interactions
Using CEP with BPM
Order Fulfillment Process – Event vs. Request-DrivenEvent-DrivenRequest-Driven
AgendaIntroduction to EventsEvent ProcessingEvent Delivery NetworkEvents meet Services (SOA/BPM)Events and BPMSummary
Summary: EDA, BPM and BAMSource: Oracle
EDN, CEP and BAM – the event-driven enterpriseEDA delivers real-time event processing for monitoring, analyzing, and acting on business process optimization
Thanks a lot!Q & A

Guido schmutz-jax2011-event-driven soa

  • 1.
    Event-Driven SOA: Eventsmeet ServicesGuido Schmutz (guido.schmutz@trivadis.com)Senior Architect/Technology ManagerTrivadis AG
  • 2.
    Guido SchmutzWorking forTrivadis for more than 14 yearsOracle ACE Director for Fusion Middleware and SOACo-Author of different booksConsultant, Trainer Software Architect for Java, Oracle, SOA and EDAMember of Trivadis Architecture BoardTrivadis Technology ManagerMore than 20 years of software development experienceContact: guido.schmutz@trivadis.comBlog: http://guidoschmutz.wordpress.com
  • 3.
    Trivadis facts &figuresSwiss IT consulting company11 locationswithmorethan 550 employeesFinancially independent and sustainably profitableKey figures 2009Revenue CHF 100 / EUR 66 mio.Services for more than 650 clients in over 1‘600 projectsOver 160 Service Level AgreementsMore than 5'000 training participantsResearch and development budget: CHF 5.0 / EUR 3.3 mio.
  • 4.
  • 5.
    AgendaIntroduction to EventsEventProcessingEvent Delivery NetworkEvents meet ServicesEvents and BPMSummary
  • 6.
    Whatis an Event?AnEvent is a significant (in the sense that it may affect some action), atomic (happens completely or not at all) occurrence (e.g. fact becoming true, a state transition) in the reality.Events may represent various things:Update of a databaseState of Change in a process/workflowReported ProblemAnticipated ProblemAny “business situation” raised by an application
  • 7.
    “Event-Driven”EventsEventsThings that happenor changeBusiness EventsEvents that are meaningful in a business contextEvent ObjectsDiscrete report of eventsEvent-DrivenThe behaviour of an entity that acts when it recognizes an eventEDAArchitectural style in which one or more components are event-driven and minimally coupledOtherEventsBusinessEventsEvent objectsEvent-drivenEDA
  • 8.
    Event TypesOrdinary Eventscommonnon-critical eventsTypically generated intermittentlyNotable EventsImportant and need to be acted uponTypically occur at low volumeStream EventsContinuous stream of eventsMay not be significant individually but part of a critical patternTransactional EventsImportant events generated through business transactionsCould be high volume without necessarily having a correlation patternSource: Oracle
  • 9.
    Event MetamodelStandardize structurefor events across enterpriseSimplifies event integrationEvents generally have to major partsHeaderBodySimilar to a Web Service (SOAP) message but there is no official standard yet
  • 10.
    How does anEvent look like?
  • 11.
    EDA Simplified ConceptualViewBasic conceptlarge number of inbound events and messages are captured and processed to produce a smaller number of outbound eventsSource: Oracle
  • 12.
    EDA High LevelConceptual ViewSource: Oracle
  • 13.
    5 Principles ofan EDAReports current eventsNotification reports a discrete occurrence as it happensPushes notificationsPushed by the event producer, not pulled by the event consumerRespond immediatelyConsumer reacts immediately after it recognizes the eventCommunicates one-wayNotification is “fire-and-forget” type of communicationIs free of commandsNotification is a report, not a specific request or commandDoes not prescribe the action the event consumer will perform
  • 14.
    When vs. WhatWhenEventProcessing(CEP, SEP)WhatSOA / BPM
  • 15.
    AgendaIntroduction to EventsEventProcessingEvent Delivery NetworkEvents meet SOA/BPMEvents and BPMSummary
  • 16.
    Event ProcessingEvents atsources are rarely directly actionableNot significant enough for the business to react and take meaningful actionEspecially true for streaming and high volume eventsEvent processing is the manipulation of eventsthrough the application of business rules to identify actionableThreadsOpportunitiesAnomalies
  • 17.
    Building blocks ofEvent Processing
  • 18.
    3 Typesof EventProcessingRelativity can be causaltemporal, spatial or otherSource: Oracle
  • 19.
  • 20.
  • 21.
  • 22.
    Complex Event Processing(CEP)ComplexEventProcessorEvent SourceFiltering; Temporal and causality constraintsValidateAggregation; event-data joinEnrichTransformCreate “complex event”Intelligent routing; content-based routing; event-driven flowsRouteOperateService invocation; alert; dynamic flowsEvent ConsumerSource: IBM
  • 23.
    Complex Event Processingvs. Traditional Analysis
  • 24.
    Fundamental CEP DesignPatternFilteringIn-memory cachingAggregation over windowsDatabase lookupsDatabase WritesCorrelation (Joins)Event pattern matchingState machinesHierarchical EventsDynamic QueriesSource: http://www.coral8.com/system/files/assets/pdf/Coral8DesignPatterns.pdf
  • 25.
    Event Processing Network(EPN)Event processing needs several processing steps intermingled with user logicEvents are filteredEvents are derivedRequires the components (event processors, channels) to be connected in a network fashion=> EPNSource: Oracle
  • 26.
    Event Processing withOracle CEPOracle CEP – Constructs & Visual ToolingEvent-driven componentsAdapterComplex Event ProcessorSinkEvent typesEvent objects are instances of event typesImplemented as JavaBeans, Maps or “Tuples”Graphical visualization and editing of Event Processing Network (EPN) through Eclipse
  • 27.
    Event Processing withOracle CEPCQL Source EditingSyntax HighlightingValidationQuery templates
  • 28.
    Event Processing withIBM WebSphere Business EventEmpower Business Users to define and procatively manage business events
  • 29.
    AgendaIntroduction to EventsEventProcessingEvent Delivery NetworkEvents meet Services (SOA/BPM)Events and BPMSummary
  • 30.
    Event Delivery Network(EDN)Provides an abstract mediation layer for event publishing and deliveryGoal: Decrease coupling between producer and consumersSource: Oracle
  • 31.
    Capabilities of EDNEventDefinitionDefined using a neutral language such as Event Definition Language (EDL)Publish-subscribe abstractionDetails totally abstracted from consumers and producersRoutingRouted to interested parties using defined rulesDeclarative specificationEvents and rules specified in a declarative mannerRich semanticsRich subscription semantics allow flexibilitySubscription granularitySubscriptions can be based on namespaces, event names and contentImplementation abstractionTotally abstracted from the users of the EDN (JMS, Database)
  • 32.
    Event Delivery Networkin Oracle SOA platformPATTERNDETECTIONBUSINESSVISIBILITYMANAGEMONITORDESIGNSECUREJDEVPOLICYMANAGEREMBAMCEPBPEL /BPMNBUSINESS RULESHUMAN WORKFLOWORCHESTRATESERVICE BUS / MEDIATOREVENT DELIVERY NETWORK (EDN) DATA INTEGRATORINTEGRATEVIRTUALIZEREG/REPEVENTSSERVICESERPMAINFRAMEPARTNERSDBSource: OracleAdapters & B2B
  • 33.
    AgendaIntroduction to EventsEventProcessingEvent Delivery NetworkEvents meet Services (SOA/BPM)Events and BPMSummary
  • 34.
    Events meet ServicesUsingEvents to increase decoupling in your SOA!Event-Driven ServicesEvents producedby a Service
  • 35.
    Different Typesof InteractionTime-DrivenAnagent or group of agents initiates an interaction at a specified timeRequest-DrivenA client requests a service from a serverInitiated by the client and completes when server repliesEvent-DrivenEvent Producer initiates interaction by creating an event
  • 36.
    Customer ManagementSample ScenarioCustomerManagement Application is createdNew Customer operation is implemented in BPEL orchestrating service callsOne of the service calls is informing another system (Account Management) of the new customer
  • 37.
  • 38.
    Customer ManagementEnhancement ofScenarioAn Other system is interested when a new customer is addedOffers a service Create New CustomerTherefore the Customer Management system has to be changeda new service call has to be added to the service orchestration
  • 39.
  • 40.
    Customer ManagementEvaluation ofenhancementNew interested parties can only be added through changing the Customer Management systemResources need to be coordinatedDifficult if the responsibilities for those systems are differentEach new system will be a source for new errorsSystem will be less reliableAdaption has to be handledby Customer ManagementHas to bechanged!!
  • 41.
    Customer ManagementScenario: UsingEvent insteadInstead of the Customer Management system having to inform each interested party, it just signals an “New Customer” eventAll interested party subscribe at the EDN and get informed, when such an event has been signaled
  • 42.
    Customer ManagementImplementation withEventsImplementation using Business Events (EDN)
  • 43.
  • 44.
    Customer ManagementImplementation withEventsXML schemadefinespayloadEvent Definition Language (EDL) definesevent
  • 45.
    Customer ManagementImplementation withEventsUsing BPEL invokeactivitytopublishtheevent
  • 46.
    Customer ManagementImplementation withEventsMediator could also publishevents
  • 47.
    Customer ManagementImplementation withEventsMediator with „Subscribe to Events“
  • 48.
  • 49.
    Customer ManagementImplementation withEventsFilter on eventpayloadusingXpathexpression
  • 50.
    Customer ManagementEvaluation of“Using Events instead”Customer Management is decoupled from other systemsNo longer dependent on the availabilityPotential new interested parties can be introduced without having to change the Customer Management systemSeparation of Concerns => Transformation done when consuming eventDecoupling
  • 51.
    Customer ManagementScenario Eventwith not enough infoTo reduce overhead, you might only want to pass minimal information with an eventNot the complete customer like shown beforeSubscriber can use any service offered to enrich the eventSimilar to Claim Check Pattern with messaging“Inversion of Control”
  • 52.
  • 53.
    Event-Driven SOA (ED-SOA)Decouplingon Domain LevelApplication Landscape organized through domains
  • 54.
    Event-Driven improves agilityEvent-Drivensystems are more agile than request-driven systems because they are minimally coupledWhen a reply to the transaction originator is required, a request-driven approach should be usedInserting request-driven service Inserting event-driven service
  • 55.
    Capture Events atthe point of greatest valueRequirements determine which source of event data are most relevant
  • 56.
    AgendaIntroduction to EventsEventProcessingEvent Delivery NetworkEvents meet Services (SOA/BPM)Events and BPMSummary
  • 57.
    Event-Drivenand BPMBusiness Processesalways involve business events in a general senseNot event-driven in every aspectNot EDA for all interactionsMost processes are a mix of event-, request- and time-driven interactions
  • 58.
  • 59.
    Order Fulfillment Process– Event vs. Request-DrivenEvent-DrivenRequest-Driven
  • 60.
    AgendaIntroduction to EventsEventProcessingEvent Delivery NetworkEvents meet Services (SOA/BPM)Events and BPMSummary
  • 61.
    Summary: EDA, BPMand BAMSource: Oracle
  • 62.
    EDN, CEP andBAM – the event-driven enterpriseEDA delivers real-time event processing for monitoring, analyzing, and acting on business process optimization
  • 63.