MENU

Fun & Interesting

What's an Event Driven System?

Gaurav Sen 335,065 7 years ago
Video Not Working? Fix It Now

Event Driven Systems pass and persist events. They have evolved from the publisher-subscriber model, and the design has some advantages. Events are immutable and can be replayed to allow the systems to take snapshots of their behavior. This allows services to 'self heal' as explained in the video. A lot of transaction issues are alleviated once idempotency and retrial logic is added to a system. The system can retry messages an infinite number of times to the recipient till there is a message acceptance and acknowledgment from the receiver. Event-driven systems are closely related to event sources and CQRS. Greg Young and Martin Fowler have been talking about these systems for a while. Events are persisted in something like a message queue, and hence the responsibility for retrial and persistence is moved to it. These abstractions enable the programmer to focus on the business logic of a system and add subscribers to events with minimum coupling with other services. Decoupling the system is one of the advantages of event-driven systems. One major disadvantage of this system is that it is difficult to reason about the flow of a request. Services can independently register for an event and consume it without the publisher being aware of it. We talk about different applications using an event-driven architecture such as Git and Gaming Systems. We then discuss the advantages and disadvantages of such an architecture (Event Sourcing). Code: https://github.com/coding-parrot/Low-Level-Design/tree/master/distributed-event-bus Looking to ace your next interview? Try this System Design video course! 🔥 https://interviewready.io 00:00 Event-Driven Systems 01:17 Examples of EDA 03:42 Features 04:09 Advantages 04:19 Availability 06:14 Roll back 06:50 Replacements 07:30 Transactions 09:00 Drawbacks 12:32 When should you use it? 14:24 Real World Examples 14:40 Thank you! References: Martin Fowler: https://www.youtube.com/watch?v=STKCRSUsyP0 Martin Fowler Blog: https://martinfowler.com/articles/201701-event-driven.html Wikipedia: https://en.wikipedia.org/wiki/Event-driven_architecture Chris Richardson: http://microservices.io/patterns/data/event-driven-architecture.html (I will be talking about this soon! ) You can find me at: https://www.facebook.com/gkcs0/ https://www.quora.com/profile/Gaurav-Sen-6 https://www.linkedin.com/in/gaurav-sen-56b6a941/

Comment