Katkat

Design a Cloud Development Environment Platform Like an Online IDE

OpenAISoftware Engineer · Technical Screen

Last updated

Design a cloud development environment platform, like an online IDE, where developers open a repository in a hosted workspace with a browser editor, a terminal and forwarded ports, then stop and resume it later. It tests sandbox isolation, workspace storage, fast startup, secure connectivity and cost control.

Design a platform that gives developers cloud-hosted development environments, in the style of GitHub Codespaces or an online IDE.

Assume the core experience is this: a developer picks a repository and branch, and soon gets a running environment with the code checked out, the project's tools installed, an editor in the browser, and a terminal. A process the developer starts there, such as a web server, can be opened from the developer's browser. The developer can stop the environment and resume it later with its files intact.

Constraints and Clarifications

  • Developers run arbitrary code inside their environments, including builds, test suites and servers.

Clarifying Questions

  • How many developers, and how many environments running at the same time at peak, must the platform support, and in how many regions?
  • What start time is acceptable for a new environment, and for resuming a stopped one?
  • Which machine sizes are offered?
  • Is the environment defined by a configuration file in the repository, such as a base image, setup commands and editor extensions?
  • Must developers also be able to connect a desktop editor, or only the browser editor?
  • How long are stopped environments kept, and is idle time billed?
  • Is collaborative editing by several people in one environment in scope?

Hints

Hint 1

What one environment is: Decide what runs one developer's environment and what isolates it from other customers' environments on the same machine. That choice drives start time, density and security.

Hint 2

Where the files live: A stopped environment must come back with its files. Decide where the workspace's disk lives while the environment runs and while it is stopped, and what happens to it if the machine running it dies.

Hint 3

From keystroke to sandbox: Trace how the browser editor reaches a process running inside a private sandbox, including a port the developer wants to open in the browser.

Follow-up questions

  • Thousands of developers in one company open environments at the start of the working day. How do you keep start times low?
  • How would you prepare environments for a large repository ahead of time so a new one is ready in seconds, and how do you keep that preparation fresh?
  • How would you stop an environment from being used to attack other tenants or the platform's internal network?
  • A machine dies while a developer is working. What is lost, and how do you keep the loss small?