Why traditional scheduling is broken
Most apps check availability in code before booking. If two clients click "book" at the exact same millisecond, both succeed, causing embarrassing double-bookings.
Postgres Compatible
Built on SQL constraints. Instead of flaky app checks, we run a single, atomic database update query.
AWS Aurora DSQL
A multi-region serverless SQL engine that distributes transactions globally with strict ACID properties.
Guaranteed Checkout
Accept security deposits via integrated mock credit card checkout. Lock the slot only upon successful deposit.
How DSQL physically guarantees 100% lock safety
SlotLock uses a database-level unique constraint on `(business_id, start_time)` when a slot is booked. Even if two transactions run simultaneously across opposite sides of the planet, AWS Aurora DSQL coordinates consensus synchronously, allowing exactly one query to update the slot while raising a constraint violation error for the other.
// Atomic transaction query
UPDATE
slots
SET
status = 'booked',
customer_name = $1,
customer_contact = $2
WHERE
id = $3
AND
status = 'open';