Design executable notebook service APIs

Quick Overview

This question evaluates a candidate's competence in designing secure, scalable systems for executing user-supplied code, covering API design, sandboxing and isolation, dependency management, resource limits, scheduling, and streaming proxies for logs/results.

Design executable notebook service APIs

Company: Google

Role: Software Engineer

Category: System Design

Difficulty: hard

Interview Round: Technical Screen

Design a collaborative, editable code notebook service with an execution service and a proxy that fetches execution results and returns them to the browser. Users may upload custom function JAR files with a fully qualified class and method name, then submit requests to run that function with arguments. Define RESTful endpoints and request and response schemas for uploading code, submitting executions, fetching logs and results, and cancelling. Discuss sandboxing, dependency management, resource limits, concurrency, and result streaming.

Quick Answer: This question evaluates a candidate's competence in designing secure, scalable systems for executing user-supplied code, covering API design, sandboxing and isolation, dependency management, resource limits, scheduling, and streaming proxies for logs/results.

|Home/System Design/Google
Google logo
Google
Sep 6, 2025, 12:00 AM
hardSoftware EngineerTechnical ScreenSystem Design
10
0

Design: Collaborative Notebook with Executable User Functions (JAR Upload)

Context

Design a collaborative, browser-based code notebook service. The system must support real-time editing, execution of user-submitted functions, and a proxy that fetches execution results/logs and returns them to the browser.

Users can upload custom Java JARs, specify a fully-qualified class and method as the entrypoint, and submit executions with arguments. The system must be secure, scalable, and support streaming logs/results.

Requirements

  • Define RESTful endpoints and request/response schemas for:
    1. Uploading user code (JARs) and registering entrypoints
    2. Submitting executions (sync/async, with args)
    3. Fetching logs and results (polling and streaming)
    4. Cancelling executions
  • Discuss:
    • Sandboxing and isolation for untrusted code
    • Dependency management for user JARs (Maven coordinates, shading, etc.)
    • Resource limits and quotas
    • Concurrency model and scheduling
    • Streaming logs/results to the browser via a proxy

Make minimal assumptions where the prompt is ambiguous (e.g., use Java 17, JSON over HTTP, and an API Gateway/Proxy).

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...