PMS Price Engine — Architecture

PMS Price Engine — Architecture An architecture diagram generated by Archify. mock-pm-app · synthetic PM traffic · Architecture component mock-pm-app synthetic PM traffic PostgreSQL · bookings, costs, contracts · Architecture component PostgreSQL bookings, costs, contracts Kafka · event bus · Architecture component Kafka event bus Pricing Job · per-decision, no windows · Architecture component · PyFlink 2.3 Pricing Job per-decision, no windows PyFlink 2.3 Market Pulse Job · 3× 5-min tumbling windows · Architecture component · watermarks + dedup + Async I/O Market Pulse Job 3× 5-min tumbling windows watermarks + dedup + Async I/O market-ingestor · synthetic snapshots · Architecture component market-ingestor synthetic snapshots Kinesis · market events · Architecture component Kinesis market events kinesis-kafka-bridge · republishes onto Kafka · Architecture component kinesis-kafka-bridge republishes onto Kafka DynamoDB · price_decision + 3 metrics · Architecture component DynamoDB price_decision + 3 metrics lakehouse-consumer · Streams → Iceberg · Architecture component lakehouse-consumer Streams → Iceberg Iceberg on S3 · cold-path lakehouse · Architecture component Iceberg on S3 cold-path lakehouse Streamlit Dashboard · hot path + cold path · Architecture component Streamlit Dashboard hot path + cold path dbt / DuckDB · marts every 15 min · Architecture component dbt / DuckDB marts every 15 min writes Debezium CDC consumes topics market-price-bridge, booking-events publishes consumes republishes put_item price_decision put_item (3 windows) Async I/O GetItem DynamoDB Streams merge writes iceberg_scan cold path hot path (Query) Legend Frontend Backend Database Cloud Message bus

CDC pipeline

  • • mock-pm-app seeds Postgres with synthetic PM traffic
  • • Debezium turns every row change into a Kafka event, no dual writes

Market ingestion

  • • market-ingestor publishes to Kinesis
  • • A dedicated bridge republishes onto Kafka — Flink 2.x dropped the legacy Kinesis source

Windowing (Phase 26)

  • • Market Pulse Job runs 3 independent 5-min tumbling windows: market pulse, bookings created, bookings cancelled
  • • Per-source watermarks/idleness, ValueState dedup with TTL, and an Async I/O profit lookup — none of which the Pricing Job needs

Storage & serving

  • • DynamoDB is the single writer; Iceberg is derived via its own Streams, never a second direct write
  • • Dashboard reads DynamoDB directly (hot path) and dbt/DuckDB marts (cold path)