Preparing your design workspace

Loading the problem and your latest saved attempt…

Design a Distributed Simulation Platform

Run large, reproducible simulation jobs across shared compute, placing each phase only on hardware that meets its declared requirement, while preserving durable progress, fair admission, and one authoritative result.

Problem statement

Design a distributed platform where engineers submit simulation jobs, monitor or cancel them, and retrieve completed results. For this exercise, assume each submission references a versioned simulation definition, immutable input artifacts, an immutable runtime image, and a random seed.

That identity must reproduce the same logical output even after a retry or checkpoint resume. The platform receives about 10,000 simulation cases per week.

One submitted case creates one run, and that run declares its execution phases as a directed acyclic graph; each leased phase attempt belongs to exactly one phase and a phase becomes runnable only after its prerequisites succeed.

Runs last from one minute to six hours, may use CPU or GPU workers, and produce a result manifest plus summary metrics. For this exercise, each phase declares an immutable hardware requirement: one hardware class the platform offers, such as general CPU or GPU, plus quantities such as cores, accelerators, and memory.

Submission validates every requirement against the hardware classes the platform offers and rejects a case whose requirement no class can satisfy. A worker satisfies a requirement when it belongs to the same hardware class and offers at least the requested quantities.

A phase runs only on a worker that satisfies its requirement, and a retry or resumed attempt keeps that same requirement. Failed worker attempts may resume from a compatible durable checkpoint. Duplicate dispatches must never publish two final results.

Cancellation and completion race through one versioned terminal transition: whichever commits first is authoritative, and a later operation returns that state without reversing it.

Tenants have CPU, GPU, and storage quotas: compute quota is charged per hardware class, alongside a storage quota; priority orders work within a tenant, while admission must prevent one tenant from starving the others.

Phases waiting for a scarce hardware class must not block work that other classes could run, and must not be starved by it. Networking inside the simulator, simulator physics, interactive visualization, and authoring the simulation model are outside scope.

What to build

  1. An authenticated engineer can submit a simulation case that binds a versioned definition, immutable inputs, runtime image, random seed, and valid phase dependency graph, in which every phase declares a hardware requirement the platform can satisfy, to one run.
  2. An engineer can read durable run status and progress and can request cancellation without allowing a completed or cancelled run to return to an active state.
  3. The platform leases each ready phase only to a worker whose advertised hardware satisfies the phase's declared requirement, charges quota per hardware class, and keeps phases waiting on a scarce class from blocking or being starved by work for other classes.
  4. A replacement worker can resume a failed attempt from the latest compatible durable checkpoint without letting the old attempt commit afterward.
  5. A successful run exposes exactly one authoritative result manifest and summary metrics even when dispatch, completion, or client requests are retried.

At scale

  • Assume 10,000 submitted simulation cases per week, with each case expanding into a directed acyclic graph of execution phases.
  • For this exercise, assume phase fan-out and bursty arrivals across tenants can drive up to 10,000 CPU or GPU phase workers concurrently, even though the weekly case count is about 10,000.
  • Assume immutable input and result artifact sets may each reach 100 GB for one run, while frequently read status and progress remain compact metadata.
  • Assume tenant CPU, GPU, and storage quotas are hard limits; priority applies within a tenant and cross-tenant scheduling must prevent starvation.
  • For this exercise, assume the platform offers a small fixed catalog of hardware classes, such as general CPU workers and GPU workers, and GPU capacity is much scarcer than CPU capacity.