public sealed class PlacementDirectorThe megaserver, as a function. Doc 27 § Placement.
Remarks
Hard filters, then a score, then the highest. That is the whole of it, and the value of writing it as a pure function of numbers is what doc 27 § Testing asks for: property tests over the scoring — a party is never split, a shard above its hard cap is never chosen, scoring is total and deterministic for a given fleet — run a million times on a laptop.
⚠ Every placement explains itself, and it is not optional. Doc 27 § Diagnostics: "without it, placement complaints are unanswerable". A verdict per candidate is a handful of small objects on the control plane, once per zone-in — the frame budget this would be unaffordable on is one nothing here runs on.
⚠ Ties break on the shard id, ordinally. Not for fairness — for determinism. A placement that depended on the order candidates happened to be enumerated in would make every property test flaky and every complaint unreproducible.
Fields and properties (1)
public PlacementWeights WeightsThe weights in force.
Methods (3)
public PlacementDirector(PlacementWeights? weights = null)Stands one up.
public PlacementDecision Place(PlacementRequest request, IReadOnlyList<ShardCandidate> candidates)Picks a shard.
public static PlacementFilter Reject(PlacementRequest request, ShardCandidate candidate)The first hard filter a candidate fails, or none.
Used by (4)
- FleetSimulationVixen.Live.Orchestrator.Tests
- MapCoordinatorVixen.Live.Orchestrator
- PlacementDirectorTestsVixen.Live.Orchestrator.Tests
- PlacementWeightsTestsVixen.Live.Orchestrator.Tests