Skip to content
All work

Real-time data platform

A real-time data platform that cut each new AI use case from a month of pipelines to one query

Every new AI idea waited about a month for data pipelines, and the same logic lived in three places. I proposed making a streaming database the single entry point for all our fast-moving data, and led the build. Now a new use case starts with a query, at about a seventh of the old cost.

Kind
Production system, in daily use
My role
Proposed it to the directors, senior VPs and chairman, then led the build
Team
Data engineering migrated the pipelines on the framework I set up
Scale
~2,500–3,000 trucks across Canada, the US and Mexico · GPS several times a minute
Built for
Every team waiting on a new AI use case
Techniques
data architecture, streaming database, streaming SQL, change data capture, medallion architecture, cost optimization

Results

  • → to start a new AI use case
  • from truck signal to usable data, even at peak
  • of the old warehouse’s yearly cost

Delivered within a prior employer’s environment. Details are intentionally anonymized. I’m glad to discuss the operating problem, design principles, and production tradeoffs.

The problem

Data reached two warehouses through separate pipelines, each with its own copy of the logic, and an ML copy was on the way.

The five decisions behind it
  1. The same logic lived in three places.

    A fix in one copy had to be remembered in the others, and any copy that was missed drifted quietly.

    The call

    Stop before the third copy, and give the logic one home.

    Techniques: data architecture

  2. Listen for changes instead of copying tables.

    The streaming database takes in the operational database’s change events directly, alongside the sensor feeds.

    The call

    Change data capture keeps everything current, and any past state can be rebuilt.

    Techniques: change data capture

  3. Write the logic once.

    All cleaning and transformation happens there as streaming SQL, and every system reads from it.

    The call

    Use SQL, so a team that already knew it could own a real-time system.

    Techniques: streaming SQL

  4. Keep live data fast and history cheap.

    Live systems get data within a minute. History sits on low-cost storage.

    The call

    Only ML needed history, so it stopped paying for always-on compute.

    Techniques: cost optimization

  5. Start the next use case with a query.

What broke first

  1. What I tried

    Our first streaming views, written the way you’d query a finished table.

  2. What broke

    Load. A streaming view never finishes and keeps state for every join, so ours held far too much and slowed at peak.

  3. What changed

    Rewrite them for a stream.

In hindsight

Train the team on streaming SQL before migrating.