| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
Two nodes of both kinds say an Automerge document in their handshakes,
and synced that alone: what only sets hold, the entries of the nodes on
sets, stopped at the first node of both it reached, so that in a swarm
larger than its neighbour count the nodes on sets never came to read
each other's entries. A node of both now says where its set stands
beside each STATUS to a peer on a document; one of both that hears it
passes its set on in turn, one on the document alone drops it.
A simulation of nine nodes, three of each kind, two neighbours each.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With store-document, store-both has the node hold its store in the
Automerge document too, and sync with nodes of either kind:
* it says to each peer the kind that peer holds, and passes its set on
to those that hold sets (swarm::set::holds_a_set), the Automerge
document to the others;
* what its set takes of the document goes on to the peers on sets
(Holding::unpassed), and what its set takes of them is put into the
document, as events it lacks are (Holding::lacking);
* its entry in the document is put as its entry in the set
(swarm::set::mirror_entry), and it reads the members of both;
* without the set's file yet, its set is made of the store as it reads
it of its document, with what store-file kept of its own.
A simulation: two nodes on the Automerge document, one on a set, one
of both between them; an event put on either side reaches all four.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Such a node (Holding::carrying) holds an Automerge document with
nothing in it, which nothing passes on, and its set is its document:
* swarm::set passes the set on. Where it stands goes in the node's
STATUSes as another kind's stamp, and a peer's is given to the set;
what the set says besides goes as a SYNC's body; what the set took, of
a peer or of the node itself, goes on to the node's other neighbours.
What compares stamps for an Automerge document's sake is handed the
node's own, and finds nothing to do; the Automerge sync isn't begun.
* The node writes its own entry (AppState::mutate_set): what writes
protocol data through a view writes to the members' entries as a
tree, and what the node's own reads as after is put as its next
entry, signed and passed on. Anything else is refused, and so is a
write to an Automerge document as such.
* An event the node writes (held::write) is offered to the set and
passed on; a set lacks nothing of its store to put again.
* The node's swarm is its store's, said at its start.
A simulation: three such nodes of two parties register, and each
holds the others' entries; events put on two of them reach all three,
and they come to stand alike, the documents they hold beside empty.
|
| |
|
|
|
|
|
|
|
|
| |
document::passing: a Mark, where a document stood, by which what
changed since and the node's own units since are told (changed_since,
own_since: the change publisher, the sync worker); and of where a peer
says it stands, what the document lacks, whether the peer holds what
the document held, a pull of what is lacking, and what it has counting
as sent no more (lacking, peer_holds, pull, heard: the relay,
keepalives). The published stamp gives its summary and its mark.
|
| |
|
|
|
|
|
|
|
|
|
| |
A seed that named no root, joining itself, names it once ready, but only
from this build on: a 0.0.1 seed never shakes hands again, and its joiner
waited for ever. scripts/wire-check hit that, d of this tree joining
through c of 0.0.1, their handshake 6 ms before c was ready.
So the joiner does its half too: where a seed it still waits for named
none, a STATUS saying the seed became ready has it shake hands with the
seed again (seed_ready), which then names its root.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
While we wait for a peer's HELLO_REPLY, anything else that comes from it
makes our HELLO go again at once, at most once a second, instead of when
the backoff says.
|
| |
|
|
|
|
|
|
| |
Before pulling, a node waits one measured round trip to the announcer
(1 s at most) and pulls only what is still missing. If the round trip
isn't known yet, it pulls at once, as now. On the clean benchmark links
the round trip is a few milliseconds, so those scenarios shouldn't
change.
|
| |
|
|
|
|
|
| |
A neighbour now answers an announcement only if it lacks some of the
announced heads. Heads that merely differ are no longer enough, since
they do while writes go on. The check reads the document, so it runs
off the message consumer, as the pull check already does.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|