Skip to main content

2 posts tagged with "Node.js"

View All Tags

How to Inject Environment Variables During Build in GitHub Actions

· 12 min read
Anand Raja
Senior Software Engineer

When deploying applications with GitHub Actions, you often need to inject environment variables during the build process. These variables might include API keys, database URLs, feature flags, or configuration settings. GitHub provides a secure way to manage and inject these values into your build pipeline using GitHub Variables and GitHub Secrets.

Concurrency Control in Seat Booking: Complete Guide

· 8 min read
Anand Raja
Senior Software Engineer

When multiple users try to book the same seat simultaneously, we need concurrency control mechanisms to ensure only one user succeeds. Let me explain each approach step by step.

The Core Problem

Timeline of Concurrent Requests:
T1: User A checks seat C1 → Available ✅
T2: User B checks seat C1 → Available ✅
T3: User C checks seat C1 → Available ✅
T4: User A books seat C1 → Success
T5: User B books seat C1 → Success (PROBLEM!)
T6: User C books seat C1 → Success (PROBLEM!)

Result: Triple booking without concurrency control