0
0
Microservicessystem_design~20 mins

Bounded context mapping in Microservices - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Bounded Context Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Bounded Context Relationships

In microservices architecture, bounded contexts define clear boundaries for domain models. Which of the following best describes the Shared Kernel relationship between two bounded contexts?

AOne bounded context copies data from another asynchronously without coordination.
BOne bounded context completely depends on another and cannot function without it.
CBounded contexts are completely independent with no shared code or data.
DTwo teams share a small subset of the domain model and collaborate closely on it.
Attempts:
2 left
💡 Hint

Think about when two teams need to work together on a small part of the domain.

Architecture
intermediate
2:00remaining
Choosing the Right Integration Pattern

You have two bounded contexts: Order Management and Inventory. The Order Management context needs to know when inventory levels change but should not block its operations waiting for Inventory. Which integration pattern fits best?

AShared Database where both contexts read and write the same tables.
BDirect synchronous REST API calls from Order Management to Inventory.
CEvent-Driven Integration where Inventory publishes events asynchronously.
DBatch data export from Inventory to Order Management once a day.
Attempts:
2 left
💡 Hint

Consider loose coupling and asynchronous communication.

scaling
advanced
2:30remaining
Scaling Bounded Contexts Independently

You have two bounded contexts: Payments and Notifications. Payments have high traffic during sales, but Notifications have steady low traffic. What is the best approach to scale these contexts?

ADeploy each bounded context as separate microservices and scale them independently.
BDeploy both contexts on the same server and scale the server vertically.
CCombine both contexts into one service to simplify scaling.
DUse a shared database to balance load between contexts.
Attempts:
2 left
💡 Hint

Think about independent scaling and resource optimization.

tradeoff
advanced
2:30remaining
Tradeoffs in Context Mapping: Customer-Supplier vs. Conformist

Between two bounded contexts, Billing and Customer Support, Billing is the authoritative source of customer data. Customer Support must use Billing's data but cannot change it. Which relationship fits best and what is a key tradeoff?

AConformist: Customer Support depends on Billing's model and must adapt to its changes.
BCustomer-Supplier: Customer Support can modify Billing's data freely, risking inconsistency.
CShared Kernel: Both share and co-own the customer data model equally.
DSeparate Ways: Both contexts maintain independent customer data without coordination.
Attempts:
2 left
💡 Hint

Consider who controls the data and who must adapt.

estimation
expert
3:00remaining
Estimating Data Consistency Delay in Eventual Consistency

In a microservices system with bounded contexts communicating via asynchronous events, the Inventory service publishes stock updates. The Order service consumes these events to update availability. If Inventory publishes 1000 events per second and network latency plus processing adds 200ms delay per event, estimate the maximum delay before Order sees the latest stock update.

AAt least 1 second, due to event batching and processing overhead.
B200 milliseconds, because each event is processed immediately after network delay.
C200 seconds, because 1000 events per second cause a backlog of 200ms each.
DCannot estimate without knowing Order service processing speed.
Attempts:
2 left
💡 Hint

Focus on per-event delay, not total event volume backlog.