Event-Driven Architecture Flashcards
1
Q
What is an event?
A
An event represents the availability of information. Basically, something happened. Examples: user_created and user_updated.
2
Q
When should we use events?
A
1 - To decouple components
2 - To perform async tasks
3 - To keep track of state changes (audit log)
3
Q
What is an Event Listener?
A
Event Listeners react to only one event and can have multiple methods reacting to it.
4
Q
What is an Event Subscriber?
A
Event Subscribers react to multiple events and have multiple methods reacting to them.
5
Q
What are the types of event patterns?
A
- Event Notification
- Event-Carried State Transfer
- Event-Sourcing