Skip to content

Principles

These are the rules the design keeps returning to. Each one decides several things below it; when a new question comes up, these are what to check the answer against. The examples come from the design, and some of them aren't built yet: memory admission, preemption, service jobs, Compose jobs and the tracker's UI.

The machine's owner comes first

Someone lends allmyram a machine they'll want back. A job that slows them down, eats their memory or reaches their network breaks that deal, and no amount of throughput makes up for it.

  • Jobs run at idle priority, so the owner's own work always wins the CPU.
  • A runner admits a job only when the memory free right now covers the job, its sandbox overhead and a reserve for the owner. Under memory pressure it stops admitting, then preempts the newest jobs.
  • Everything a job starts is bounded: batch jobs have a time limit, services have a lease, and a restarted runner stops any sandbox it has no record of.
  • No job can reach the owner's LAN, tailnet or files.

Spend the memory on jobs

The point is to put idle RAM to use, so allmyram's own share of a runner is a cost to keep small and to measure, never an afterthought.

  • The shipper sends telemetry from a small RAM buffer while the tracker keeps up, spills to disk only when it falls behind, and aims to stay under about 10 MiB.
  • The tracker's always-on half only appends to files. The half that interprets them runs only while someone is looking.
  • No heavy collector agent on runners. A collector is welcome if it can be made light enough; what's ruled out is the memory, not the idea.

Say what happened, never a confident wrong answer

A wrong "passed" is worse than a visible "unknown". Every run ends in a state that says what happened, and allmyram refuses to run when it can't be sure of its inputs.

  • A snapshot with Git LFS files refuses to run, naming the paths, rather than testing against pointer files.
  • Jobs start through containerd's CRI because the simpler tools lost gVisor jobs' exit codes and output.
  • Preempted, timed-out, cancelled and runner-restarted runs are each reported as such. A runner that vanishes is reported as gone, with when it was last heard from.

Anything can be interrupted

Every job can be preempted, timed out or orphaned by a runner going away, so nothing in allmyram promises durability or delivery. If you need production workloads, use another system.

  • A runner that crashes loses the telemetry it held in RAM. Nothing defends against that.
  • No defenses against stacked failures, such as a failed fsync followed by a restart followed by a power cut.
  • This leans on "Say what happened": we try hard to report every failure, and when even that fails, the answer is "unknown" or "gone", never a false "passed".

Root once, at install

Every bug in code that runs as root is a root bug on someone's personal machine. The owner runs one root step to install; after that, nothing allmyram ships runs as root. A Mac runner needs no root step at all: it installs as the owner's user, and the only root is inside its VM.

  • On Linux the network-facing runner can't reach containerd. A separate small warden can, and it builds every pod spec itself from a constrained job description: gVisor, the job's own cgroup, the egress network, no added capabilities, one workspace mount. A compromised runner can ask for jobs, never for a privileged pod.
  • The warden stays small enough to read in one sitting, because through containerd it is effectively root.
  • Image pulls are limited to registries on the owner's allowlist, which the warden reads from root-owned config, never from a request.

Closed unless deliberately opened

Nothing is reachable by default, in either direction, and the rule is enforced by the network, not by asking jobs to behave.

  • Nothing allmyram runs is ever reachable from the internet.
  • A job or service is reachable only over tailcat, by the keys on its allow list. Its tailcat key stays with the runner, outside the sandbox.
  • A job's only way out is the runner's proxy, which allows the public internet and refuses private, link-local and tailnet addresses. It decides on the resolved address, never the name, and logs every decision.
  • Tailcat addresses carry a secret, so they're never logged in full.

Check it, don't assume it

Claims about isolation and limits are checked, on the machines in question, before anything depends on them.

  • Every measured claim in the design cites an experiment in the spike.
  • Every runner checks its own egress when it starts (direct connections fail; the proxy allows public and refuses private targets) and takes no jobs until it passes. That covers machines the spike never tested.
  • What hasn't been verified is written down as unverified.

No control plane, no cluster

Nothing has to be up for a job to run except the laptop and the runner it talks to. There's nothing to operate.

  • The client asks runners what they'd take now and submits straight to one.
  • Every machine joins the hoard the same way, with a certificate from one root key, and none is special.
  • The tracker is optional, like a BitTorrent tracker: it helps, it is never necessary, and it is never in a job's path. Losing it loses visibility, never jobs.
  • No Kubernetes and no Docker. allmyram keeps only Kubernetes' runtime interface, CRI.

One owner, and the simplest design that holds

v1 serves one person with one root key, and the design takes every simplification that buys, without closing off what comes later.

  • Preemption needs no fairness rules: the owner who wants the machine back is the person whose job gets preempted.
  • Jobs get no secrets or registry credentials, and client and runner need no compatibility promise, because one owner upgrades both.
  • Revocation is one owner-signed list that every runner holds and every connection syncs, capped at 256 keys; a client certificate lasts only as long as the day key that signed it, a day at most.
  • The proxy's v1 policy is deliberately crude, and correct.
  • Nothing rules out cloud workers or more owners later; provisioning stays separate for that reason.

As if it ran locally

A job should feel like running the command on your laptop: your working tree as it is right now, output streaming back, and the exit code that means what it would locally.

  • The snapshot includes uncommitted and untracked files, and never touches the repository's index, HEAD, branches or stash.
  • If the laptop sleeps, the client reattaches where it left off, so nothing prints twice and nothing is lost.
  • Linux and macOS enforce the same rules with the same mechanism, behind one interface (a Mac runs it inside a VM the runner owns), so a job doesn't need to know which platform it landed on.

Do what nerdctl does

allmyram runs on containerd, so when container tools disagree about what something means, allmyram matches nerdctl, containerd's Docker-compatible command line. Differing from it is allowed only on purpose, with the reason written down beside the difference.

  • Jobs read Compose files with the same library nerdctl compose uses, at the same version, so loading, merging, profiles and interpolation behave the same.
  • The containers a Compose job starts are the ones nerdctl compose run would: the job's service and what it depends on.
  • A job's command runs through its effective entrypoint, as nerdctl run and nerdctl compose run do: the Compose service's when it sets one, none when it sets it empty, and otherwise the image's.
  • Waiting for a service to be healthy is a deliberate difference. nerdctl can't wait because it has no daemon; allmyram's runner already stays with the run, so it does.