Futureglobe / SnipAway_IssueTracker

Public Issue Tracker for SnipAway a highly customizable snippet manager made for developers
https://snipaway.futureglobe.de/
4 stars 1 forks source link

Improve snippet file changes and reading (refreshing data) in shared storage scenario (sync)? #22

Closed zigiMX closed 3 years ago

zigiMX commented 3 years ago

SnipAway seems to be working with synced/shared file storage (repo). Personally I am sharing snippet folder folder with 5-6 clients. Actually I am using it like that for quite some time ( from version 1.1.X ). It was buggy in the start but I got it working by importing settings and sharing same directory and keeping client version unified. Honestly I expected more issues and crashes but it seems that is handling multiple clients and changes, it worked quite good actually.

In this (multi client / sync) scenario there is a problem with updates and changes on snippet files. They are only visible after restarting app. For example: if 2 clients are editing snippets using shared storage, changes from other client are visible only after restart and vice versa. I am guessing snippet files are not read directly from source (repo), or snippet data is buffered in memory/temp storage during startup, I can't tell... Either way it makes sense but only downside here is that SnipAway is not detecting changes when they happen, data is static on the main screen, only after you restart the app. Writing to repo on the other hand is happening instantly, so no problem there.

If snippet storage folder is shared via drive/dropbox/nfs/smb/ or in my case SynchThing Service which is rsync over peer connection, this means file locking mechanisms and collisions are handled by syncing client and file sharing protocols, correct? Could this be easily mitigated as changing the read/cache strategy or periodic data pulling from storage? Syncing instantaneously while detecting changes on storage between parallel app/clients that use cloud/sync/network share, that would be cool little extra functionality.

Futureglobe commented 3 years ago

Hi @zigiMX ,

First of all thank you very much for your effort in explaining your situation. You got it right with how SnipAway works when sharing snippets. We only detect snippet changes on the first app startup and when you create a snippet. We also have a option inside the menu bar called reload snippets which could be used to reload the snippets and detect changes without restarting the app. We hope this helps you in your situation. We haven't designed SnipAway for cooperative work but are happy to hear that you somehow can atleast use it for your purpose.

Thank you,

Your Futureglobe Support Team