GeoPlateFlow

Shipped

Real-Time Food Delivery Simulator

A simulator that stress-tests food delivery pipelines under chaotic peak-hour conditions.


The Problem

Testing how a delivery pipeline handles thousands of concurrent orders, moving drivers, and impatient customers in the real world is expensive. There's no safe way to stress-test routing logic, geo-validation, and priority queuing without either burning money or breaking production.

Architecture

The Solution

An event-driven simulator built to mimic the operational chaos of a real food delivery platform. Orders are continuously generated, streamed, spatially validated, batched, and dispatched — with a priority queue that replaces naive FIFO logic with a Customer Lifetime Value ranking system.

Key Infrastructure Decisions

🛰️ Real-Time Maps & PostGIS Boundary Checks

Orders stream in live through Apache Kafka. The second an order hits the pipeline, PostGIS checks its GPS coordinates against the restaurant’s delivery zone. If someone tries to order from outside the zone, the system instantly drops it so it doesn’t mess up the rest of the pipeline.

🧠 Dynamic Priority Queueing & Dispatch Backpressure

Instead of a basic "first-come, first-served" line, I built a smart waiting queue. The millisecond a driver gets back to the restaurant, the system looks at the queue and prioritizes Customer Lifetime Value (VIP Tiers).

🌪️ Airflow Orchestration & Docker Setup

Apache Airflow handles the background math—running batches to track driver trip times, calculate delivery speeds, and find busy delivery hotspots. To make it easy to run anywhere, I wrapped the whole cluster (Airflow, Kafka, and PostGIS) into Docker containers so it spins up with one command.

Impact

Kafka decoupling proved: thousands of order events held in place without crashing downstream consumers

Driver batching kept delivery efficiency high but exposed a fairness trade-off — low-spend customers in quiet zones wait significantly longer

VIP queue ranking surfaced the real tension between business optimization and equitable service delivery

Full cluster (Airflow + Kafka + Postgres + PostGIS) spins up and down in Docker with zero manual setup

Tech Used

Python
Apache Kafka
PostgreSQL
PostGIS
Apache Airflow
Docker