From c7cbb3bbd6183988e39fb68453f1efadc85da7a3 Mon Sep 17 00:00:00 2001 From: Sergey Chernov Date: Wed, 21 Jun 2023 09:01:49 +0000 Subject: [PATCH] Add 'safe multimerge' --- safe-multimerge.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 safe-multimerge.md diff --git a/safe-multimerge.md b/safe-multimerge.md new file mode 100644 index 0000000..4ad262e --- /dev/null +++ b/safe-multimerge.md @@ -0,0 +1,46 @@ +# Diagrams + +Bob, Alice and Carol are editing the same data item. When they try to send updates to the server, 8 RAYS cloud enforces the order that only changing _last saved block state_ is actually allowed, so only one update is accepted and the rest get the merge request. + +The multimerge cycle sample: + +```mermaid +sequenceDiagram + actor Alice + actor Bob + actor Carol + participant Server + Note over Server, Alice: initial data: Hello world + par conflicting update 1 + Alice->>+Server: data: Hello, world! + Server-->>-Alice: accepted + Bob->>+Server: data: Hello, cruel world + Server -->> Bob: merge request + Carol->>+Server: data: Bye, world + Server -->> Carol: merge request + end + note left of Server: now "Hello, world!" + + par conflicting update 2 + Bob->>+Server: data: Hello, cruel world! + Server -->> Bob: accepted + Carol->>+Server: data: Bye, world! + Server -->> Carol: merge request + Server --) Alice: update data + end + note left of Server: now Hello, cruel world! + + par update 3 + Carol->>+Server: data: Bye, cruel world! + Server -->> Carol: accepted + Server --) Alice: update data + Server --) Bob: update data + end + note left of Server: now Hello, cruel world! + Note over Server, Alice: syncronized data: Bye, cruel world! + +``` + +Note that update data pushes from the server are send asynchronously and in the case the party got "merge required" answer the rendundant notification could be trashed by the server, this is a RC based issue, so each "merge required" and "update data" has identification data to avoid repeating updates/megres. + +