Event-Driven Architecture (EDA)

Event-Driven Architecture or EDA is defined as an architectural pattern that uses events to maintain communication within a system. It leverages a message broken to publish and consume events asynchronously. Both producers and consumers are unaware of each other. In simple words, Event Driven Architecture is a method by which we can achieve loose coupling between services within the system.

An event is a data point to represent state changes in a system. Whenever a consumer makes a change, an event is formed. However, there is no specification as to what and how the state change should happen.

Components of Event-Driven Architecture (EDA)

The Event-Driven Architecture has three components under it. Let’s see them individually.

1. Event Producers: They produce an event for the router.

2. Event Routers: The event routers filter and push the events produced by producers to the consumers.

3. Events Consumers: They consume events to reflect the state changes in the system.

Patterns of Event-Driven Architecture (EDA)

There are numerous ways for implementing EDA in your system depending upon your use case. Let’s see some of them:

Advantages of Event-Driven Architecture (EDA)

  • Producers and Consumers are unaware of each other.
  • The system becomes highly scalable and distributed.
  • Agility is improved.
  • Guaranteed delivery
  • Adding new consumers is easy.

Challenges of Event-Driven Architecture (EDA)

  • Error Handling is difficult.
  • The system integrated with EDA is complex in general.
  • Exactly once, in-order processing of events.

Conclusion

Where the way of Event-Driven Architecture depends on the use case, there are various use cases like Metadata and Metrics, Server and Security Logs, Integrating heterogenous systems, Fanout and parallel processing, etc. In addition, we can check out some of the examples of the architecture in NATs, Apache Kafka, Amazon EventBridge, Amazon SNS, Google PubSub, etc.

I hope this article was helpful to you.

Please don’t forget to applaud this article and follow me!!!

Any kind of feedback or comment is welcome!!!

You can also subscribe to my stories via email so that you’ll get notified whenever I bring out an article on a new subject.

Thank you for your time and support!!!!

Keep Reading!! Keep Learning!!!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store