- Each session’s background jobs, the ones
cmd &starts, and each job’s output. - The processes each instance of the workspace runs, which
pslists. - When each instance was last seen, so the others can tell it is gone.
The group key is
store.jobs. A job’s output is a stream other processes
follow, so disk is refused here, and a disk store keeps its jobs in
memory.
On Redis
- YAML
- Python
- TypeScript
Run several instances of one workspace
Every process that builds the workspace under the same id on one Redis is an instance of it, on one machine or several, behind a load balancer or as replicas of one agent.- YAML
- Python
- TypeScript
- Servers
workspace.yaml
workspace.json holds {"id": "agent", "config": {...}}
with the same config on each. The instances then share:
- Each session’s background jobs:
jobs,wait,kill %Nandfg %Nwork on any instance, whichever started the job. - Processes:
pslists the other instances’ asowner:pid, andkill owner:pidstops one. - Cleanup: an instance counts as gone 30 seconds after it was last seen, and the next one to start stops the programs it left running.
- Sessions, history and symlinks, since the whole store is on Redis.
processes: workspace widens that to every session’s.
Shell describes the details.