Package com.eqixiac.equinix.design.spi
package com.eqixiac.equinix.design.spi
Extension points of the design engines. Everything an engine decides with is one of these small
interfaces, so a new objective, limit, pricing source or search strategy is added by implementing
one, never by editing an engine.
DesignContext: the read-only facts of one run (theDesignSpec, the metro catalogue, latency, cloud reachability, the cost model). Built once, so the other plug-ins are pure functions of it and can be unit-tested without a network.CandidateGenerator: which metros are worth considering.Constraint: a hard limit on a metro or a portfolio.Objective: one measurable quality of a portfolio (latency, cost, resilience...), in its own unit, with a direction.CostModel: prices a portfolio line by line, with the source and an uncertainty range for every figure.Solver: searches portfolios and returns the trade-off frontier plus the option the weights recommend.
A portfolio (MetroPortfolio) is the set of
metros a design deploys in. Objectives are evaluated on portfolios, not on single metros, because
the qualities that matter (worst-case latency, total cost, surviving a metro loss) are properties
of the set.
Third-party plug-ins are discovered through ServiceLoader: see
DesignPlugin.
-
ClassDescriptionChooses which metros a
Solverconsiders.A hard limit.The outcome of checking oneConstraintagainst one portfolio.One priced item of a portfolio, with where the figure came from and how far it could be off.How a line was restated in the comparison currency.Prices a portfolio.Restates an amount in another currency, so a design whose prices come back in several currencies (the live Fabric price search quotes London in GBP, Frankfurt in EUR, Tokyo in JPY) is priced and ranked in one.An amount restated in another currency.Where a rate came from, in precedence order.A rate between two currencies.The read-only facts of one design run.One feasible design with everything measured about it.A bundle of extra objectives and constraints contributed by a library on the classpath.What aSolverfound.Whether a smaller or a largerObjectivevalue is better.What a run knows about one metro, taken from the live Fabric catalogue.The set of metros one candidate design deploys in.One measurable quality of a portfolio, in its own unit.What anObjectivemeasured for one portfolio.The priced lines of one portfolio plus the items that could not be priced.Everything aSolverneeds.Searches the portfolios aSolveProblemallows and returns the trade-off frontier and the recommended option.How an objective's raw value becomes a 0..100 score (100 = best) for the weighted ranking.Linear between two fixed anchors, clamped.The value is a percentage: it is the score when larger is better, and 100 minus it otherwise.Min-max over the options being ranked.The ratio to the best value: an option 7% dearer than the cheapest scores about 93, one twice as dear scores 50.