What is it?
Explaining first what it is not should help.
Most programmers start out building simple programs/websites/apps with a straight forward request/response flow.
Something like this, probably with a bit more layers:
sequenceDiagram actor User participant Cart participant Database User->>Cart: Put in cart Cart->>Database: Save in table Database-->>Cart: List of items in cart + 1 Cart-->>User: Page + list of items in cart
Very straightforward, and in this flow the user waits in some form for the response to come back.
… to be continued…
What patterns are often used when applying an event-driven architecture?
Saga pattern
This paragraph seems to align with Event-Carried State Transfer, see below.
Event Notification vs Event-Carried State Transfer
When do we prefer one over the other?
- I should read this: https://medium.com/swlh/event-notification-vs-event-carried-state-transfer-2e4fdf8f6662
- Event-Carried State Transfer ! event-carried state transfer is more complex but can definitely be a good way to increase reliability and decrease coupling of separate services. - Storage is cheap.
Related:
Source(s):