diff options
| -rw-r--r-- | docs/development.md | 2 | ||||
| -rw-r--r-- | docs/example.toml | 2 | ||||
| -rw-r--r-- | src/config/mod.rs | 16 | ||||
| -rw-r--r-- | src/simtest/mod.rs | 4 | ||||
| -rw-r--r-- | src/swarm/hyparview.rs | 3 | ||||
| -rw-r--r-- | src/swarm/topology/mod.rs | 4 |
6 files changed, 17 insertions, 14 deletions
diff --git a/docs/development.md b/docs/development.md index ed95bf0..491bbc2 100644 --- a/docs/development.md +++ b/docs/development.md @@ -33,7 +33,7 @@ differ: one can't tell a small change from chance); with `SIM_DISSEMINATION=plumtree` (or `flood`), every simulated node passes changes on by PlumTree (or by flooding: `--dissemination`), the benchmark's views of the trees still being the writers' trees'; with `SIM_TOPOLOGY=hyparview`, every simulated node chooses -its neighbours by HyParView (`--topology`; with PlumTree unless `SIM_DISSEMINATION` +its neighbours by HyParView (`--topology`; with flooding unless `SIM_DISSEMINATION` says otherwise, as `--dissemination` defaults to then); all at once with `BENCH_PARALLEL=1`, faster on many cores, though sharing them makes delays come out somewhat higher; and in `bench_bridge`, large values from a writer on a fast transport diff --git a/docs/example.toml b/docs/example.toml index a44f1eb..a868327 100644 --- a/docs/example.toml +++ b/docs/example.toml @@ -201,7 +201,7 @@ htpasswd = "/etc/continuum/htpasswd" # alike from the member list) or hyparview (an active view of neighbours each agreed # to, the others asked from the member list as neighbours fail). Recorded and followed # as dissemination is (_continuum/topology); with hyparview, what needs the shared -# graph does nothing (writers' trees: use dissemination = "plumtree"). +# graph does nothing (writers' trees, so dissemination defaults to flood then). # topology = "ring-and-pairs" # Warn in the log when this node's clock differs from most of its peers' by more than diff --git a/src/config/mod.rs b/src/config/mod.rs index 25b1c73..db700ef 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -289,14 +289,14 @@ pub(crate) const OPTIONS: &[OptionSpec] = &[ Kind::Text, "ring-and-pairs|hyparview", Some("ring-and-pairs"), - "How a node's neighbours are chosen: by the graph every node computes alike from the member list, or by HyParView (an active view of neighbours each agreed to, the others asked from the member list as neighbours fail). A genesis node records its own in the document; every node follows what the swarm records, which a protocol writer may change (_continuum/topology), and uses its own only where the swarm records none it knows. With hyparview, what needs the shared graph does nothing (writers' trees: use plumtree).", + "How a node's neighbours are chosen: by the graph every node computes alike from the member list, or by HyParView (an active view of neighbours each agreed to, the others asked from the member list as neighbours fail). A genesis node records its own in the document; every node follows what the swarm records, which a protocol writer may change (_continuum/topology), and uses its own only where the swarm records none it knows. With hyparview, what needs the shared graph does nothing (writers' trees: use flood).", ), option( "dissemination", Kind::Text, "writers-trees|plumtree|flood", Some("writers-trees"), - "How a change reaches every member: along writers' trees computed alike on every node from the member list, by PlumTree (eager links pruned where they deliver twice, grafted where announcements had to bring a change), or by flooding (every change pushed to every neighbour: the baseline). A genesis node records its own in the document; every node follows what the swarm records, which a protocol writer may change (_continuum/dissemination), and uses its own only where the swarm records none it knows. Default: plumtree with topology hyparview, else writers-trees (docs/topology.md).", + "How a change reaches every member: along writers' trees computed alike on every node from the member list, by PlumTree (eager links pruned where they deliver twice, grafted where announcements had to bring a change), or by flooding (every change pushed to every neighbour: the baseline). A genesis node records its own in the document; every node follows what the swarm records, which a protocol writer may change (_continuum/dissemination), and uses its own only where the swarm records none it knows. Default: flood with topology hyparview, else writers-trees (docs/topology.md).", ), option( "superseded-writes", @@ -1552,15 +1552,17 @@ pub(crate) fn load() -> Result<Loaded> { const HYPARVIEW_NEIGHBOURS: usize = 5; /// Defaults that depend on other options, for those not `set`: with `topology -/// hyparview`, `dissemination plumtree` (writers' trees need the graph every node shares, -/// which HyParView has none of) and `neighbours` `HYPARVIEW_NEIGHBOURS`. +/// hyparview`, `dissemination flood` (writers' trees need the graph every node shares, +/// which HyParView has none of; flooding its 5 neighbours was faster than PlumTree over +/// them, at about as many messages: `docs/topology.md`) and `neighbours` +/// `HYPARVIEW_NEIGHBOURS`. fn derive_defaults(settings: &mut Settings, set: &dyn Fn(&str) -> bool) { use crate::swarm::dissemination::Kind as Dissemination; use crate::swarm::topology::Kind as Topology; if settings.topology == Topology::Hyparview { if !set("dissemination") { - settings.dissemination = Dissemination::Plumtree; - info!("topology hyparview: dissemination plumtree, as none is set"); + settings.dissemination = Dissemination::Flood; + info!("topology hyparview: dissemination flood, as none is set"); } if !set("neighbours") { settings.neighbours = HYPARVIEW_NEIGHBOURS; @@ -1579,7 +1581,7 @@ fn warn_combinations(settings: &Settings, set: &dyn Fn(&str) -> bool) { use crate::swarm::topology::Kind as Topology; match (settings.topology, settings.dissemination) { (Topology::Hyparview, Dissemination::WritersTrees) => warn!( - "topology hyparview with dissemination writers-trees: writers' trees need the graph every node shares, which HyParView has none of, so changes pass on by announcements alone, a round and a pull per hop; dissemination plumtree is what goes with it" + "topology hyparview with dissemination writers-trees: writers' trees need the graph every node shares, which HyParView has none of, so changes pass on by announcements alone, a round and a pull per hop; dissemination flood is what goes with it" ), (_, Dissemination::Flood) if settings.neighbours > HYPARVIEW_NEIGHBOURS => warn!( neighbours = settings.neighbours, diff --git a/src/simtest/mod.rs b/src/simtest/mod.rs index 011483e..b609d8a 100644 --- a/src/simtest/mod.rs +++ b/src/simtest/mod.rs @@ -200,12 +200,12 @@ impl Sim { _ => Default::default(), }, // `SIM_DISSEMINATION=plumtree`: every simulated node passes changes on so. - // Unset with `SIM_TOPOLOGY=hyparview`: PlumTree, as `--dissemination` is then. + // Unset with `SIM_TOPOLOGY=hyparview`: flooding, as `--dissemination` is then. dissemination: match std::env::var("SIM_DISSEMINATION").as_deref() { Ok("plumtree") => crate::swarm::dissemination::Kind::Plumtree, Ok("flood") => crate::swarm::dissemination::Kind::Flood, Err(_) if std::env::var("SIM_TOPOLOGY").as_deref() == Ok("hyparview") => { - crate::swarm::dissemination::Kind::Plumtree + crate::swarm::dissemination::Kind::Flood } _ => Default::default(), }, diff --git a/src/swarm/hyparview.rs b/src/swarm/hyparview.rs index 6e363e3..17d36b8 100644 --- a/src/swarm/hyparview.rs +++ b/src/swarm/hyparview.rs @@ -20,7 +20,8 @@ //! //! There is no graph every node shares (`Topology::graph`): what needs one does nothing //! (writers' trees, recorded links, indirect probes), so changes pass on by a -//! dissemination that needs none (`--dissemination plumtree`), or by announcements. +//! dissemination that needs none (`--dissemination flood`, its default here, or +//! `plumtree`), or by announcements. //! //! A member being asked counts as a neighbour already: it gets HELLOs, and NEIGHBOUR //! goes once the handshake is done (a swarm's members only take messages from peers diff --git a/src/swarm/topology/mod.rs b/src/swarm/topology/mod.rs index 14e9de6..c23d2b2 100644 --- a/src/swarm/topology/mod.rs +++ b/src/swarm/topology/mod.rs @@ -51,7 +51,7 @@ pub(crate) use graph::{RingAndPairs, pair_key, pair_score}; /// trees (`member_list_graph`, `swarm::tree`), the links members record where it is /// wrong (`working_graph`, `swarm::working_links`), indirect probes through a member's /// neighbours, the dashboard's map of the intended links (`intended_graph`). A -/// dissemination that needs none goes with such a topology (PlumTree). +/// dissemination that needs none goes with such a topology (flooding, PlumTree). #[async_trait::async_trait] pub(crate) trait Topology: Send + Sync + 'static { /// Its name (in logs, and once chosen by the swarm, in the document). @@ -212,7 +212,7 @@ fn switch_ways(state: &AppState, kinds: (Kind, crate::swarm::dissemination::Kind && kinds.1 == crate::swarm::dissemination::Kind::WritersTrees { warn_once( - "Writers' trees need a graph every node shares, which this topology has none of: changes pass on by announcements alone (a protocol writer may record dissemination \"plumtree\")", + "Writers' trees need a graph every node shares, which this topology has none of: changes pass on by announcements alone (a protocol writer may record dissemination \"flood\")", ); } } |
