back
work · 2025 HIV portfolio case study

Moving a 55-country HIV portfolio from remote desktop to parallel batch

The owner’s Mac holds the assumptions and launch controls. The Windows box runs Spectrum jobs in parallel. SSH dispatches batches and returns results. Dropbox keeps the shared files synchronized.

Before this pipeline, the portfolio owner ran Spectrum GOALS country files one by one over remote desktop. That made a full 55-country portfolio run impractical, before adding scenario or sensitivity branches. The new pipeline dispatched 500+ product-combination branches in parallel on a multicore Windows box.

55
countries
500+
market branches
~13 min
per Spectrum run
4
pipeline stages

The bottleneck

The engagement modeled combinations of next-generation HIV prevention and treatment products: oral and injectable PrEP, rings, implants, bNAbs, a future vaccine and cure, VMMC, and ART variants. Each scenario translated portfolio assumptions and market-dynamics rules into Spectrum inputs, then extracted infections, deaths, and coverage. Running country files manually, one at a time through remote desktop, made a full portfolio pass impractical. Scenario and sensitivity branches multiplied that bottleneck.

Four-stage pipeline

A fully automated R pipeline in four stages:

The architecture

The pipeline detects who is running it and on what OS, and picks a matching config. On Windows it runs Spectrum locally. On macOS it opens an SSH connection to the Windows box and dispatches the batch there. It multiplexes the connection for speed and pulls results back over SSH. Later, Dropbox acted as a shared filesystem so files propagated on their own. The portfolio owner set up their side with a short OpenSSH and key walkthrough I wrote into the docs. From their seat it was one command. The Windows box ran the parallel batch and the outputs appeared on their Mac.

My role

Throughput

The owner still controlled the assumptions and launched runs from their Mac. One command dispatched country and scenario jobs across the Windows box’s cores, checked outputs, retried incomplete jobs, and returned the results. Full-portfolio runs, scenario branches, and sensitivity analysis became operationally feasible.

Note. Machine names are the author’s own. No client identities, addresses, or credentials are exposed.
all work