Replacing setup guides with a hosted VS Code environment

Why a persistent, per-user browser VS Code workspace with deep links from the docs onboards developers onto a heavy JVM toolchain better than installation guides do.

January 20213 min readPlatformsInterfaces

Flat sideways strokes of dusk blue shadowed by lamp black cross a cream ground, with three magenta flicks where the strokes stop.

Put sixty or seventy developers in a room for a bootcamp, most of them on modest laptops, and you can easily lose the first session to installing a JDK, Gradle and an IDE before anyone opens the code they came to write. For any developer platform with a heavy toolchain, setup is the first and largest point of drop-off. Developing on Corda, R3’s enterprise blockchain platform, meant writing Java or Kotlin, usually in IntelliJ, and running a local network of Corda nodes alongside the build tools. That stack is slow to stand up in a workshop and punishing on the low-power laptops common at our bootcamps in India.

Teams usually respond with a longer “prepare your computer” page, pre-built VM images, or a shared remote desktop. They are sensible defaults when a team does not want to run hosted compute for training, though anyone who has run a workshop knows how few laptops arrive prepared. All of them still put setup work ahead of the developer’s first working build. I preferred to fix the environment rather than instruct the person: remove local setup altogether so time to first working code drops from hours to a minute, and put that environment one link away from every page of documentation. At R3, that led me to build ide.corda.net, a hosted, per-user VS Code workspace in the browser running on Kubernetes and preloaded with Corda’s starter projects and course exercises.

Persistent per-user workspaces on Kubernetes

Most browser sandboxes treat sessions as disposable because stateless containers are straightforward to pool and recycle. That model works for isolated snippets, not for a multi-module course where learners return across sessions and expect their Corda state and contract code to be where they left it.

To keep that state intact, ide.corda.net ran one container per user on Kubernetes using code-server, Coder’s open-source build of VS Code for the web. Each browser received its own environment at a unique subdomain, such as abcdef.ide.corda.net, backed by persistent storage so returning from the same browser reattached to the existing files. Isolating each user in a dedicated container also meant learners could run Gradle builds and local Corda test nodes without interfering with everyone else in the room.

The visible trade-off was cold-start latency. Booting a dedicated container carrying a full JVM toolchain and mounted storage is not instant, so the training documentation told learners plainly to give the container a moment to start. In 2019, operating that architecture at workshop scale meant assembling the container packaging, persistent volumes and per-user ingress routing from scratch. Coder had only released code-server months earlier, and while Eclipse Che and Gitpod existed on other editors, turnkey Kubernetes workspace platforms for VS Code did not. We took ide.corda.net public at R3’s CordaCon conference that October, two weeks before Microsoft’s Visual Studio Online public preview and seven months before GitHub Codespaces entered limited beta, and ran it for about fifteen months.

A hosted editor that opens onto an empty directory only moves setup from the laptop to the cloud. If a developer has to clone the right repository and navigate to the sample folder, the first minute still goes to plumbing before any platform code is on screen.

I preloaded the container image with Corda’s starter repositories and the course exercises so every environment opened on working code. Because code-server accepts a target path in the query string, any page in the documentation or course could drop a developer directly into the exact exercise folder with one click:

https://ide.corda.net/?folder=/home/coder/corda-training-code/010-empty-project

That deep-linking only pays off when it sits inside the reading flow: the training site carried a permanent “Open in Online IDE” button, and the official template repositories carried a “Try in web IDE” badge. This matters most for developers on low-power laptops, where skipping the local JVM toolchain and IDE installation can be the difference between running a first project during the session and stalling before anything compiled.

Keeping the on-ramp separate from the destination

A common mistake with browser-based IDEs is positioning them as a full replacement for a developer’s local environment. For serious Java and Kotlin work on Corda, IntelliJ remained the right tool: its refactoring and local debugger justify the installation once someone is building for production.

We kept IntelliJ as our explicit recommendation for day-to-day development and treated ide.corda.net strictly as a zero-install on-ramp. That boundary kept the scope small: we did not need to reproduce every local plugin or custom network topology in the browser, only to make the first hour and the course modules work reliably with nothing installed. Once a developer has modified working code and decided Corda is worth building on, installing IntelliJ locally is a straightforward investment.

Chris Chabot, January 2021