Channel Manager
Multi-tenant booking sync system
The Problem
Hotels needed to keep room availability in sync across multiple booking platforms. Stale data meant double-bookings and lost revenue.
What I Built
GraphQL API with MongoDB as the primary store. Cron-based sync jobs that poll external OTAs and reconcile availability. Multi-tenant data isolation through compound indexes. Chose embedded documents for rate plans (read-heavy) but references for bookings (write-heavy) to match access patterns.
The Hard Part
Race conditions during concurrent booking updates from multiple sources. Used MongoDB's version field for optimistic concurrency — if two updates conflict, the later one retries instead of silently overwriting. Also had to make sync jobs idempotent so a failure mid-run could resume from a checkpoint.