Concepts
Four invariants shape every decision in the Remote Lab Manager — one lab per host, FIFO queueing, content-hash topology identity, reference-counted reuse.
Four invariants shape every decision in the Remote Lab Manager:
- one lab per host,
- strict FIFO queueing,
- SHA-256 topology identity, and
- reference-counted reuse.
Read these four pages in order if you want to reason about edge cases before they hit you — especially the ones the HTTP surface papers over.
In this section
-
The four-step session-and-lab lifecycle without queue mechanics or refcount math. Read first; the rest is the deep version.
-
Three cooperating components (FastAPI server,
LabManagersingleton, Python client + pytest plugin); the one-server and one-lab guards; the async discipline; whererun_netlabsits. -
FIFO state machine, strict-in-order promotion, the
423access boundary, heartbeats, stale-session eviction (300 s active, 600 s waiting). -
Content-hash topology identity,
try_acquirevsacquire, reference-counted reuse, idle labs, and theatexitcleanup safety net. -
The Netlab YAML shape we consume, the
extra_filesmultipart contract, vendor defaults, and local validation before upload.
What to read next
- REST API — the endpoint-by-endpoint contract these invariants enforce.
- Pytest Fixtures — how
remote_lab_fixturewraps these invariants into a stable public API. - Operator runbook — the operator runbook that handles the failure modes these invariants allow.