✦ Want a lab built just for you? ✦
Request a Lab ↗

Building a Real-Time Food Delivery Pipeline with Pub/Sub, Dataflow, and BigQuery

About this lab

You are a data engineer at QuickBite, a fast-growing food delivery platform operating across multiple cities. The platform generates thousands of events per minute: order placements, restaurant confirmations, driver location pings, delivery status updates, and customer ratings. The operations team needs real-time visibility into delivery times, driver utilization, and order fulfillment rates, but today all this data is processed in nightly batch jobs that are always 12 to 24 hours behind.

Your mission is to build a real-time event processing pipeline using Google Cloud Pub/Sub for event ingestion, Apache Beam on Dataflow for stream processing with windowed aggregations, and BigQuery as the real-time analytics sink. You will implement 5-minute tumbling windows to compute live delivery metrics, set up a dead letter topic for malformed events, and publish simulated events to test the full pipeline end to end.

Lab details

  • Level: Intermediate
  • Cloud: GCP
  • Domain: Data Engineering
  • Duration: 90 minutes

What you will learn

  • Create Pub/Sub topics and subscriptions for food delivery event ingestion
  • Write an Apache Beam pipeline in Python for real-time stream processing
  • Implement windowed aggregations using tumbling windows in Dataflow
  • Deploy a streaming Dataflow job and monitor it in the GCP Console
  • Route malformed events to a dead letter Pub/Sub topic
  • Query real-time delivery metrics in BigQuery

Concepts covered

  • Event-Driven Architecture
  • Pub/Sub Messaging
  • Apache Beam Pipelines
  • Dataflow Streaming
  • Windowed Aggregations
  • Dead Letter Queues
  • Real-Time Analytics

Technologies used

  • Cloud Pub/Sub
  • Dataflow
  • Apache Beam
  • BigQuery
  • Google Cloud Storage
  • Cloud Console

Prerequisites

  • Basic Python knowledge
  • Familiarity with SQL queries
  • GCP account with billing enabled
  • Basic understanding of messaging systems

Topics

  • GCP
  • Pub/Sub
  • Dataflow
  • Apache Beam
  • BigQuery
  • Streaming
  • Real-Time
  • Food Delivery
  • Event-Driven
  • Windowed Aggregations