Skip to content

Instantly share code, notes, and snippets.

@biomousavi
Last active October 5, 2024 06:44
Show Gist options
  • Save biomousavi/4b059c874cac95562d2a09d646d29c02 to your computer and use it in GitHub Desktop.
Save biomousavi/4b059c874cac95562d2a09d646d29c02 to your computer and use it in GitHub Desktop.
What is Event-Driven Architecture (EDA) ?

What is Event-Driven Architecture (EDA) ?

Event-Driven Architecture (EDA) is a design approach where systems react to events or changes in state.

Why EDA ?

  • Enables systems to process events asynchronously.
  • Allows systems to share information without being aware of each other.
  • Makes it easier to increase number of services to handle increased workloads.
  • Improves decoupling and independence between services.
  • Resilient and flexible microservices.

When EDA ?

  • When you need to process data asynchronously
    • Email Notification
    • Media Processing
    • Log processing
    • Real-Time Analytics
  • When we need to have a scalable system
    • Eventual consistency across data
    • No need to know the details or protocols of other services.
    • Loosely coupled components

EDA Components

Events

Events are immutable and mostly lightweight information about the state change.

Key Notes:
  1. Immutability: Once an event is created, it cannot be changed.

  2. Lightweight: Events are usually designed to be small in size, containing just enough information (usually a payload) to describe a change in state or an action that occurred.

  3. Event Sourcing: Events are often used as a source of truth, meaning the state of the system can be reconstructed by replaying a sequence of events.

  4. Durability: Events are often persisted in a durable event log, ensuring they are not lost even in case of system failures.

Resources

IBM AWS developer.ibm.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment