HomeCase studiesConcurrency-Safe Hotel Property Management System with Real-Time...

Case study · Vienna, Austria

Concurrency-Safe Hotel Property Management System with Real-Time Channel and Housekeeping Sync

Hospitality Property Management

Independent hotel groups managing multi-building room blocks often suffer overbookings and front-desk bottlenecks when reservation calendars, OTA channel feeds, and housekeeping boards live in disconnected tools. We architected a centralized Property Management System using Java, Spring Boot, React, and PostgreSQL to unify availability locking, dynamic rate plans, guest folios, and room-turn workflows. Optimistic locking and serialized night-audit jobs protect inventory integrity under peak booking traffic while RabbitMQ coordinates real-time channel updates.

Industry
Hospitality Property Management
Solution
A centralized multi-property hotel PMS web application and channel integration engine built with Java, Spring Boot, React, PostgreSQL, Redis, and RabbitMQ.
Platforms
Web & API
Stack
Java · Spring Boot · React · TypeScript · PostgreSQL · Redis
Location
Vienna, Austria · delivered remotely
Role
Engineering, with the team behind for mobile and QA

Delivered remotely for a business based in Vienna, Austria. Names withheld by agreement.

Project Overview

Industry: Hospitality Property Management

Solution scope: A multi-property hotel Property Management System (PMS) and channel synchronization platform engineered with Java, Spring Boot, React, TypeScript, PostgreSQL, Redis, and RabbitMQ.

Context: Historic city-center hotels and boutique multi-property groups juggle direct website reservations, corporate allotments, walk-in guests, and multiple online travel agencies (OTAs) concurrently. Legacy desktop PMS installations force receptionists to navigate modal-heavy screens, manually re-key OTA bookings, and radio housekeeping supervisors to verify whether a suite is clean. We designed a unified web-native PMS core in Java and Spring Boot paired with a keyboard-centric React tape chart, giving revenue teams, front-desk agents, and housekeeping staff a single source of room and financial truth.

Operational & Inventory Bottlenecks

Race conditions caused costly overbookings. During peak trade-fair weeks, simultaneous bookings from direct channels and external OTAs collided before legacy batch sync jobs could decrement shared room-type pools.

Rigid folio handling slowed corporate check-outs. Receptionists struggled to split room charges, municipal tourist taxes, and incidentals across corporate master invoices and personal cards without voiding entire bills.

Disconnected housekeeping delayed room turns. Paper assignment sheets left front-desk teams unaware of inspected rooms, keeping arriving guests waiting in the lobby while clean suites sat idle.

Manual night audits froze reception terminals. End-of-day tax postings and trial balance exports locked database tables for several minutes, interrupting late-night check-ins and airport shuttle arrivals.

Architectural Strategy

Enforce concurrency correctness inside PostgreSQL. Rather than trusting application-level checks alone, room allocations and date ranges are guarded by database-level constraints and transactional allotment rows so overlapping physical room assignments are mathematically impossible.

Decouple channel integrations with RabbitMQ. Reservation mutations commit immediately to PostgreSQL, while asynchronous RabbitMQ consumers translate inventory changes into per-OTA XML/JSON payloads with rate-limit pacing and retry isolation.

Model folios as append-only accounting ledgers. Instead of mutating invoice totals in place, every room night, city tax, minibar charge, refund, and routing transfer writes a signed ledger entry, guaranteeing clean financial reconciliation and auditability.

Build a fast, keyboard-first React tape chart. Front-desk teams operate under lobby pressure; virtualized grid rendering, optimistic UI previews, and live Server-Sent Events keep multi-week room calendars fluid across hundreds of rooms.

Core Capabilities

  • Interactive multi-property tape chart: Drag-and-drop room assignment, maintenance out-of-order blocks, contiguous room-move previews, and quick check-in/out drawers.
  • Two-way OTA & booking engine sync: Automated reservation ingestion, modification/cancellation reconciliation, and instant room-type availability and restriction pushes.
  • Dynamic rate & restriction matrix: Seasonal base plans, derived corporate discounts, occupancy tiers, minimum-stay constraints, and closed-to-arrival toggles.
  • Split-folio & routing engine: Automated routing of room/tax to travel agency or corporate accounts while keeping incidentals on personal payment folios.
  • Live housekeeping & inspection workflow: Attendant assignment queues by floor, priority rush-room flags, discrepancy alerts, and instant inspected status propagation.
  • Automated night audit & city-tax engine: Scheduled per-property business-date rollover, no-show processing, daily revenue postings, and ERP-ready trial-balance exports.
  • Guest profile & compliance registry: Passport/ID check-in fields, stay preference notes, and automated municipal guest-registration batch exports.

Technical Architecture

Spring Boot modular monolith core. Organized into clear domain modules—Reservation, Inventory, Pricing, Folio Ledger, Housekeeping, and Channel Adapter—the Java 21 Spring Boot backend enforces strict transaction boundaries and role-based Spring Security permissions per property.

PostgreSQL integrity & exclusion constraints. Physical room stays store PostgreSQL daterange values backed by EXCLUDE USING gist constraints, eliminating overlapping reservations for the same room number even under concurrent threads. Double-entry folio rows index cleanly by (property_id, business_date, account_code) for rapid night-audit aggregation.

RabbitMQ async messaging & Redis read cache. When a booking creates, modifies, or checks out, an outbox publisher dispatches domain events onto RabbitMQ exchanges feeding OTA channel adapters and notification workers. Redis caches pre-computed availability matrices per room category and date to serve high-throughput booking inquiries without hitting transactional tables.

React & TypeScript workspace. Built with React and TypeScript, the browser interface renders virtualized 30-day tape charts, keyboard-navigable folio editors, and a touch-friendly housekeeping view updated live over Server-Sent Events.

Flow: Front desk / OTA webhook → Spring Boot reservation & lock service → PostgreSQL (daterange & ledger) → RabbitMQ outbox & Redis cache → OTA channel adapters & React SSE boards

Technology Stack

Category Technology
Backend runtime Java 21 LTS providing deterministic concurrency, strong domain typing, and predictable memory behavior
Application framework Spring Boot orchestrating reservation workflows, folio accounting, Spring Security RBAC, and scheduled night audits
Frontend workspace React and TypeScript delivering interactive tape charts, drag-and-drop room assignment, and folio split screens
Primary database PostgreSQL storing room inventories, date-range exclusion constraints, guest folios, and immutable ledger postings
Message broker RabbitMQ decoupling outbound OTA rate/availability pushes, webhook ingestion, and housekeeping dispatch events
Distributed cache Redis holding short-lived room-type availability projections, rate parity caches, and front-desk session state
Live room updates Server-Sent Events (SSE) streaming check-in status and housekeeping room-ready transitions to reception desks
Document & fiscal export Server-side PDF folio statements, registration cards, and daily trial-balance CSV exports for ERP import
Observability Micrometer metrics, OpenTelemetry traces across OTA adapters, and dead-letter queue alerting

Engineering Trade-offs & Solutions

Challenge Solution
Unassigned room-type bookings and pre-assigned room numbers competed for the same capacity Tracked capacity via atomic daily allotment counters per room type while enforcing PostgreSQL gist date-range exclusion on assigned physical rooms.
Outbound OTA channel APIs throttled bursts during bulk seasonal rate updates Buffered rate changes through RabbitMQ topic queues with per-channel rate limiters and coalesced redundant updates for the same date window.
Receptionists moving a guest mid-stay broke historical revenue attribution Kept original stay segments immutable and recorded mid-stay upgrades as linked segment transitions with explicit rate-override audit records.
Rendering 250+ rooms across a 45-day grid caused sluggish browser scrolling Implemented row and column virtualization in React so only visible room cells mount in the DOM, keeping drag-and-drop interactions responsive.
Night audit batch postings risked clashing with late-evening check-ins Introduced a per-property logical business_date state machine so late arrivals post cleanly to the active ledger date while batch chunks execute safely.
Transient network failures dropped OTA reservation webhooks Added idempotent payload deduplication keyed by external channel confirmation ID plus dead-letter replay tooling in the admin console.

Security & Compliance

Property-scoped RBAC & PII protection. Spring Security enforces fine-grained permissions separating front-desk agents, housekeeping attendants, and finance controllers across properties, while guest passport fields and payment tokens encrypt at rest with masked UI display.

Tamper-evident financial ledger. Settled folios, manual rate overrides, complimentary nights, and credit-note reversals cannot delete prior postings; every correction generates a balancing counter-entry linked to the authorizing user ID and timestamp.

Performance & Scale

Fast availability search under burst traffic. Pre-aggregated Redis availability projections answer multi-night rate and restriction lookups quickly, falling back to PostgreSQL only on cache miss or during final reservation lock commit.

Isolated channel worker scaling. Separating RabbitMQ channel consumers from the core PMS web nodes allows operators to scale outbound sync concurrency during peak yield pushes without affecting interactive check-in latency.

Operational Outcomes

  • Eliminated double-bookings at peak occupancy: Database exclusion constraints and atomic allotment counters protect room inventory across direct and OTA channels simultaneously.
  • Faster lobby check-ins and room turnover: Live SSE housekeeping updates tell receptionists the moment a room passes inspection.
  • Audit-ready multi-folio accounting: Corporate master billing, split incidentals, and municipal city taxes reconcile cleanly every night without blocking reception workflows.
  • Centralized multi-property oversight: General managers and revenue leads adjust rates, inspect occupancy forecasts, and review channel health across all properties from one browser workspace.

01 — Questions

asked about this kind of project

How does the system guarantee zero double-bookings when an OTA webhook and front-desk agent claim the last room simultaneously?

PostgreSQL enforces physical room-night integrity through date-range exclusion constraints paired with row-level locking on room-type allotment counters inside Spring Boot @Transactional boundaries. Whichever transaction commits first wins; the competing request fails fast and triggers an automatic alternative room search or OTA allotment correction.

Why choose RabbitMQ for OTA channel synchronization instead of synchronous HTTP calls during reservation saves?

External OTA APIs exhibit unpredictable latency and strict rate limits. Committing the reservation locally in PostgreSQL and publishing an inventory-delta message to RabbitMQ keeps front-desk saves instant while workers retry outbound channel updates with exponential backoff and dead-letter monitoring.

How does the night audit handle open folios, city taxes, and date rollovers without blocking late check-ins?

Spring Boot runs night audit per property using a versioned business-date cursor rather than wall-clock midnight. Room charges and municipal taxes post idempotently per reservation night inside batch chunks, allowing front-desk staff to continue checking in late arrivals under the controlled rollover workflow.

How do housekeeping teams stay synchronized with front-desk early check-ins and late check-outs?

Every check-out, room move, or priority VIP request emits a domain event over RabbitMQ that updates the mobile-friendly React housekeeping board via Server-Sent Events. Once an attendant marks a suite inspected, reception's tape chart flips the room to ready immediately.

How are complex guest folios—such as corporate master bills with personal incidentals—modeled in PostgreSQL?

Each reservation can attach multiple routing-rule folios (for example, room and breakfast routed to a corporate account while minibar and spa post to the guest's card). All charges write as immutable double-entry ledger lines so invoices never lose audit history when splits change.

How is multi-property pricing managed across seasonal calendars and corporate negotiated rates?

Rates derive from a base rate plan plus composable restriction rules—minimum length of stay, closed-to-arrival flags, and occupancy supplements—cached in Redis by `(property_id, room_type, date)` and invalidated whenever revenue managers publish yield adjustments.

03 — Similar project?

describe what is different about yours

Build yours.

Tell me what exists, what you need and the deadline. Fixed price for a defined scope, or $55/day (8–9 hours work) with a written plan first.

Solitaire Corporate Park, Makarba, Ahmedabad, Gujarat 380015, India · IST (UTC+5:30) · --:-- IST · Mon–Fri 09:00–18:00 IST · US & EU overlap daily

No newsletter, no CRM. Just a reply.