traggo / server

self-hosted tag-based time tracking
https://traggo.net
GNU General Public License v3.0
1.21k stars 58 forks source link

Syncing between 2 servers #188

Open Minnowo opened 1 month ago

Minnowo commented 1 month ago

I have recently created Traggo Android. Currently there is no UI, just a blank white app, but it runs the Traggo server in the background so it can be accessed via a browser.

With the option of running 2 servers, one on mobile, and one on desktop, it would make sense to have some method to sync between them. It was probably not the intended case to have more than a single server running, but the mobile app allows using Traggo without internet, which was my main reason for making it.

I plan on working on this feature once the mobile app is a little more usable, so I'm just putting the idea here for now.

I have 2 ideas right now:

  1. A sync to file option, that exports / imports the sqlite database to a folder. This would mean syncing could be done via some 3rd party. (I guess this is already possible? I don't know how Traggo would handle the database being changed while running)

  2. A sync page, with a list of Traggo servers. You'd add a server by swapping some key on both ends and a network location to access eachother, and then they would sync over some new API when you click a button, or automatically.

jmattheis commented 1 month ago

I don't think I'd want to support this natively because nowadays you likely always have access to internet and if not, you could wait until there is a connection.

Supporting syncing of two servers would be complicated because there could be changes on both servers that have to be merged and I don't think this is worth the development and maintenance cost.