Blog index

2021 12Dec 25, ReactorScram

The Spacedock model

Edit: See the POSSE entry too

A lower barrier-to-entry for running web servers

A picture of the International Space Station, with 6 smaller spacecraft docked to it

Tech-savvy admins run relays in the cloud. Everyone else runs web servers on their PCs. The web servers dock loosely to the relays.

A picture of the spacedock architecture, with two clients connecting to a relay. The relay in turn connects to 4 servers, a desktop, a laptop, a phone, and a web browser tab.

You are already reading this on a spacedock relay. The original file spacedock.html lives on my home desktop. The relay at is only a frontend / cache for my desktop's origin server.

With other server models, picking a cloud server is like buying a home and moving in. It's a big commitment, you have to move all your data, and you don't really want to move it back out.

With the spacedock model, picking a relay is like pulling your RV into a truck stop. The truck stop is not your home, but you can let people visit your RV while you're parked. If the truck stop raises their prices or kicks you out, just drive down the road to the next one.

Existing implementations

PageKite implemented this in Python, in 2010. PageKite claims to work with any TCP-based protocol, not just HTTP.

PTTH implemented this in Rust, in 2020. Currently the server only serves static files. The PTTH_QUIC proof-of-concept works with any TCP-based protocol.

Theoretical implementations

A VPN like WireGuard and any web server like Nginx or Caddy could form a space dock. It requires root access on the origin server, but it would probably have better latency than the HTTP long-polling that PTTH uses.

The File API in JavaScript could serve a single file through a relay, like Station307 does, but AFAICT it can't serve an entire folder.