Demo: fan-out to three services with a deadline
On This Lesson 3 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
aggregate product, stock, and reviews with a deadline; prepares MID-006-LAB1.
Draft outline details
Step by step
- Create three simulated clients with delays 100, 150, and 400 ms using a dedicated
ioPool. - Start all three, combine with
thenCombine; measure total about 400 ms, not 650. - Make reviews fail; add
exceptionallyfor an empty list and adegradedflag. - Add
completeOnTimeoutof 300 ms for reviews; show partial results. - Planned mistake: call
.join()inside athenApplyon the common pool, then run many requests and watch throughput stall. Fix: compose futures (thenCombine/thenCompose) and join only at the end. - Print timings per scenario.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.