Temporal in production: durable order workflows with parallel deliveries and human pauses

How we used Temporal for SpotBeam, a broadcast ad-delivery pipeline: one workflow per order, child workflows per station, transcode-once grouping and pauses for bad files.

By Rishabh Maurya, co-founder of BuildKodiq ·

SpotBeam automates how a US broadcast ad-distribution company gets TV and radio commercials to stations. Before it, every order was handled by hand: check the files, make a preview, convert to each station's format, create the station documents, deliver, confirm. Every station wants a different video format, a different document set and a different delivery method, and a missed or wrong delivery is not an option.

We built the pipeline on Temporal. This is what that looked like and what we'd tell anyone considering it.

Why a workflow engine and not a job queue

An order is not one job. It's a dozen steps, some of which take minutes (transcoding), some of which talk to systems we don't control (FTP servers, Aspera, Signiant, a client's inbox), and one of which can wait days (a client re-uploading a broken file). With a plain queue you end up writing your own state machine, retry rules and recovery code. Temporal gives you that as the programming model: each step's result is saved, failed steps retry by policy, and a crashed worker or a deploy doesn't lose the order.

Our rule of thumb: if a job has several steps, calls outside systems, can run for minutes or days, and must never run twice or be lost, use durable execution. For short background tasks a queue is simpler.

One parent workflow per order

Each order runs as one orchestrating workflow that reads top to bottom like the process the operations team already knew:

  • Validate the media
  • Make a preview / proxy and back up the original
  • Look up each destination station's format and delivery method
  • Transcode once per distinct format
  • Generate the station documents (PDF, XML, BXF)
  • Deliver to every station in parallel
  • Notify the client and mark the order complete

Keeping the parent readable mattered more than we expected. When someone asks "what happens to an order?", the answer is that one function.

Child workflows per station, delivered in parallel

Delivery is where most of the variety lives, so each station gets its own child workflow with its own method: Signiant, Aspera, FTP, S3 or Google Drive. Children run in parallel, retry on their own, and a slow or failing station doesn't hold up the rest. The parent waits for all of them and records each result, so the operations dashboard can show exactly which station got what and when.

Transcode once per format, not once per station

Twenty stations rarely need twenty formats. Before transcoding, we group stations by required format and run each conversion once, load-balanced across the client's Vantage transcode servers, with FFmpeg as a fallback. On large orders that removes most of the duplicate transcode work.

Humans in the loop without polling

If a file fails validation, the workflow emails the client and waits on a signal: re-upload or cancel. No cron job checks a status column; the workflow is simply paused, cheaply, until the signal arrives, then carries on from where it stopped.

Separate task queues so slow work scales on its own

We split workers by kind of work, each on its own Temporal task queue: media, transcode, documents, notifications, distribution and the orchestrator. Transcode workers need CPU and scale up during busy periods; notification workers barely register. On Kubernetes each pool scales horizontally on its own, and a backlog in one never starves the others.

Add automation around the old system, don't rewrite it

The client already had C# services that worked. Instead of replacing them, the workflows talk to them over RabbitMQ. That let automation go live step by step, with the existing system still the source of truth where it already was.

What we'd tell a team starting out

  • Write the process down first: every step, retry rule, timeout and human decision. The workflow code follows from it.
  • Keep activities small and idempotent; that's what makes automatic retries safe.
  • Use child workflows where the work fans out and each branch can fail differently.
  • Give every kind of work its own task queue from day one.
  • Build the status view early. Durable execution is only reassuring if people can see it.

Rishabh Maurya led SpotBeam. If you're planning something similar, the full case study is linked below, or email hello@buildkodiq.com.

Have a brief? Let’s talk.

A free call with the engineer who would lead your project. You leave with a clear next step, whether or not we work together.

or write to hello@buildkodiq.com