Skip to content
Ameen Abozaid
Planned lessonMID-003-L06

Demo: parallelizing the price-feed import

  • Lesson 6 of 7
  • Mid-level
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

speed up the supplier price import; prepares MID-003-LAB1.

Draft outline details

Step by step

  1. Show the sequential import of five suppliers (each about 300 ms): about 1.5 s.
  2. Wrap each import in a Callable; submit to a fixed pool of 5.
  3. Collect with Future.get(timeout); gather successes and failures into a report.
  4. Measure again: wall clock near the slowest supplier.
  5. Planned mistake: forget shutdown() and watch the app not exit. Fix: shutdown plus awaitTermination in finally (or try-with-resources on newer JDKs; verify version before recording).
  6. Print the report: imported, failed, timed out.

Practice

Apply this lesson with the module's lab, exercises and quiz.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Continue to next lesson

Type to search levels, phases, modules and lessons.