EMBEDDED Telegram 2112
What is event-driven architecture (EDA), and how does it work?

Nikki Siapno

Quite a lot of the tasks modern-day systems are required to do are in response to changes in state.

Adding an item to a shopping cart, liking a post, and paying a bill are all state changes that trigger a set of tasks in their respective systems.

This requirement has paved the way for a popular approach to system architecture known as event-driven architecture (EDA).

Event-driven architecture has four main components:

1) Events

These are significant changes in state. For example, a user signing up to a trial might be an event in a SaaS product. They're generally immutable, typically lightweight and can carry a payload containing information about the change in state.

2) Producers

The role of a producer is to detect or cause a change in state, and then generate an event that represents this change. The change can be initiated by a variety of sources such as system processes, user interactions, and external triggers.

3) Consumers

Consumers are the entities that are interested in and react to events. They subscribe to specific types of events and execute when those events occur.

4) Channels

Meanwhile, channels facilitate sending events between producers and consumers.

Advantages of EDA:

🟢 Decoupling: producers and consumers operate independently, enhancing system flexibility and maintainability.

🟢 Scalability: EDA can efficiently handle a surge in events, making it suitable for systems with varying loads.

🟢 Real-time responsiveness: systems can react immediately to state changes, enhancing user experience and system reliability.

🟢 Resilience: failures in one component don't necessarily cascade through the system, thanks to the buffering capabilities of many channels.

Use cases:

🔸 IoT systems: devices and sensors in #IoT setups generate a plethora of events that EDA can efficiently manage.

🔸 Microservices: EDA facilitates communication between decoupled microservices, ensuring smooth system operations.

🔸 Real-time analytics: immediate processing and analysis of data as it's generated is a forte of EDA.

Disadvantages:

🔴 Complexity: tracing and debugging issues in an event-driven system can be more challenging than in traditional architectures.

🔴 Event order: ensuring events are processed in the correct sequence, especially in distributed setups, can be tricky.

🔴 Potential overhead: introducing a message broker or channel can add latency, especially if not optimized.

While EDA offers a robust framework for building dynamic, responsive systems, it's essential to consider its potential pitfalls. Like any architecture, it works best when applied thoughtfully to the right scenarios.

#systemdesign
#systemarchitecture
#IoT
@embedded



tgoop.com/embedded/2112
Create:
Last Update:

What is event-driven architecture (EDA), and how does it work?

Nikki Siapno

Quite a lot of the tasks modern-day systems are required to do are in response to changes in state.

Adding an item to a shopping cart, liking a post, and paying a bill are all state changes that trigger a set of tasks in their respective systems.

This requirement has paved the way for a popular approach to system architecture known as event-driven architecture (EDA).

Event-driven architecture has four main components:

1) Events

These are significant changes in state. For example, a user signing up to a trial might be an event in a SaaS product. They're generally immutable, typically lightweight and can carry a payload containing information about the change in state.

2) Producers

The role of a producer is to detect or cause a change in state, and then generate an event that represents this change. The change can be initiated by a variety of sources such as system processes, user interactions, and external triggers.

3) Consumers

Consumers are the entities that are interested in and react to events. They subscribe to specific types of events and execute when those events occur.

4) Channels

Meanwhile, channels facilitate sending events between producers and consumers.

Advantages of EDA:

🟢 Decoupling: producers and consumers operate independently, enhancing system flexibility and maintainability.

🟢 Scalability: EDA can efficiently handle a surge in events, making it suitable for systems with varying loads.

🟢 Real-time responsiveness: systems can react immediately to state changes, enhancing user experience and system reliability.

🟢 Resilience: failures in one component don't necessarily cascade through the system, thanks to the buffering capabilities of many channels.

Use cases:

🔸 IoT systems: devices and sensors in #IoT setups generate a plethora of events that EDA can efficiently manage.

🔸 Microservices: EDA facilitates communication between decoupled microservices, ensuring smooth system operations.

🔸 Real-time analytics: immediate processing and analysis of data as it's generated is a forte of EDA.

Disadvantages:

🔴 Complexity: tracing and debugging issues in an event-driven system can be more challenging than in traditional architectures.

🔴 Event order: ensuring events are processed in the correct sequence, especially in distributed setups, can be tricky.

🔴 Potential overhead: introducing a message broker or channel can add latency, especially if not optimized.

While EDA offers a robust framework for building dynamic, responsive systems, it's essential to consider its potential pitfalls. Like any architecture, it works best when applied thoughtfully to the right scenarios.

#systemdesign
#systemarchitecture
#IoT
@embedded

BY Embedded Academy


Share with your friend now:
tgoop.com/embedded/2112

View MORE
Open in Telegram


Telegram News

Date: |

Select “New Channel” As the broader market downturn continues, yelling online has become the crypto trader’s latest coping mechanism after the rise of Goblintown Ethereum NFTs at the end of May and beginning of June, where holders made incoherent groaning sounds and role-played as urine-loving goblin creatures in late-night Twitter Spaces. Content is editable within two days of publishing Write your hashtags in the language of your target audience. While the character limit is 255, try to fit into 200 characters. This way, users will be able to take in your text fast and efficiently. Reveal the essence of your channel and provide contact information. For example, you can add a bot name, link to your pricing plans, etc.
from us


Telegram Embedded Academy
FROM American