Interface IRemoteDispatchSelector


public interface IRemoteDispatchSelector
Selects the physical dispatch target for a region — the second flow of Layer 2, "remote dispatch selection from location in the region tree".

Given a target region node (a user's residency-derived region), this selector answers which server should send, honouring the routing precedence:

  1. Residency (hard): the serving node must lie within the target's residency ceiling. Enforced by IRegionTree.selectServingNode(IRegionNode), which never falls back past the ceiling.
  2. Push capacity (hard): a server over its push throughput roof is not chosen; the slice spreads to a sibling in-region or spools. Note this is the push roof, independent of the session roof used by session routing.
  3. Region affinity and push load (soft): among residency-legal, non-saturated servers, the least-loaded and nearest is preferred.
The selector owns only the region-level decision (residency and reachability); the chosen region then places the send on one of its own servers by push load, which is the load balancer's competence and is not duplicated here.

On a single-server deployment this selector always returns a local, reachable target, so the distributed machinery is dormant and the caller's flow is identical to the non-distributed case.

Author:
IIZI
  • Method Summary

    Modifier and Type
    Method
    Description
    selectFor(IRegionNode targetRegion)
    Selects the dispatch target for a region.
  • Method Details

    • selectFor

      IDispatchTarget selectFor(IRegionNode targetRegion)
      Selects the dispatch target for a region.
      Parameters:
      targetRegion - The residency-derived region of the subscriptions to be served.
      Returns:
      The dispatch target — local or remote, reachable or not. Never null; an unreachable region yields a target whose IDispatchTarget.isReachable() is false rather than a null result.