Skip to content
Ameen Abozaid
Planned lessonMID-030-L05

Demo: read-your-writes across services

  • Lesson 5 of 5
  • 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

reproduce a stale read after checkout and fix it. Prepares MID-030-LAB1.

Draft outline details

Step by step

  1. Place an order through orders; the catalog view of "my recent purchases" is fed by Kafka and lags by a second.
  2. Immediately call GET /my/purchases and observe the new order missing.
  3. Planned mistake: add Thread.sleep(2000) in the client. It works on a quiet laptop and fails under load. Fix: do not guess lag.
  4. Return the created order in the POST response and have the UI merge it into the list until the read model catches up.
  5. Alternative: send the order version with the read; the service waits briefly or falls back to the source of truth.

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.

Type to search levels, phases, modules and lessons.