Case study — 2026 — PixelPlex

RealStream: AI-Native Media Orchestration

RealStream orchestrates generative AI video workloads. I designed an event-driven NestJS and BullMQ service architecture that schedules thousands of concurrent inference jobs, survives provider failures automatically, and streams job status to users over WebSockets. The production MVP shipped in 60 days.

NestJSBullMQRedisNext.jsAWS S3WebSockets
RealStream start page — event-driven AI media orchestration platform

The problem

A generative-media pipeline is hostile to naive engineering. Single inference calls run anywhere from seconds to tens of minutes, upstream model providers fail mid-flight, and users expect an accurate status for every job they submit.

Synchronous request handlers collapse under this profile, and unbounded background loops lose jobs or bury the ones that matter. The platform needed an orchestration layer that treats each job as a queue item with a defined lifecycle, priority, and failure contract.

There was also a cost dimension that most MVPs discover too late: every AI call spends money, and usage scales with users. Without per-job cost accounting from day one, the unit economics of the product were invisible until the monthly invoice arrived — which is where many generative-AI products quietly die.

The approach

Queues carry the job lifecycle

Every submission becomes a BullMQ job with a priority, a timeout, and a retry policy. The NestJS services stay small: each owns a stage of the pipeline instead of one bloated monolith that knows everything.

Priority lanes for interactive load

Interactive requests can sit behind batch work without users noticing. Queue-based prioritization lets short, user-facing jobs overtake long-running batch renders while keeping throughput predictable.

Fault tolerance as a default, not a feature

Providers fail mid-flight, so every stage assumes it. Timeouts, capped exponential backoff retries, and stale-artifact cleanup keep the pipeline converging instead of leaking half-finished jobs.

Status streamed over WebSockets

Job stage transitions publish through Redis and the WebSocket gateway reaches every subscribed client in real time. Nobody watches a spinner while a render queues behind a thousand others.

Artifacts live in object storage

Intermediate and final media land in AWS S3 while the processing services stay stateless. Any worker can die and be replaced; the pipeline keeps moving.

Retries are policy, not happenstance

Every queue entry declares its attempts, timeout, and backoff schedule explicitly. A 429 from a provider backs off in minutes; a malformed payload fails on the first attempt. The failed-jobs count is monitored, so a provider outage could be watched rather than endured.

Every job carries its cost line

Prompt, model version, and compute cost are recorded per job inside the queue. The team can see cost per successful output per day — the number that decides whether a generative feature is a product or an expensive demo.

Results

60 days

From concept to production MVP

1,000s

Concurrent inference jobs orchestrated

Real-time

Job status for every submission via WebSockets

Other case studies

My role on PixelPlex: Architecture & lead implementation.

Written by

Eugene Zaiko

Eugene Zaiko is a senior full-stack engineer (5+ years, ex-PixelPlex, Syberry, Linnovate) specializing in event-driven backends, PostgreSQL at scale, and production AI systems. Need this kind of architecture for a production system? Reach out directly.