+ All Categories
Home > Technology > Event-Driven Architecture (EDA)

Event-Driven Architecture (EDA)

Date post: 16-Apr-2017
Category:
Upload: wso2-inc
View: 2,979 times
Download: 0 times
Share this document with a friend
42
September 2015 Event Driven Architecture Shiroshica Kulatilake Solutions Architect
Transcript

September 2015

Event Driven Architecture

Shiroshica KulatilakeSolutions Architect

Agenda

• What’s Event Driven Architecture ?

• Why Event Driven Architecture ?

• How Event Driven Architecture can be done in the enterprise ?

• How WSO2 supports Event Driven Architecture

Event Driven Architecture

Scenario : Health Care System

Scenario : Health Care System

Typical happenings

• A new patient registration

• Patient data update

• Patient payment

• Start a laboratory test

• Availability of laboratory results for a patient

• Revocation of insurance policy

• Drug outage

• etc …

Generalized View

Event Driven Architecture

Main Components of EDA

Main Components

• Event - entity depicting something which happened

• Event generator - entity which creates and pushes the event

• Event channel - medium where the event lies before consumption

• Event consumer - entity which consumes the event from the channel

Event• An event is a piece of information that may be applicable to

one or more objects at a given time • An event would be

- self contained- unique- time relevant

• An event will propose- a problem- an opportunity- a threshold- a deviation, to its consumer

• Resulting action due to the occurrence of an event could be- invocation of a service- triggering a business process- publishing of another event

Event Generators, Consumers & Channel• Event Generators

- publish events in the form of messages- have no idea who would consume the message- have no idea about the consequence of the messages

generated

• Event Consumers- subscribe to published events - handles events in an asynchronous manner- oblivious to other consumers

• Event Channel- acts as the mediator - handles subscriptions - handles storage and delivery

What is Event Driven Architecture

• It’s a way of building solutions based on the generation, reception, processing and sending of events

• Events flow between decoupled services and components- Generators and Consumers are oblivious to each other

• Used for building extensible complex distributed systems which are governed by asynchronous events

- There is no command and control structure

- No request and response mechanisms

What EDP brings to an Architecture

• Event hierarchies and fine grainedness

• Self describing nature of the event payload

• No special packing for each receiver

• Multiple receivers for a single event

• Responsibility of handling state is with the consumer

• Anonymity when sending an event

• Real time sending of events

• Async nature of delivery

• Guaranteed delivery

What EDP removes from an Architecture• Co-ordination

• Pre-planned continuity

• Global context with the latest status

• These only work where - the individual executions are fast- Actions only happen in a pre-defined order which

does not change frequently- There is a fixed number of parties involved which the

primary orchestrator knows of

EDA in the Enterprise

Non-EDA based Health Care System

Non-EDA Enterprise Integration

• Collection of Loosely coupled modules

• Enterprise Service Bus to manage the various point to point integrations

• Business Process Server to do process flows

• Application servers to host the various services

• Central process handling- via ESB- via the BPS

Zooming on the centralized core

Predictive Behaviour

LinearProcess Flow

Centralized Control

Request Response Based

Loosely Coupled

What would EDA bring in

• Looser coupled flows

• Messages are self contained and follow a hierarchy which helps to subscribe at the correct level

• No time is lost between occurrence and sending of the event

• Asynchronous nature of event delivery

• Guaranteed delivery makes things more reliable

• Multiple event and multiple event stream processing

Why should an enterprise use EDA

• Enhances the ability to easily plug in more modules as either event generators or consumers

• Asynchronous nature brings in the ability to design solutions at run time by getting rid of linear flows

• Brings in the ability for reactive behaviour which suits situations which need quick reactions

• Can add in more dimensions like monitoring, event processing for overall system health as well as for functionality purposes

• Capability to replay events if needed to either simulate, when state needs to be recreated etc.

EDA based Enterprise System

Service Bus

Message Broker Mediation Bus

End Service Business Process Service Bus

Application

Event Management

It’s not a silver bullet ...

• There will be less build-time validation

• EDA creates rapidly evolving solutions - too rapid ?- how to keep track of ?- how to debug ?

• Need of additional tools to figure out how things work- Visualization tools needed for debugging - Simulation tools needed for testing

EDA with WSO2 products

Components in an EDA setting

Components in an EDA setting

• Message Broker- supports the various event based messaging patterns - Queues/ Topics etc for pub/sub and P2P- supports reliable message delivery

• Mediation / Service Bus- brings together the different parties- generates new events when needed- can interact with non event based systems- for business agility event messages would go through ESBs- when it enters the ESB then would go through EIPs

• Business Process server- deal with business flows that are triggered when an event occurs- graphical editor to create the process

Messaging with WSO2 ESB

Messaging with WSO2 ESB

Components in an EDA setting

• Data Services Server- create a service abstraction which can be used for events which

need to interact with data

• Registry- provides the configuration repository

• Identity and Access Manager- Authentication, authorization and handling fine grained access

control

Components in an EDA setting

• Activity Monitor- for monitoring of all activity that goes around- end to end business message flow monitoring- identifying, collecting and tracing business transactions- deriving KPIs from these stats- taking decisions on these

• Complex Event Processor- for multiple event and multiple event stream processing- to go through event sequences and then detecting special events

(threats, opportunities, action points)- for creating events as results- for creating alerts- for pattern detection which could be used for other purposes

Integrating with WSO2 DAS

Integrating with WSO2 CEP

EDA Reference Architecture - L0

EDA Reference Architecture - L1

EDA in Action

EDA based Health Care Scenario

EDA for Health Care with WSO2

FAQs

FAQ

• Is EDA pushing away SOA ?- No, it still supports loose couple of services but

promotes more run time application definition, with asynchronous components which act in a reactive manner - It complements SOA

• Is EDA different to MOM ?- EDA uses Message Oriented Middleware

infrastructure as the foundation

• Where does EIP stand with EDA ?- The Enterprise Integration Patterns is about patterns

to integrate enterprise systems. Messaging is one and the concepts in messaging are used in EDA

EIP - Messaging Patterns

Connect the WorldConnect the World


Recommended