Event Driven Architecture:
Solutionfor the Real-time
Era
What happens when your system has to process millions of transactions per
second, from multiple distributed data sources?
Amidst the explosion of data from IoT, mobile applications, and customers,
the need for real-time processing and system scalability becomes urgent.
Event Driven Architecture (EDA) emerges to address these challenges.
Page 2
What is EventDriven Architecture?
An event-driven architecture consists of event producers that generate a stream of events, event consumers that listen for these
events, and event channels that transfer events from producers to consumers.
Event Producers
The component that generates events.
Event Consumers
The component that processes events.
Broker
An intermediary platform for transmitting events.
Event
Page 3
An action or state changes
Pub/Sub Model
Page 7
Real-timeevent delivery.
Events are delivered immediately to all active subscribers as
soon as they are published by the producer, enabling real-
time responsiveness
Events are not durable once
received.
Once an event is delivered to a subscriber, it is not stored in
the messaging system, meaning there is no persistent record
of past events.
No replay for past events
If a consumer fails to receive or process an event in real time,
there is no mechanism to retrieve or replay it from the system.
New subscribers miss earlier events.
Subscribers that join after an event has been published will
not receive that event, as it has already been sent and
discarded.
7.
Event Streaming Model
Page7
Supports event replay.
Events are stored durably in a log, allowing consumers to replay past events as
needed for reprocessing or recovery.
Clients can join anytime.
New consumers can start reading from the stream at any point in time,
regardless of when the events were originally published.
Each client maintains its own position in the
stream.
Consumers are responsible for tracking their own offsets in the stream, enabling
independent processing without affecting others.
Ideal for long-term data processing and analytics.
The persistent, ordered event log makes this model well-suited for scenarios
like auditing, machine learning, and building reliable data pipelines
Core Principles ofEDA
Event-Centric
Events are central, representing actions or state changes, helping the system
react quickly.
Loose Coupling
Components are independent, not directly dependent on each other,
increasing fault tolerance and ease of maintenance.
Asynchronous
Asynchronous processing, increasing performance and reducing latency,
especially for high-traffic systems.
Scalability
Easily scalable as event volume increases, helping the system respond to
continuous growth.
Page 5
Orchestration
10.
Core Principles ofEDA
Event-Centric
Events are central, representing actions or state changes, helping the system
react quickly.
Loose Coupling
Components are independent, not directly dependent on each other,
increasing fault tolerance and ease of maintenance.
Asynchronous
Asynchronous processing, increasing performance and reducing latency,
especially for high-traffic systems.
Scalability
Easily scalable as event volume increases, helping the system respond to
continuous growth.
Page 5
11.
Advantages and Disadvantagesof EDA
Advantages
Scalability
Easily scalable with high traffic.
Flexibility
Adding/removing components does not affect the system.
Real-time
Responds quickly to events.
Fault Tolerance
Independent components reduce the impact of failures.
Disadvantages
Complexity
Difficult to deploy and monitor distributed systems.
Debugging Difficulty
Asynchronous event flow causes difficulties.
Cost
Requires infrastructure investment for Broker and Event Store.
Data Challenges
Ensuring consistency in a distributed environment.
Page 7
12.
When to use
Multiplesubsystems must process the same events.
Real-time processing with minimum time lag is
required.
Complex event processing, such as pattern matching or aggregation
over time windows, is required.
High volume and high velocity of data is required, as with, for example,
IoT.
Page 7
13.
EDA in Practice
E-commerce
Instantorder processing, notifications,
and inventory updates. E.g., Shopee
processes orders, sends notifications, and
updates inventory.
Digital Banking
Real-time fraud detection and transaction
processing. E.g., a transfer immediately
triggers a fraud check.
IoT & Data Platforms
Processing data from IoT devices. E.g., a
temperature sensor sends alerts or
triggers automatic adjustments.
Page 8
EDA: Should WeAdopt It?
EDA is a powerful solution for systems requiring high throughput, real-time
data processing, and scalability. However, it demands a capable technical
team and a willingness to invest in infrastructure.
Recommendation
Dive deeper into tools like Kafka, thoroughly evaluate your
project's actual needs, and consider testing EDA in a small project
before large-scale deployment.
EDA: Architecture for the Real-
time Future.
Page 9
16.
Core Components ofEDA
Event Store
Consumer
Broker
Producer
Event
Example: In e-commerce, when a customer places an order (Event), the user application (Producer) sends this event to Kafka
(Broker). The warehouse system (Consumer) receives and processes the notification, and the event is simultaneously saved to the
Event Store for later analysis.
Page 6