SlideShare ist ein Scribd-Unternehmen logo
1 von 59
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
Define 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 affect 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 files, 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
   flow 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) flow 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, fire and forget, messaging
Autonomous Components

Defined 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
Unaffected 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 specific event
Time relevant, not time sensitive
Avoid references to internal data
Reduces dependencies, loosens coupling
Identified



Each event should have its own unique identifier
Related


Related events should share a common identifier
  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
Notifications 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 five minutes, or it’s free
Popular Item Notification
  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-first development helps improve data contract
Logging


Thorough logging with correlation information
Log level configurable 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

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (20)

Introduction to Event-Driven Architecture
Introduction to Event-Driven Architecture Introduction to Event-Driven Architecture
Introduction to Event-Driven Architecture
 
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 (EDA)
Event-Driven Architecture (EDA)Event-Driven Architecture (EDA)
Event-Driven Architecture (EDA)
 
Event Driven Software Architecture Pattern
Event Driven Software Architecture PatternEvent Driven Software Architecture Pattern
Event Driven Software Architecture Pattern
 
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
 
Axon Framework, Exploring CQRS and Event Sourcing Architecture
Axon Framework, Exploring CQRS and Event Sourcing ArchitectureAxon Framework, Exploring CQRS and Event Sourcing Architecture
Axon Framework, Exploring CQRS and Event Sourcing Architecture
 
Event-driven microservices
Event-driven microservicesEvent-driven microservices
Event-driven microservices
 
Scaling a Core Banking Engine Using Apache Kafka | Peter Dudbridge, Thought M...
Scaling a Core Banking Engine Using Apache Kafka | Peter Dudbridge, Thought M...Scaling a Core Banking Engine Using Apache Kafka | Peter Dudbridge, Thought M...
Scaling a Core Banking Engine Using Apache Kafka | Peter Dudbridge, Thought M...
 
Building Event Driven (Micro)services with Apache Kafka
Building Event Driven (Micro)services with Apache KafkaBuilding Event Driven (Micro)services with Apache Kafka
Building Event Driven (Micro)services with Apache Kafka
 
SOA Service Oriented Architecture
SOA Service Oriented ArchitectureSOA Service Oriented Architecture
SOA Service Oriented Architecture
 
Event Driven Microservices architecture
Event Driven Microservices architectureEvent Driven Microservices architecture
Event Driven Microservices architecture
 
Introduction à mule esb
Introduction à mule esbIntroduction à mule esb
Introduction à mule esb
 
대용량 분산 아키텍쳐 설계 #4. soa 아키텍쳐
대용량 분산 아키텍쳐 설계 #4. soa 아키텍쳐대용량 분산 아키텍쳐 설계 #4. soa 아키텍쳐
대용량 분산 아키텍쳐 설계 #4. soa 아키텍쳐
 
Domain Driven Design & Hexagonal Architecture
Domain Driven Design & Hexagonal ArchitectureDomain Driven Design & Hexagonal Architecture
Domain Driven Design & Hexagonal Architecture
 
CQRS and Event Sourcing, An Alternative Architecture for DDD
CQRS and Event Sourcing, An Alternative Architecture for DDDCQRS and Event Sourcing, An Alternative Architecture for DDD
CQRS and Event Sourcing, An Alternative Architecture for DDD
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
SaaS Testing Overview - Foundation
SaaS Testing Overview - FoundationSaaS Testing Overview - Foundation
SaaS Testing Overview - Foundation
 
Introduction to SOA
Introduction to SOAIntroduction to SOA
Introduction to SOA
 
4. 대용량 아키텍쳐 설계 패턴
4. 대용량 아키텍쳐 설계 패턴4. 대용량 아키텍쳐 설계 패턴
4. 대용량 아키텍쳐 설계 패턴
 
CQRS + Event Sourcing
CQRS + Event SourcingCQRS + Event Sourcing
CQRS + Event Sourcing
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Kürzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 

Event Driven Architecture

Hinweis der Redaktion

  1. Soft real time systems