Event-Driven Architecture ⚑
Also known as: EDA
System organized around production, detection, and reaction to events.
Event-Driven Architecture organizes system components around the production, detection, and reaction to events — discrete records of something that has happened in the system or its environment. Components communicate by emitting events to a shared infrastructure (event bus, message broker, log) rather than calling each other directly, with consumers subscribing to event types they care about. The architecture was articulated as a distinct style by Brenda Michelson and others in the mid-2000s, building on earlier publish-subscribe and message-oriented middleware traditions. Two principal patterns within EDA: Event Notification (lightweight 'something happened' messages where consumers fetch additional data if needed) and Event-Carried State Transfer (events carry the full state needed for downstream consumers to operate independently). Event Sourcing is a related but distinct pattern in which events are also the canonical record of system state. Modern event-driven systems are commonly built on Apache Kafka, AWS Kinesis, RabbitMQ, or cloud-provider event services, and EDA has substantially shaped microservices integration patterns.
Core components
- Event (immutable record of something that happened)
- Event producer
- Event consumer (subscriber)
- Event broker / bus / log
- Patterns: Event Notification, Event-Carried State Transfer, Event Sourcing, CQRS combination
- Topic-based, type-based, content-based subscription models
- Asynchronous decoupled communication
- At-least-once, at-most-once, exactly-once delivery semantics
Primary use case
Microservices integration and decoupling; real-time data processing pipelines; reactive systems; integration with legacy systems; foundation for modern data engineering (Kafka-centric architectures); event-sourced systems; CQRS implementations; complex event processing.
Common criticisms
- Eventual consistency complicates reasoning about system state across components
- debugging is harder than in synchronous systems — distributed tracing is essential and often inadequate
- ordering and exactly-once delivery guarantees are subtle and frequently violated in implementation
- schema evolution across event versions is a persistent operational challenge
- can produce 'distributed monolith' if events become tightly coupled to consumer expectations
- the rebuild-state-from-events promise of event sourcing is real but operationally challenging at scale
- team responsibility for events crossing service boundaries is often unclear, leading to coordination overhead.
Lineage
- Siblings
- CQRS, Event Sourcing, Domain-Driven Design, Microservices