Open HikariWS opened 3 years ago
which has the structure: device > windows > tabs
browser > windows > tabs
might make more sense, then you could sync between different browsers on the same machine (Chrome and Firefox, Chrome Nightly, Firefox Developer Edition etc.)
Being able to add a "friendly name" for browsers might make this easier for users. e.g.: Chrome Home, Firefox Home, Chrome Work.
Related to #76
I've been using Vivaldi Sync, I think TabFern could use a similar design. Each device sends to server the data of all its windows and their tabs, then from any device we can see what's opened on the others, and open locally any tab and send a tab to any device. That's simple and still very powerful!
TabFern could subscribe its data of local device on the sync storage, which has the structure: device > windows > tabs. In example 1 file for each device. That registers all devices and current state of their tabs. Only a device can write on its data, this avoids sync conflicts.
Then it reads the sync storage to get updated on the state of all other devices. From it, we can see them all as we see now our local windows and tabs. We can copy a tab or window from another device to local.
In a 2nd stage, we can get a device to send tabs and windows to other device. That's more tricky as we'd need to handle sync conflicts. Vivaldi doesn't do that automatically, the device that's receiving a tab shows it on a notification and we need to activate the notification so the tab is opened. Maybe, instead of writing on another device's file, it can create a secondary file notifying that device that it's receiving a tab or window. When the device sees the file, it notifies the user, and when user reacts to it, the file is deleted.
For the sync storage, I like to keep it open. As I said on some comment, Tabs Outliner uses GDrive webservice to store and load its backups. I think a cloud storage service's webservice is indeed the easiest way to do. I'd personally rather use Dropbox than GDrive :P