0
0
Microservicessystem_design~20 mins

Event types (domain, integration, notification) in Microservices - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Event Types Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Identify the primary purpose of domain events
In a microservices architecture, what is the main role of domain events?
ATo notify external systems about changes in business state
BTo synchronize databases across different microservices
CTo communicate changes within the same bounded context or service
DTo trigger user interface updates directly
Attempts:
2 left
💡 Hint
Think about events that represent changes inside a single service's business logic.
Architecture
intermediate
2:00remaining
Choose the correct event type for cross-service communication
Which event type is best suited for notifying other microservices about a change that happened in one service?
ADomain event
BIntegration event
CNotification event
DCommand event
Attempts:
2 left
💡 Hint
This event type is designed to share information between different services.
scaling
advanced
2:30remaining
Scaling notification events for user alerts
You have a notification event system that sends alerts to users. What is the best approach to scale this system when user count grows rapidly?
AUse a message queue to asynchronously process notification events and send alerts
BSend notifications synchronously within the main service processing user actions
CStore notifications in the database and send them only when users log in
DSend notifications directly from the database triggers
Attempts:
2 left
💡 Hint
Think about decoupling notification sending from main user action processing.
tradeoff
advanced
2:30remaining
Tradeoffs between domain and integration events
What is a key tradeoff when choosing between domain events and integration events in microservices?
AIntegration events are synchronous, domain events are always asynchronous
BIntegration events require tight coupling between services, domain events do not
CDomain events are easier to version but harder to scale across services
DDomain events are internal and simpler but do not notify other services, integration events enable cross-service communication but add complexity
Attempts:
2 left
💡 Hint
Consider scope and complexity of each event type.
estimation
expert
3:00remaining
Estimate event throughput for a notification system
A notification system sends notification events to 1 million users daily. Each user receives on average 3 notifications per day. What is the approximate average event throughput per second the system must handle?
AAbout 35 events per second
BAbout 120 events per second
CAbout 120,000 events per second
DAbout 35,000 events per second
Attempts:
2 left
💡 Hint
Calculate total events per day, then divide by seconds in a day (86400).