SlideShare a Scribd company logo
EVENT DRIVEN
ARCHITECTURE
       Chris Patterson
Senior Architect, RelayHealth

    chris@phatboyg.com
EVENT DRIVEN
ARCHITECTURE




           Chris Patterson
    Senior Architect, RelayHealth
Agenda

Review Enterprise Application Integration
Introduce Event Driven Architecture
Deļ¬ne Events
.NET sample using MassTransit
About Me

Enterprise Software Architect
20+ years in commercial software development
11+ years at a Fortune 15 company
Proven history with distributed, real-time systems
Microsoft Visual C# MVP
ENTERPRISE APPLICATION
    INTEGRATION
ENTERPRISE APPLICATION
    INTEGRATION

Linking applications in an organization together to
    simplify and automate business processes
Shared Database

Multiple applications coupled to single schema
Unclear ownership of schema
Edges between applications blurred
Linked servers for SQL to SQL RPC
Changes often aļ¬€ect multiple applications
File Transfer
Extract - Transform - Load (ETL)
Asynchronous
Simple interoperability through common formats
Timeliness of data can lead to inconsistencies
Large data volume containing unrelated data
Ownership of ļ¬les, cleanup, versioning
Web Services
Explicit Contract (WSDL, DataContract)
Synchronous Operation leads to sequencing
Services must be available at invocation
Nested call stacks fragile, consume resources
Remote Procedure Call (RPC, COM, CORBA)
The network is unreliable
MESSAGING
Message Exchange

Create      Process



Send        Receive
A-Synchronicity

Message producers are non-blocking
  Fire and forget
Message consumers run in their own process
Introduces a more complex programming model
Minimized Coupling


Eliminates temporal coupling
Enables isolated testing of services
Reduces dependencies, increasing service reuse
Explicit Contract

Agreement between producer and consumer
Internal data structure remains private
Integration points remain at the applicationā€™s edge
Eliminates propagation of internal changes
Fault Tolerance


Messages improve recoverability
Durable message transports
Data Availability


Enables small, frequent transfers of related content
Distribute system load over a wider time window
EVENT DRIVEN
ARCHITECTURE
EVENT DRIVEN
       ARCHITECTURE
A method of building enterprise systems in which events
   ļ¬‚ow between decoupled components and services
Another Architecture?

Service Oriented   Event Driven
  Architecture     Architecture
Service Oriented   Event Driven
  Architecture     Architecture




    Complimentary
Service Oriented   Event Driven
  Architecture     Architecture




    Complimentary
SOA 1.0

Applications are composed using a designer
Synchronous programming model
Step-by-step (F10) ļ¬‚ow through services
Majority of interactions are request/response
Event Driven Architecture

Components are assembled at run-time
Asynchronous programming model
Reactive behavior
Leverages one way, ļ¬re and forget, messaging
Autonomous Components

Deļ¬ned by responsibility
Independent
Self-governing - makes decisions on how to react
Self-controlling - responsible for execution context
Self-contained - not part of an application
Event Producers


Publish events
Oblivious to consumer reactions
Unaļ¬€ected by high number of consumers
Event Consumers


React to events
Subscribe by topic/type/selector
Asynchronous operation
Business Components


Logical grouping of autonomous components
Represent a complete business process
COMMANDS
Commands

Tell a component or service to do something
Initiated by an event, interaction, etc.
Use correlation for tracing, idempotence
Sent using messaging (not published)
Reset Password


User initiates a password reset
Password service sends reset email
User clicks link in email
Message Body

public class ResetPassword
{
  public Guid RequestId { get; set; }
  public string Username { get; set; }
}
Compared To...

public void ResetPassword(string username)




  public class ResetPassword
  {
    public Guid RequestId { get; set; }
    public string Username { get; set; }
  }
EVENTS
EVENTS

Represent a change in state
Self Contained

A pure and complete representation of a speciļ¬c event
Time relevant, not time sensitive
Avoid references to internal data
Reduces dependencies, loosens coupling
Identiļ¬ed



Each event should have its own unique identiļ¬er
Related


Related events should share a common identiļ¬er
  Allows event tracing (the new F11)
  Assists in combining events into processes
Observed


Events are published as messages
Multiple components can subscribe to the same event
EVENT TYPES
Business Events
Map to real world events that occur in business


Item Added to Cart
Invoice Received
Order Shipped
Payment Requested
Lifecycle Events
Notiļ¬cations related to the life of a state or process


  Preparing Shipment / Shipment Prepared
  Authorizing Payment / Payment Authorization
  Complete
  Session Started / Session Completed
Management Events
Relate events to time, ranges, limits


Timely Service Guarantee Exceeded
  Your order within ļ¬ve minutes, or itā€™s free
Popular Item Notiļ¬cation
  Items with a 5x increase in sales in an hour
MassTransit Key Points

Lightweight Service Bus Implementation
Loose coupling via publish/subscribe
Active Service Pattern
Supports MSMQ, ActiveMQ, TIBCO EMS
Open Source, Apache 2.0 License
ā€œEVENT DRIVEN
ARCHITECTURE IS...
programming without a call stack.ā€
     -Gregor Hohpe, Google
Testing


Individual components testable in isolation
Fully unit-testable using mocks and stubs
Test-ļ¬rst development helps improve data contract
Logging


Thorough logging with correlation information
Log level conļ¬gurable at runtime
Visualization Tools


Present code-based logic in a visual form
Aid in identifying composition problems
Should be viewable on operational systems
FOR MORE
INFORMATION
Reading Material
Reading Material
Reading Material
Reading Material
Reading Material
Reading Material
Reading Material
Web Sites

MassTransit.GoogleCode.com
 Topshelf.GoogleCode.com
 Magnum.GoogleCode.com
CONTACT ME
      Chris@PhatBoyG.com
http://PhatBoyG.LosTechies.com
       twitter: @PhatBoyG
   voice: text ā€œcmpā€ to 50500

More Related Content

What's hot

Event Driven Architecture (EDA) Reference Architecture | Anbu Krishnaswamy
Event Driven Architecture (EDA) Reference Architecture | Anbu KrishnaswamyEvent Driven Architecture (EDA) Reference Architecture | Anbu Krishnaswamy
Event Driven Architecture (EDA) Reference Architecture | Anbu Krishnaswamy
Bob Rhubart
Ā 
Test Automation Tool for SAP S4HANA Cloud.pptx
Test Automation Tool for SAP S4HANA Cloud.pptxTest Automation Tool for SAP S4HANA Cloud.pptx
Test Automation Tool for SAP S4HANA Cloud.pptx
SreeGe1
Ā 
Apache Kafka in the Telco Industry (OSS, BSS, OTT, IMS, NFV, Middleware, Main...
Apache Kafka in the Telco Industry (OSS, BSS, OTT, IMS, NFV, Middleware, Main...Apache Kafka in the Telco Industry (OSS, BSS, OTT, IMS, NFV, Middleware, Main...
Apache Kafka in the Telco Industry (OSS, BSS, OTT, IMS, NFV, Middleware, Main...
Kai WƤhner
Ā 

What's hot (20)

Event-Driven Transformation in Banking and FSI
Event-Driven Transformation in Banking and FSIEvent-Driven Transformation in Banking and FSI
Event-Driven Transformation in Banking and FSI
Ā 
Event Driven Architecture (EDA) Reference Architecture
Event Driven Architecture (EDA) Reference ArchitectureEvent Driven Architecture (EDA) Reference Architecture
Event Driven Architecture (EDA) Reference Architecture
Ā 
Event Driven Architecture
Event Driven ArchitectureEvent Driven Architecture
Event Driven Architecture
Ā 
Introduction to Event-Driven Architecture
Introduction to Event-Driven Architecture Introduction to Event-Driven Architecture
Introduction to Event-Driven Architecture
Ā 
Introduction to Event Driven Architecture
Introduction to Event Driven ArchitectureIntroduction to Event Driven Architecture
Introduction to Event Driven Architecture
Ā 
Event Driven Architecture (EDA) Reference Architecture | Anbu Krishnaswamy
Event Driven Architecture (EDA) Reference Architecture | Anbu KrishnaswamyEvent Driven Architecture (EDA) Reference Architecture | Anbu Krishnaswamy
Event Driven Architecture (EDA) Reference Architecture | Anbu Krishnaswamy
Ā 
Confluentģ™€ ķ•Øź»˜ Data in Motion ģ‹¤ķ˜„
Confluentģ™€ ķ•Øź»˜ Data in Motion ģ‹¤ķ˜„Confluentģ™€ ķ•Øź»˜ Data in Motion ģ‹¤ķ˜„
Confluentģ™€ ķ•Øź»˜ Data in Motion ģ‹¤ķ˜„
Ā 
Event-Driven Architecture (EDA)
Event-Driven Architecture (EDA)Event-Driven Architecture (EDA)
Event-Driven Architecture (EDA)
Ā 
Micro Service Architectureģ˜ ģ“ķ•“
Micro Service Architectureģ˜ ģ“ķ•“Micro Service Architectureģ˜ ģ“ķ•“
Micro Service Architectureģ˜ ģ“ķ•“
Ā 
Introducing Confluent Cloud: Apache Kafka as a Service
Introducing Confluent Cloud: Apache Kafka as a Service Introducing Confluent Cloud: Apache Kafka as a Service
Introducing Confluent Cloud: Apache Kafka as a Service
Ā 
ķ“ė¼ģš°ė“œ ė„¤ģ“ķ‹°ėøŒė„¼ ģœ„ķ•œ Confluent Cloud
ķ“ė¼ģš°ė“œ ė„¤ģ“ķ‹°ėøŒė„¼ ģœ„ķ•œ Confluent Cloudķ“ė¼ģš°ė“œ ė„¤ģ“ķ‹°ėøŒė„¼ ģœ„ķ•œ Confluent Cloud
ķ“ė¼ģš°ė“œ ė„¤ģ“ķ‹°ėøŒė„¼ ģœ„ķ•œ Confluent Cloud
Ā 
Test Automation Tool for SAP S4HANA Cloud.pptx
Test Automation Tool for SAP S4HANA Cloud.pptxTest Automation Tool for SAP S4HANA Cloud.pptx
Test Automation Tool for SAP S4HANA Cloud.pptx
Ā 
Oracle Integration Cloud Service (ICS) best practices learned from the field
Oracle Integration Cloud Service (ICS) best practices learned from the fieldOracle Integration Cloud Service (ICS) best practices learned from the field
Oracle Integration Cloud Service (ICS) best practices learned from the field
Ā 
AWS 12ģ›” ģ›Øė¹„ė‚˜ ā”‚ķ“ė¼ģš°ė“œ ė§ˆģ“ź·øė ˆģ“ģ…˜ģ„ ķ†µķ•œ ģ„±ź³µģ‚¬ė”€
AWS 12ģ›” ģ›Øė¹„ė‚˜ ā”‚ķ“ė¼ģš°ė“œ ė§ˆģ“ź·øė ˆģ“ģ…˜ģ„ ķ†µķ•œ ģ„±ź³µģ‚¬ė”€AWS 12ģ›” ģ›Øė¹„ė‚˜ ā”‚ķ“ė¼ģš°ė“œ ė§ˆģ“ź·øė ˆģ“ģ…˜ģ„ ķ†µķ•œ ģ„±ź³µģ‚¬ė”€
AWS 12ģ›” ģ›Øė¹„ė‚˜ ā”‚ķ“ė¼ģš°ė“œ ė§ˆģ“ź·øė ˆģ“ģ…˜ģ„ ķ†µķ•œ ģ„±ź³µģ‚¬ė”€
Ā 
Apache Kafka in the Telco Industry (OSS, BSS, OTT, IMS, NFV, Middleware, Main...
Apache Kafka in the Telco Industry (OSS, BSS, OTT, IMS, NFV, Middleware, Main...Apache Kafka in the Telco Industry (OSS, BSS, OTT, IMS, NFV, Middleware, Main...
Apache Kafka in the Telco Industry (OSS, BSS, OTT, IMS, NFV, Middleware, Main...
Ā 
Event streaming: A paradigm shift in enterprise software architecture
Event streaming: A paradigm shift in enterprise software architectureEvent streaming: A paradigm shift in enterprise software architecture
Event streaming: A paradigm shift in enterprise software architecture
Ā 
Digital integration hub: Why, what and how?
Digital integration hub: Why, what and how?Digital integration hub: Why, what and how?
Digital integration hub: Why, what and how?
Ā 
Whats New in Integration What's New in IBM Integration Bus and IIB on Cloud
Whats New in Integration What's New in IBM Integration Bus and IIB on Cloud Whats New in Integration What's New in IBM Integration Bus and IIB on Cloud
Whats New in Integration What's New in IBM Integration Bus and IIB on Cloud
Ā 
Cloud native application ģž…ė¬ø
Cloud native application ģž…ė¬øCloud native application ģž…ė¬ø
Cloud native application ģž…ė¬ø
Ā 
Case study of amazon EC2 by Akash Badone
Case study of amazon EC2 by Akash BadoneCase study of amazon EC2 by Akash Badone
Case study of amazon EC2 by Akash Badone
Ā 

Similar to Event Driven Architecture

The New Enterprise Alphabet - .Net, XML And XBRL
The New Enterprise Alphabet - .Net, XML And XBRLThe New Enterprise Alphabet - .Net, XML And XBRL
The New Enterprise Alphabet - .Net, XML And XBRL
Jorgen Thelin
Ā 
RailswayCon 2010 - Command Your Domain
RailswayCon 2010 - Command Your DomainRailswayCon 2010 - Command Your Domain
RailswayCon 2010 - Command Your Domain
Lourens NaudƩ
Ā 
BPM & Workflow in the New Enterprise Architecture
BPM & Workflow in the New Enterprise ArchitectureBPM & Workflow in the New Enterprise Architecture
BPM & Workflow in the New Enterprise Architecture
Nathaniel Palmer
Ā 
BPM & Workflow in the New Enterprise Architecture
BPM & Workflow in the New Enterprise ArchitectureBPM & Workflow in the New Enterprise Architecture
BPM & Workflow in the New Enterprise Architecture
Nathaniel Palmer
Ā 

Similar to Event Driven Architecture (20)

Event Driven Architecture at NDDNUG
Event Driven Architecture at NDDNUGEvent Driven Architecture at NDDNUG
Event Driven Architecture at NDDNUG
Ā 
Guido schmutz-jax2011-event-driven soa
Guido schmutz-jax2011-event-driven soaGuido schmutz-jax2011-event-driven soa
Guido schmutz-jax2011-event-driven soa
Ā 
The New Enterprise Alphabet - .Net, XML And XBRL
The New Enterprise Alphabet - .Net, XML And XBRLThe New Enterprise Alphabet - .Net, XML And XBRL
The New Enterprise Alphabet - .Net, XML And XBRL
Ā 
Three SOA Case Studies
Three SOA Case StudiesThree SOA Case Studies
Three SOA Case Studies
Ā 
TechDays 2010 Portugal - Event Driven Architectures - 16x9
TechDays 2010 Portugal - Event Driven Architectures - 16x9TechDays 2010 Portugal - Event Driven Architectures - 16x9
TechDays 2010 Portugal - Event Driven Architectures - 16x9
Ā 
Rolando Sandoval Win Fx The Real Thing
Rolando Sandoval   Win Fx The Real ThingRolando Sandoval   Win Fx The Real Thing
Rolando Sandoval Win Fx The Real Thing
Ā 
Mashups and Business Process Management in SOA
Mashups and Business Process Management in SOAMashups and Business Process Management in SOA
Mashups and Business Process Management in SOA
Ā 
How to Approach Tool Integrations
How to Approach Tool IntegrationsHow to Approach Tool Integrations
How to Approach Tool Integrations
Ā 
Oracle 10g Application Server
Oracle 10g Application ServerOracle 10g Application Server
Oracle 10g Application Server
Ā 
Soa & Bpel
Soa & BpelSoa & Bpel
Soa & Bpel
Ā 
Soa & Bpel
Soa & BpelSoa & Bpel
Soa & Bpel
Ā 
Can IBM i play with SOA?
Can IBM i play with SOA?Can IBM i play with SOA?
Can IBM i play with SOA?
Ā 
Eda on the azure services platform
Eda on the azure services platformEda on the azure services platform
Eda on the azure services platform
Ā 
ISV Integrations
ISV IntegrationsISV Integrations
ISV Integrations
Ā 
ISV Integrations
ISV IntegrationsISV Integrations
ISV Integrations
Ā 
Dh Government
Dh GovernmentDh Government
Dh Government
Ā 
Replicate Salesforce Data in Real Time with Change Data Capture
Replicate Salesforce Data in Real Time with Change Data CaptureReplicate Salesforce Data in Real Time with Change Data Capture
Replicate Salesforce Data in Real Time with Change Data Capture
Ā 
RailswayCon 2010 - Command Your Domain
RailswayCon 2010 - Command Your DomainRailswayCon 2010 - Command Your Domain
RailswayCon 2010 - Command Your Domain
Ā 
BPM & Workflow in the New Enterprise Architecture
BPM & Workflow in the New Enterprise ArchitectureBPM & Workflow in the New Enterprise Architecture
BPM & Workflow in the New Enterprise Architecture
Ā 
BPM & Workflow in the New Enterprise Architecture
BPM & Workflow in the New Enterprise ArchitectureBPM & Workflow in the New Enterprise Architecture
BPM & Workflow in the New Enterprise Architecture
Ā 

Recently uploaded

Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
Ā 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
Ā 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
Ā 

Recently uploaded (20)

IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
Ā 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Ā 
AI revolution and Salesforce, JiÅ™Ć­ KarpĆ­Å”ek
AI revolution and Salesforce, JiÅ™Ć­ KarpĆ­Å”ekAI revolution and Salesforce, JiÅ™Ć­ KarpĆ­Å”ek
AI revolution and Salesforce, JiÅ™Ć­ KarpĆ­Å”ek
Ā 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
Ā 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Ā 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Ā 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Ā 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Ā 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Ā 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Ā 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Ā 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Ā 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Ā 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
Ā 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
Ā 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
Ā 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
Ā 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Ā 
Agentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdfAgentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdf
Ā 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
Ā 

Event Driven Architecture

Editor's Notes

  1. Soft real time systems