|
| 1 | += Event-Driven Architecture |
| 2 | +:categories: software-architecture |
| 3 | +:roles: software-architect, software-developer, devops-engineer |
| 4 | +:proponents: Gregor Hohpe, Bobby Woolf, Martin Fowler |
| 5 | +:related: domain-driven-design, hexagonal-architecture, clean-architecture |
| 6 | +:tags: eda, events, async, messaging, publish-subscribe, decoupling, eventual-consistency |
| 7 | + |
| 8 | +[%collapsible] |
| 9 | +==== |
| 10 | +Also known as:: EDA, Message-Driven Architecture |
| 11 | + |
| 12 | +[discrete] |
| 13 | +== *Core Concepts*: |
| 14 | + |
| 15 | +Event producers and consumers:: Components communicate by emitting and reacting to events rather than direct calls |
| 16 | + |
| 17 | +Publish-subscribe:: Producers publish events without knowing which consumers will process them |
| 18 | + |
| 19 | +Asynchronous decoupling:: Sender and receiver operate independently in time; no blocking request-response |
| 20 | + |
| 21 | +Message queue:: Intermediary that buffers events between producers and consumers (SQS, RabbitMQ, Kafka) |
| 22 | + |
| 23 | +At-least-once delivery:: Most messaging systems guarantee delivery but may deliver duplicates, requiring idempotent consumers |
| 24 | + |
| 25 | +Eventual consistency:: System state converges over time rather than being immediately consistent after each operation |
| 26 | + |
| 27 | +Event notification:: Lightweight event signals that something happened; consumers decide whether to act |
| 28 | + |
| 29 | +Event-carried state transfer:: Events carry enough data for consumers to process without calling back to the producer |
| 30 | + |
| 31 | +Choreography vs. orchestration:: Events can trigger distributed workflows implicitly (choreography) or via a central coordinator (orchestration) |
| 32 | + |
| 33 | + |
| 34 | +Key Proponents:: Gregor Hohpe, Bobby Woolf ("Enterprise Integration Patterns", 2003), Martin Fowler ("What do you mean by Event-Driven?", 2017) |
| 35 | + |
| 36 | +[discrete] |
| 37 | +== *When to Use*: |
| 38 | + |
| 39 | +* Systems requiring loose coupling between components |
| 40 | +* Workloads with asynchronous processing pipelines |
| 41 | +* Architectures that need independent scaling of producers and consumers |
| 42 | +* Distributed systems where components must evolve independently |
| 43 | + |
| 44 | +[discrete] |
| 45 | +== *Related Anchors*: |
| 46 | + |
| 47 | +* <<domain-driven-design,Domain-Driven Design>> - Domain events are a DDD building block |
| 48 | +* <<hexagonal-architecture,Hexagonal Architecture>> - Message queues as driven adapters |
| 49 | +* <<clean-architecture,Clean Architecture>> - Events cross architectural boundaries via interfaces |
| 50 | +==== |
0 commit comments