public sealed class ProcessPlacementRealms as child processes. ADR-019's third backend, and the one that always answers.
Remarks
No cluster, no daemon, no container runtime: a port from a pool, a RealmSpec on the command line, and the process's own stdio as the lifecycle channel (RealmSignals). That is enough to run a fleet on a laptop, in CI, and in a small deployment that has one machine — which doc 27 § Cost's L0 is exactly the shape of.
And it is what makes the rest of this testable. Doc 27 § Testing: this backend is to doc 27 what Vixen.Net.Transport.Local is to doc 16. Everything above the interface — placement scoring, spawn and merge hysteresis, drain, rolling upgrades — is an ordinary unit test against a fleet that starts in milliseconds, with IRealmProcessHost swapped for one that starts nothing at all.
⚠ An instance outlives this object only if you let it. Dispose kills everything it started, because a launcher that exited leaving eight realms holding UDP ports is the thing that makes a developer reboot. A deployment that wants realms to survive their launcher wants the Kubernetes backend, where an owner reference says so explicitly.
Fields and properties (1)
public const string BackendNameWhat this backend calls itself in a PlacementProbe.
Methods (7)
public ProcessPlacement(ProcessPlacementOptions options, IRealmProcessHost? host = null, TimeProvider? time = null)Stands a launcher up.
public ValueTask<PlacementProbe> ProbeAsync(CancellationToken cancellation)public ValueTask<RealmInstance> StartAsync(RealmSpec spec, CancellationToken cancellation)Brings a realm up.
public ValueTask StopAsync(RealmInstanceId instance, StopMode mode, CancellationToken cancellation)Takes a realm down.
public ValueTask<IReadOnlyList<RealmInstance>> ListAsync(CancellationToken cancellation)What this backend believes is running.
public IAsyncEnumerable<PlacementEvent> WatchAsync(CancellationToken cancellation)public void Dispose()Kills everything this launcher started.
Used by (1)
- ProcessPlacementTestsVixen.Live.Placement.Process.Tests