Event Driven Architecture Flashcards

1
Q

Event Driven Architecture (EDA)

A

Services asynchronously publish events that are consumed by other interested services.

  1. Each service has it’s own event bus/queue and manages it’s own state which is persisted
  2. Each services annotates events specific to it’s own needs by either adding/removing fields from the event when it is persisted.
  3. Each service can retains & persist information in the event that was given it by the sending service.

https://www.youtube.com/watch?v=rJHTK2TfZ1I

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Advantages of Event Driven Architecture

A
  1. Very helpful when you need to evaluate parallel events in time (gaming headshot).
  2. Persisted event state makes it easy to recover event history as well as replace services by simply replaying the events into the new service.
  3. Having event data from the sending service means it does not need to re-request the event from the sending service.
  4. Highly available due to advantage 2
  5. it provides a transactional guarantee, at least 1 and at most 1 (can retry sending events if a service doesn’t receive it).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Disadvantages of Event Driven Architecture

A
  1. Data consistency due to changes in state from sending service after events have been sent to receiving services.
  2. Can’t replace edge services that are dependant on external services because you can’t guarantee that services state by replaying the events even when storing timestamps.
  3. Less control than request response particularly with regard to timing, event priority and the service that the events go to (i.e. you may not want to send an event to a particular service for security reasons).
  4. Only 3 ways to get to specific event in the history (1 replay from start, 2 diff based, 2 undo events) this is not always ideal.
  5. Difficult to understand the flow of the system past 1 service.
  6. Difficult to change or migrate away from to anything that doesn’t understand events (i.e. request response services).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are examples of technology that uses event driven architecture?

A

Git, React, Node.js

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly