One accept holds the ride

What does this piece decide?

Nearby chauffeurs on Sevenco see the same request. Accept locks the ride row. The second call comes back with the ride taken.

Nearby chauffeurs see the same request. If both accepts succeed, one of them is driving toward a rider who already has a chauffeur.

The lock is the ride row

Accept locks the ride. It still has to be waiting, with no chauffeur on it. The driver has to be online, and not already on a trip. The second call comes back with the ride taken. That same write stores a 4-digit OTP and opens a masked number for the call. The mask closes when the trip settles.

Two accepts. One row. The second call finds the ride taken.

Every later step takes the same lock

Arrive, the OTP, the photos, start, a stop, drop, collect, complete, and cancel each lock the ride before they write. Going online locks the driver row. The phone can tap twice. The database keeps a single status. Go-online and accept also pass a gate: app version, a booking pause, a critical alert, and the phone's location. The app shows the block it was given.

New requests arrive only while the chauffeur is online and has no active trip. The channel carries trips that are still waiting. A poll covers an event the channel missed. A decline is remembered for that session and cleared when they go offline.

The shift after the accept — the fare, the cash, the payout — is in the Sevenco Driver case study.

Put the idea to work

Turn clear thinking into a production decision.

Bring the product, platform, or operating constraint. We’ll help make the next move concrete.