github.com/cozy/cozy-stack@v0.0.0-20240603063001-31110fa4cae1/docs/diagrams/replicator.ditaa (about) 1 /------------\ 2 | | 3 | REPLICATOR | 4 | | 5 \------------/ 6 7 /-------\ /-------\ 8 | | | | 9 | ALICE | | BOB | 10 | | | | 11 \-------/ \-------/ 12 /------\ 13 |{s} | Changes feed 14 | +<----------------------------------- revs_diff 15 |Shared| 16 | +-----------------------------------> Changed: "doctype/id" -> [revs] /------\ 17 | | Changes∶ --------------------------------------------------> |{s} | 18 \------/ { present∶ "doctype/id" -> [revs] ----------------------------------->+ | 19 , removed∶ "doctype/id" -> {} |Shared| 20 } <-----------------------------------+ | 21 <-------------------------------------------------- | | 22 Missings: "doctype/id" -> { missings∶ [revs] } \------/ 23 24 25 26 bulk_docs 27 /------\ { start∶ int, ids∶ [hashs] } 28 |{s} | Bulk get DocsByDoctype∶ "doctype" -> [docs] ^ 29 | +<----------------------------------- | 30 | foos | { _id, _rev, _revisions, attributes or _deleted } 31 | +-----------------------------------> /------\ 32 | | --------------------------------------------------> |{s} | 33 \------/ ----------------------------------->+ | 34 | foos | 35 <-----------------------------------+ | 36 <-------------------------------------------------- | | 37 \------/ 38 39 40 41 /------------\ 42 | | 43 | UPLOAD | 44 | | 45 \------------/ 46 47 /------\ 48 |{s} | Find next file to upload 49 |Shared+<----------------------------------- metadata 50 | + | 51 |Files +-----------------------------------> { _id, _rev, _revisions, attributes } /------\ 52 | | --------------------------------------------------> |{s} | 53 \------/ ----------------------------------->+Shared| 54 | + | 55 <-----------------------------------+ Files| 56 <-------------------------------------------------- | | 57 { key∶ string } \------/ 58 /------\ 59 |{s} | 60 | +<----------------------------------- 61 |Swift | 62 | +-----------------------------------> upload /------\ 63 | | --------------------------------------------------> |{s} | 64 \------/ ----------------------------------->+ | 65 | Swift| 66 <-----------------------------------+ | 67 <-------------------------------------------------- | | 68 \------/