Parkly addresses high-density urban parking allocation using an event-driven reservation engine. By reserving parking slots in temporary Redis keys with key-expiration notifications, Parkly prevents double-booking race conditions during high-demand windows.
Concurrent Reservations & Lock Management
When a user selects a parking slot, Parkly acquires a Redis distributed lock (Redlock pattern) for 10 minutes. If payment completes via Stripe webhook verification, the slot state transitions to confirmed in the primary database; otherwise, the Redis key expires and releases the slot automatically.
