LeslieOA / plane

Session backend orchestrator for ambitious browser-based apps.

Home Page:https://plane.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tests Chat on Discord

Plane is a container orchestrator for ambitious browser-based applications. Plane implements an architecture we call session backends.

tl;dr: Plane lets you spin up instances of any HTTP-speaking container via an API. Plane assigns a unique subdomain to each instance, through which it proxies HTTPS/WebSocket connections. When all inbound connections to a container are dropped, Plane shuts it down. Plane is MIT-licensed and written in Rust.

Plane.Demo.mov

Documentation

Architecture

Plane architecture diagram.

Plane consists of two main pieces, the controller and the drone, which communicate with each other over NATS.

The controller consists of:

  • The DNS server, used to manage routing backend-bound traffic to the right drone, as well as to handle ACME challenges.
  • The scheduler, which listens for backend requests and picks an available drone to run them on.

The drone consists of:

  • An agent, which receives instructions from the scheduler to run backends and coordinates with the Docker daemon to run them.
  • A proxy, which routes incoming HTTPS traffic to the appropriate backend.
  • A certificate refresher, which on launch (and then periodically) refreshes the proxy's HTTPS certificate to ensure its continued validity.

Running Tests

Tests consist of unit tests (which are located alongside the source) and integration tests located in dev/tests. Both kinds of tests are run if you run cargo test in the root directory.

Integration tests use Docker to spin up dependent services, so require a running install of Docker and to be run as a user with access to /var/run/docker.sock. They are intended to run on Linux and may not work on other systems.

Integration tests can be slow because they simulate entire workload lifecycles. This is compounded by the fact that the default Rust test runner only runs tests in parallel if they are in the same test file. For faster test runs, we recommend using cargo-nextest as follows:

cargo install cargo-nextest
cargo nextest run

About

Session backend orchestrator for ambitious browser-based apps.

https://plane.dev

License:MIT License


Languages

Language:Rust 98.4%Language:Dockerfile 0.7%Language:Shell 0.6%Language:JavaScript 0.3%