6 min read Why Distributed Locks? A mutex works within a single process. A database row lock works within a single database. When […] Read article
6 min read Core Entities Order: order_id, customer_id, restaurant_id, driver_id, items[], total_cents, status, placed_at, estimated_delivery_at. OrderStatus (state machine): PLACED -> CONFIRMED -> PREPARING […] Read article
6 min read The Problem with Distributed Transactions In a monolith with a single database, ACID transactions guarantee atomicity: either all operations succeed […] Read article
6 min read The Core Challenge A flash sale sells a limited quantity (e.g., 1000 units) at a discounted price for a short […] Read article
5 min read Core Entities Provider: provider_id, name, timezone, working_hours (JSONB: {“MON”: [“09:00″,”17:00”], …}), slot_duration_minutes (e.g., 30). Appointment: appointment_id, provider_id, client_id, start_time (UTC), […] Read article
6 min read Core Entities Content: content_id, type (TEXT, IMAGE, VIDEO), author_id, platform, raw_content / storage_url, created_at. ModerationDecision: decision_id, content_id, verdict (APPROVED, REMOVED, […] Read article
7 min read Requirements Functional: place orders (cart checkout → payment → fulfillment), track order status through lifecycle, handle partial fulfillment (items shipped […] Read article
8 min read Requirements Functional: search available rooms by date range and city, view room details and pricing, book a room (atomic reservation), […] Read article
6 min read Requirements Functional: create coupons (percent off, fixed amount, free shipping), set constraints (minimum order, expiry, usage limits, specific products/categories, single […] Read article
7 min read What Is a Distributed Task Queue? A distributed task queue decouples work producers from work executors. Producers enqueue jobs; workers […] Read article