Distributed

Lesson 07.3

Search as a derived, eventually consistent view

Search results come from a copy of inventory and prices that lags behind the source of truth, so what search shows may already be sold or repriced; booking must recheck the source.

The search list is a copy that updates a little later

Ava and Ben work at a small inn. The website's search list is a copy of the computer's room numbers that catches up a little after each change. Ben sells the last Double room at the front desk; Ava's phone guest searches just after.

In this lesson you'll

  1. 1Follow one run and learn how to read the picture
  2. 2Predict what changes before revealing the result
  3. 3Put Ava's search inside the out-of-date stretch, and keep the booking safe