
Automation - 5 minute read
The 300x Speedup: Automating a Global Coding Competition
From Manual Labor to Infinite Scale
The Challenge: The Manual Bottleneck
The company runs a global PVP (Player vs. Player) coding challenge where students submit code to control robots in a 3D simulation. For two years, this was an operational nightmare.
- The Prep Time: To run a single match, the team had to manually convert and sync user code. It took 5 minutes of manual work per record.
- The Sync Trap: The biggest technical hurdle was latency. Running the user's code on the web while trying to sync it with a Unity simulation created massive delays. The "replay" never looked like what the user actually coded.
- The Risk: The process was unscalable. As participation grew, the manual overhead threatened to crush the competition.
The Solution: Full-Stack Automation
I took ownership of the project with a single goal: Zero Manual Touch.
1. Ingestion-Time Processing (5min → 1sec)
The bottleneck was processing code at runtime. I shifted the architecture left using Node.js.
- The Fix: I built an ingestion pipeline that converted and compiled the user's code the moment they hit "Submit."
- The Result: Instead of 5 minutes of prep time per match, the system simply fetched the pre-processed data. Retrieval time dropped to 1 second.
2. Browser-Based Parallel Execution
To solve the "Sync Trap" (where the code lagged behind the simulation), I moved the execution context.
- Innovation: Instead of trying to sync a server execution with a client view, I architected the solution to run both players' code instances in parallel directly in the browser environment.
- Impact: This eliminated network latency and server-side processing lag. The simulation became deterministic and perfectly synchronized.
3. The "Visual Rendering" Farm
Headless browsers could not faithfully render the complex 3D Unity environment for recording.
- The Infrastructure: I architected a dedicated farm of Windows Servers connected to active monitors (GPU-accelerated).
- The Workflow: A Node.js orchestrator dispatched matches to these servers. The servers ran the simulation 3 times, auto-captured the screen using standard recording tools, and generated the final MP4 highlight reel.
- The Future: This architecture laid the groundwork for a live broadcast system, capable of streaming match results in real-time to participants.
The Outcome
- 300x Efficiency Gain: Reduced match preparation time from 5 minutes to <1 second.
- Scalability: The system could handle thousands of submissions without requiring a single human operator.
- Visual Fidelity: By running on dedicated Windows hardware with GPUs, we ensured the recorded video was pixel-perfect compared to the user's code execution.
