Can I use two sync method together to sync between mobile and desktop?

I’m considering a ipfs p2p sync-adaptor, so I can sync Desktop (TidGi nodejs wiki)'s changes to Mobile (Tiddloid HTML wiki) and vice versa.
But can I use two sync-adaptor at the same time on nodejs? (ipfs sync-adaptor and nodejs default sync-adaptor) Will there be some weird thing happening?

On the Tiddloid side, its HTML wiki will need to get new tiddlers from the ipfs sync-adaptor, and use file saver to save to local, I don’t know if this will work correctly…


I may consider using a saver, let @donmor3000 's Tiddloid open and save nodejs wiki’s webpage from local network, overwrite one of the local Tiddloid’s HTML wiki, to achieve the sync from Desktop and Mobile.

And later, from Mobile to Desktop TidGi app, use a saver to send HTML .
And later, from Desktop to Mobile (I don’t know if save can do this) on Mobile let saver fetch Desktop’s webpage and apply the full wiki to local HTML.

I decided to write a saver plugin that can load wiki from a URL and overwrite local HTML.
And that saver should be able to upload local HTML to a nodejs wiki to save back.

Can’t wait to see it!

1 Like

Just some thoughts…

Synchronizing between devices is hard. I currently use Syncthing (a client on my computer and on my phone) to sync my TiddlyWiki html file, but there’s always a risk of conflicting changes.

The best way to avoid conflicts, I found, was to use a third, always-on device. I have a Linux server that also runs Syncthing, so all changes on my phone are immediately stored on the server, even if my computer is turned off (and vice versa). Then synced when turned on, of course.

But this doesn’t always work, e.g. when Syncthing on my phone turns off due to energy saving mode or no wifi connection and so on (I can change these settings if I like). Then Syncthing will save a backup of the TiddlyWiki html, so that I can manually compare two conflicting versions, and merge.

This is a hassle, and not something ordinary users will endure. I’m very tempted to run TiddlyWiki on a web server instead, but then it will load slower, I won’t have offline access, and I would like to authenticate with a client certificate as well as a password, but that’s difficult to do on the phone.

Everyone else in this world is using cloud services or cloud-sync, but we’re still trying to reinvent the wheel.

1 Like

Barely forget this thread…

I developed the GitHub - tiddly-gittly/tw-mobile-sync: Sync data between Mobile HTML (Tiddloid) <-> Desktop App (TidGi) to do so, you can sync between desktop and mobile in a click, no much worry about conflict I think.

You can install it from CPL TW5 CPL Wiki — TiddlyWiki5 Plugin Library for TiddlyWiki Chinese Communities

You can also use syncting to sync HTML wiki, but that may causes conflict if you have changes on both side. NodeJS wiki on the desktop may make it conflict-free, because each change happened on separate files.

The Original thread is just one answer to the more general issue of multi-device use of a tiddlywiki.

Ideally you would have one source of truth, such as an online wiki and take steps with Local storage to allow off line use. For the occasions where one or more devices are offline and you could make un-synced changes, a method to set which device is the owner of the wiki can also be developed to protect the integrity of the files.

Ideally the single source of truth would be a Bob multi-user implementation and at the most the conflict would be only at a tiddler level if at all. I believe you can still use local storage for offline use in Bob as well (not recently verified).

However

There is often other opportunities when you step back and think about the real world problem for example;

  • if your aim is to have a “portable tiddlywiki”, one you use on your desktop but is available when mobile, and as a result you always have your mobile with you (but not your desktop) then it may be as simple as keeping the wiki on your mobile, but allowing you to access it when on the network from your desktop. When using it on the desktop you could do a desktop backup in case you loose your mobile. That is the mobile becomes the source of truth
    • Using a mobile to desktop sync method may work but it adds a level of complexity and risk you may be able to avoid. Just access it from the desktop directly on the phone via the file system when USB connected or wirelessly.
    • Adding a little switch so the Mobile can have “it open for edit”, then release it for edit on the desktop and visa versa would help. I have done some proof of concept designs on this.

Alternatively although somewhat convoluted you could install Bob on your mobile (android at least) via Termux and allow multiple access via wifi from your desktop, so the mobile is the source of truth and also a multi-access multi-user server that your desktop can access (only on the LAN).

It is always worth stepping back and looking at the big picture and usage patterns before focusing on a specific technical solution. However as a professional in IT I have found its almost impossible to teach people how to do this, even document it, because there are always many variables and especially the multi-variable humans that are involved.

That reminds me of the Joke;

The most unpredictable part of a vehicle is the “Nut behind the wheel”