Skip to content

Stage 3 of 5 · Decide

Reserve the driver before sending the offer

Two match workers can process different ride requests at the same time and both see the same driver as available. A push provider can also retry an offer after a timeout, even though the first copy was delivered.

System so far· 2 parts
CLIENTRider appCLIENTDriver app

Select a component to see what it is responsible for and which state it owns.

What you need to know

  1. A read followed by a write is not an exclusive claim. The reservation must be atomic with the state transition that creates the offer. Give each offer an ID and expiry, and make a driver's reply conditional on that exact ID and current trip version.

Your turn

Write at least 60 characters (0 so far). Write it as you would say it in a design review. You will compare it against the points a strong answer makes.