DevConnectDevConnect
Sign up · Log in
← back to the feed
2
showcase

Shipped: Ticket sales

Built a concurrency-safe Ticket Booking REST API using Node.js and MySQL (InnoDB) meeting all Brief B criteria: 1. Data Model & Integrity: Normalized schema with events, seats, and orders using foreign keys, CASCADE constraints, and a UNIQUE constraint on seat reservations. 2. High-Volume Inventory: Seeded 10,000+ seat records across 5 events via an automated stored procedure. 3. Sub-200ms Latency: Implemented composite index idx_event_reserved on (event_id, is_reserved); GET /events/:id/free-seats fetches 2,000 available seats in under 25 ms. 4. Concurrency & Race Condition Safe: Applied pessimistic row locking (SELECT ... FOR UPDATE) inside database transactions. Verified via parallel PowerShell background jobs showing one request succeeding (201 Created) while simultaneous conflicting attempts fail (409 Conflict). Full schema, setup commands, and execution proofs are documented in the repository README.md. Repository: https://github.com/roh155/ticket_booking Built for the Verified Backend Internship · a data model and the queries on it
Add a comment
0/2000