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

Real-Time Player Event Analytics with Pub/Sub and Dataflow

About this lab

You are a data engineer at PixelForge Studios, a mobile gaming company whose flagship title has 500,000 daily active players. The game team needs real-time dashboards showing active sessions, in-app purchase revenue, and level completion rates so they can detect issues within minutes of a new update going live. The current batch pipeline updates every four hours, which is far too slow to catch problems before they affect a large portion of players.

You will create a Pub/Sub topic that receives player events, build an Apache Beam pipeline that windows, aggregates, and enriches the stream in real time, deploy it on Google Cloud Dataflow, and write the output to BigQuery for instant querying. You will also implement a side output for flagging suspicious purchase patterns that exceed normal spending thresholds.

Lab details

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

What you will learn

  • Create a Pub/Sub topic for real-time player event ingestion
  • Build an Apache Beam pipeline with fixed windowing and triggers
  • Deploy a streaming pipeline on Google Cloud Dataflow
  • Implement side outputs for suspicious purchase detection
  • Query real-time aggregations in BigQuery

Concepts covered

  • Real-Time Streaming
  • Apache Beam
  • Google Cloud Dataflow
  • Pub/Sub
  • Windowing and Triggers
  • Fraud Detection

Technologies used

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

Prerequisites

  • A Google Cloud account with Pub/Sub, Dataflow, and BigQuery enabled
  • Basic Python knowledge
  • Familiarity with SQL

Topics

  • GCP
  • Pub/Sub
  • Dataflow
  • Beam
  • BigQuery
  • Streaming
  • Real-Time
  • Intermediate
  • Data Engineering
  • Gaming