m-ld / m-ld-spec

Platform-independent m-ld specification
https://spec.m-ld.org/
MIT License
24 stars 1 forks source link

Split-brain handling #29

Open gsvarovsky opened 4 years ago

gsvarovsky commented 4 years ago

A clone is prompted to do the recovery dance when the remotes object revokes its 'live' status, for example if the network is down and the remotes object detects it is partitioned.

In the event of a split-brain, in which a set of clones partitions from another set, e.g. when using MQTT bridges, the remotes object may have no idea that this has occurred. The only clue is after the split heals and a message arrives for which the prev message is missing. All clones in receipt of such a message will then re-connect:

Probably need a much smarter way to detect and recover from this case specifically.

gsvarovsky commented 3 years ago

Hypothesis: All of this is solvable inside the Remotes implementation (in JS, a PubSubRemotes or a plain MeldRemotes).