aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/architecture.md11
1 files changed, 7 insertions, 4 deletions
diff --git a/docs/architecture.md b/docs/architecture.md
index 1a320fc..0ef4f37 100644
--- a/docs/architecture.md
+++ b/docs/architecture.md
@@ -115,7 +115,9 @@ ignored 25-node soak test with a propagation bound (`cargo test soak -- --ignore
| `changes` | the change publisher: the store paths each change touched (`change_events`) | module docs |
| `document_file` | the worker keeping the document file (`document::file`) up to date | module docs |
| `source` | the one peer a catching-up node syncs with, and when to give it up | [`peers.md`](peers.md) |
-| `relay` | announcing heads to neighbours and pulling what's missing (partial mesh) | module docs |
+| `tree` | writers' trees: passing each writer's changes on to the members after us in its tree, the same on every node | [`peers.md`](peers.md) |
+| `reach` | whom each neighbour reaches, as it says in its STATUS: the 2-hop neighbourhood trees are built on | [`peers.md`](peers.md) |
+| `relay` | announcing heads where trees don't reach (at once) and to everyone else (slow round), and pulling what's missing | module docs |
| `links` | answering LINKS with this node's links, for the dashboard's map | [`dashboard.md`](dashboard.md) |
| [`topology/`](../src/swarm/topology/) | which members are neighbours: ring plus low-score links, stable members preferred | module docs |
| `members` | the member registry: aliases, alive stamps, tiers, the electorate | module docs |
@@ -224,9 +226,10 @@ catch-up source. The phases, what each serves and how the files come in: [`lifec
**A write.** `PUT /store/{path}` → `AppState::mutate_doc` (one Automerge change under
the write lock, stamped with the clock) → `publish_change` (bumps the version, emits
`DocumentChanged`) → the sync worker generates a message per neighbour → each
-neighbour applies it, relays its new heads to *its* neighbours, which pull what they
-lack. In a full mesh (up to `k + 1` members) too: the writer may not reach everyone
-the member list makes its neighbour.
+neighbour applies it and sends it at once to its children in the writer's tree (the
+writer known from the changes' author), which do the same; the members the trees miss
+are told of the new heads by announcement and pull what they lack, at once where no
+tree reaches them, else in the slow round 2 s later.
**An inbound message.** Consumer → `handle_message`: drop our own and stale-run
replies, admit (swarm key), mark the peer seen, record its epoch (ignoring late ones),