public sealed class MatchmakerOne queue: tickets go in, matches come out, and something else allocates the shard.
Remarks
Open Match's four concepts and none of its deployment. Doc 28 is explicit that what is worth taking is the separation of filtering, proposing, evaluating and allocating — and that the Kubernetes-and-Go topology is not, which is the same objection doc 27 ADR-019 already made about the substrate.
⚠ Allocating is not here. The director's job is IMapGrain.Place, doc 27's placement, and a second allocator is the thing this must not become: two of them disagree about capacity and the disagreement is a shard nobody can join. Matched is where a caller hands an accepted match to placement.
⚠ A widening band is what actually bounds a queue time, and it is here rather than in the match function because every mode needs it and none of them should have to write it. A pool's rating range grows with the oldest wait in it; without that, the top and bottom of a ladder never match anybody.
Fields and properties (7)
public IMatchFunction FunctionWhat makes matches.
public MatchPool PoolWhich tickets it will consider.
public IMatchEvaluator EvaluatorWhat settles overlapping proposals.
public double WideningPerSecondHow much the rating band grows per second waited.
public IReadOnlyList<MatchTicket> WaitingWhat is waiting, oldest first.
public int CountHow many parties are waiting.
public int PlayersHow many players are.
Events (1)
public Action<MatchProposal>? MatchedRaised for every match that is made. Where a caller calls placement.
Methods (6)
public Matchmaker(IMatchFunction function, MatchPool? pool = null, IMatchEvaluator? evaluator = null, double wideningPerSecond = 0)Makes a queue.
public bool Enqueue(MatchTicket ticket)Puts a party in.
public bool Cancel(string id)Takes a party out.
public IReadOnlyList<MatchProposal> Cycle(float now)Runs one cycle: snapshot, propose, evaluate, remove.
public double BandFor(MatchTicket ticket, float now)How wide a ticket's acceptable rating band has grown.
public bool Compatible(MatchTicket left, MatchTicket right, float now)Whether two tickets are close enough to be matched, given how long they have waited.
Used by (2)
- DuelsVixen.Live.Matchmaking.Tests
- MatchmakerTestsVixen.Live.Matchmaking.Tests