3 // Config is used to set the parameters of the Vivaldi-based coordinate mapping
6 // The following references are called out at various points in the documentation
9 // [1] Dabek, Frank, et al. "Vivaldi: A decentralized network coordinate system."
10 // ACM SIGCOMM Computer Communication Review. Vol. 34. No. 4. ACM, 2004.
11 // [2] Ledlie, Jonathan, Paul Gardner, and Margo I. Seltzer. "Network Coordinates
12 // in the Wild." NSDI. Vol. 7. 2007.
13 // [3] Lee, Sanghwan, et al. "On suitability of Euclidean embedding for
14 // host-based network coordinate systems." Networking, IEEE/ACM Transactions
15 // on 18.1 (2010): 27-40.
17 // The dimensionality of the coordinate system. As discussed in [2], more
18 // dimensions improves the accuracy of the estimates up to a point. Per [2]
19 // we chose 4 dimensions plus a non-Euclidean height.
22 // VivaldiErrorMax is the default error value when a node hasn't yet made
23 // any observations. It also serves as an upper limit on the error value in
24 // case observations cause the error value to increase without bound.
25 VivaldiErrorMax float64
27 // VivaldiCE is a tuning factor that controls the maximum impact an
28 // observation can have on a node's confidence. See [1] for more details.
31 // VivaldiCC is a tuning factor that controls the maximum impact an
32 // observation can have on a node's coordinate. See [1] for more details.
35 // AdjustmentWindowSize is a tuning factor that determines how many samples
36 // we retain to calculate the adjustment factor as discussed in [3]. Setting
37 // this to zero disables this feature.
38 AdjustmentWindowSize uint
40 // HeightMin is the minimum value of the height parameter. Since this
41 // always must be positive, it will introduce a small amount error, so
42 // the chosen value should be relatively small compared to "normal"
46 // LatencyFilterSamples is the maximum number of samples that are retained
47 // per node, in order to compute a median. The intent is to ride out blips
48 // but still keep the delay low, since our time to probe any given node is
49 // pretty infrequent. See [2] for more details.
50 LatencyFilterSize uint
52 // GravityRho is a tuning factor that sets how much gravity has an effect
53 // to try to re-center coordinates. See [2] for more details.
57 // DefaultConfig returns a Config that has some default values suitable for
58 // basic testing of the algorithm, but not tuned to any particular type of cluster.
59 func DefaultConfig() *Config {
65 AdjustmentWindowSize: 20,