From 9fc46553e1f9aca85ca1b6d4264b192cb810f6fe Mon Sep 17 00:00:00 2001 From: fyears <1142836+fyears@users.noreply.github.com> Date: Sun, 25 Feb 2024 23:54:54 +0800 Subject: [PATCH] update doc --- README.md | 5 ++--- docs/minimal_intrusive_design.md | 18 ++++++++++++------ docs/sync_algorithm/README.md | 7 +++++++ docs/sync_algorithm/v3/README.md | 4 ++++ docs/sync_algorithm/v3/intro.md | 12 ++++++++++++ 5 files changed, 37 insertions(+), 9 deletions(-) create mode 100644 docs/sync_algorithm/README.md create mode 100644 docs/sync_algorithm/v3/README.md create mode 100644 docs/sync_algorithm/v3/intro.md diff --git a/README.md b/README.md index 38f0fc7..9aac641 100644 --- a/README.md +++ b/README.md @@ -28,12 +28,11 @@ This is yet another unofficial sync plugin for Obsidian. If you like it or find - **[Minimal Intrusive](./docs/minimal_intrusive_design.md).** - **Skip Large files** and **skip paths** by custom regex conditions! - **Fully open source under [Apache-2.0 License](./LICENSE).** -- **[Sync Algorithm open](./docs/sync_algorithm_v2.md) for discussion.** +- **[Sync Algorithm open](./docs/sync_algorithm/v3/intro.md) for discussion.** +- **[Basic Conflict Detection And Handling](./docs/sync_algorithm/v3/intro.md)** now, more to come! ## Limitations -- **To support deletions sync, extra metadata will also be uploaded.** See [Minimal Intrusive](./docs/minimal_intrusive_design.md). -- **No Conflict resolution. No content-diff-and-patch algorithm.** All files and folders are compared using their local and remote "last modified time" and those with later "last modified time" wins. - **Cloud services cost you money.** Always be aware of the costs and pricing. Specifically, all the operations, including but not limited to downloading, uploading, listing all files, calling any api, storage sizes, may or may not cost you money. - **Some limitations from the browser environment.** More technical details are [in the doc](./docs/browser_env.md). - **You should protect your `data.json` file.** The file contains sensitive information. diff --git a/docs/minimal_intrusive_design.md b/docs/minimal_intrusive_design.md index 68bd86c..d897944 100644 --- a/docs/minimal_intrusive_design.md +++ b/docs/minimal_intrusive_design.md @@ -1,8 +1,10 @@ # Minimal Intrusive Design -Before version 0.3.0, the plugin did not upload additional meta data to the remote. +~~Before version 0.3.0, the plugin did not upload additional meta data to the remote.~~ -From and after version 0.3.0, the plugin just upload minimal extra necessary meta data to the remote. +~~From version 0.3.0 ~ 0.3.40, the plugin just upload minimal extra necessary meta data to the remote.~~ + +From version 0.4.1 and above, the plugin doesn't need uploading meta data due to the sync algorithm upgrade. ## Benefits @@ -12,10 +14,14 @@ For example, it's possbile for a uses to manually upload a file to s3, and next And it's also possible to combine another "sync-to-s3" solution (like, another software) on desktops, and this plugin on mobile devices, together. -## Necessarity Of Uploading Extra Metadata +## ~~Necessarity Of Uploading Extra Metadata from 0.3.0 ~ 0.3.40~~ -The main issue comes from deletions (and renamings which is actually interpreted as "deletion-then-creation"). +~~The main issue comes from deletions (and renamings which is actually interpreted as "deletion-then-creation").~~ -If we don't upload any extra info to the remote, there's usually no way for the second device to know what files / folders have been deleted on the first device. +~~If we don't upload any extra info to the remote, there's usually no way for the second device to know what files / folders have been deleted on the first device.~~ -To overcome this issue, from and after version 0.3.0, the plugin uploads extra metadata files `_remotely-save-metadata-on-remote.{json,bin}` to users' configured cloud services. Those files contain some info about what has been deleted on the first device, so that the second device can read the list to apply the deletions to itself. Some other necessary meta info would also be written into the extra files. +~~To overcome this issue, from and after version 0.3.0, the plugin uploads extra metadata files `_remotely-save-metadata-on-remote.{json,bin}` to users' configured cloud services. Those files contain some info about what has been deleted on the first device, so that the second device can read the list to apply the deletions to itself. Some other necessary meta info would also be written into the extra files.~~ + +## No uploading extra metadata from 0.4.1 + +Some information, including previous successful sync status of each file, is kept locally. diff --git a/docs/sync_algorithm/README.md b/docs/sync_algorithm/README.md new file mode 100644 index 0000000..c2adba5 --- /dev/null +++ b/docs/sync_algorithm/README.md @@ -0,0 +1,7 @@ +# Sync Algorithm + +* [v1](./v1/README.md) +* [v2](./v2/README.md) +* v3 + * [intro doc for end users](./v3/intro.md) + * [design doc](./v3/design.md) diff --git a/docs/sync_algorithm/v3/README.md b/docs/sync_algorithm/v3/README.md new file mode 100644 index 0000000..9e90cb3 --- /dev/null +++ b/docs/sync_algorithm/v3/README.md @@ -0,0 +1,4 @@ +# Sync Algorithm V3 + +* [intro doc for end users](./intro.md) +* [design doc](./design.md) diff --git a/docs/sync_algorithm/v3/intro.md b/docs/sync_algorithm/v3/intro.md new file mode 100644 index 0000000..0ad3a9f --- /dev/null +++ b/docs/sync_algorithm/v3/intro.md @@ -0,0 +1,12 @@ +# Introduction To Sync Algorithm V3 + +* [x] sync conflict: keep newer +* [x] sync conflict: keep larger +* [ ] sync conflict: keep both and rename +* [ ] sync conflict: show warning +* [x] deletion: true deletion status computation +* [x] meta data: no remote meta data any more +* [x] migration: old data auto transfer to new db (hopefully) +* [ ] partial sync: force push +* [ ] partial sync: force pull +* [ ] sync protection: warning based on the threshold