OBSERVER / PRACTICE
One order.
A changing audience.
Build a subscription system. Predict who gets an update, watch it travel, and keep the right listeners connected.
YOUR MISSION
The order keeps moving. The display doesn’t stay open.
A customer display and an activity log both need updates. When the customer closes the display, the log must keep working. Build the connection, test it, then add an audit log without rewriting the publisher.
01 / BUILD THE CONNECTION
Make three design choices.
Choose a piece, then see how it changes the broadcast.
Try your own design first. Hints and retries are unlimited.
02 / PREDICT · PUBLISH · OBSERVE
Watch the audience change.
Send one Packed event. Follow each listener’s independent reaction.
{ orderId, status }OrderTracker
Choose a broadcast0 subscriptionsSee the code behind your design TypeScript
Callbacks run synchronously in registration order. This trace replays recorded execution; it does not send real messages or model network delays.
03 / TRANSFER THE IDEA
An audit log wants updates too.
Add AuditLog as another listener. Which parts need to change?
First pass both test cases with a publisher that uses subscriptions.
Compare with a complete solution
No time limit and no attempt limit. Try another assembly, use a hint, or reveal the answer when it helps.