Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-device sync/recover capability #2013

Open
Fmstrat opened this issue Dec 9, 2024 · 4 comments
Open

Multi-device sync/recover capability #2013

Fmstrat opened this issue Dec 9, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@Fmstrat
Copy link

Fmstrat commented Dec 9, 2024

Describe the feature
If open to it, considering authoring a PR for full-sync and recover. This is similar to previous sync requests like backing up to cloud providers, but would handle the sync the same way applications like Steam or Google Play do.

UI additions:

  • Toggle for sync
  • Sync server URL selection
  • Device name (defaults based on similar name pattern to Firefox)
  • Sync credentials
  • Additional dropdown on restore screen for "Install to match /none
  • In each app details, a list of "Installed on" devices

Backend additions:

  • Current backup format in JSON is used, but
    • Each installed app gets an Installed On array of devices
  • When opening Obtainium and/or adding a new app, a sync occurs
  • Adding apps is not allowed if sync fails
  • When installing/uninstalling/removing, a date time flag to indicate action is added in an Actions array
  • Removing an app keeps the app in the configuration, but hides it from the UI

Sync method:

  • For each app, whichever Action has the latest date (device or server) is used
    • If server has newer action than device, and server says installed for the current device but device says it is not, an Action of ResolveUninstalled is added to the array and saved in both locations
      • This is ignored if "restore" is in progress
      • Potential v2 revision to this to allow for "install on another device"

Still debating on the sync server infrastructure. I could pretty easily make a docker-based service with a postgres DB, but users may prefer a selection of cloud providers like Drive and Nextcloud. The advantage of the former is you (or anyone) could run a multi-user sync service, which could be a pathway to revenue if you so desired (I would only submit a PR under the current license, though).

Describe alternatives you've considered (if applicable)

Current export/import

Additional context

I want to be able to use Obtainium across multiple devices fully de-googled. This would be a lot easier if Obtainium supported a centralized account structure.

@Fmstrat Fmstrat added enhancement New feature or request to check Issue has not been reviewed labels Dec 9, 2024
@Fmstrat
Copy link
Author

Fmstrat commented Dec 9, 2024

I should.probably note, I have a good bit of experience in sync. I authored OwnNote for OwnCloud, a sync service for Plex, an Rclone system for Steam Deck retro game save sync, and many moons ago helped debug port issues with Firefox Sync.

@ImranR98
Copy link
Owner

ImranR98 commented Dec 9, 2024

I have closed similar issues in the past because it's not something I would undertake (usually issues I don't plan to work on do remain open for others to contribute, but I didn't think there would be any PRs for something this big). But if you're planning to contribute a PR, that would definitely be accepted after review. Personally I'd prefer the Docker-based self-contained option since it's less hassle (Nextcloud has always been very frustrating/buggy for me) but that's up to you of course. And yes, the license is not going to change.

I don't know if you've looked at any code yet (it's a mess). Obtainium currently stores the app config and install state in the same file, so I guess a prerequisite for any sync work would be to first separate them (and associated save/load functions).

@ImranR98 ImranR98 removed the to check Issue has not been reviewed label Dec 9, 2024
@Fmstrat
Copy link
Author

Fmstrat commented Dec 9, 2024

@ImranR98 Sounds good, I'll take a look. Perhaps I'll start by taking the config and building the server-side aspects so I can get the backend to a point of acceptable use before going too deep into the app code, though at a glance it doesn't seem more complex than other projects.

This may take me a while since I don't have that much spare time, but if you don't mind this issue hanging around for lurkers, I'll start a draft PR at some point and ping this issue.

@Fmstrat
Copy link
Author

Fmstrat commented Dec 9, 2024

We could probably include E2E encryption, and running a server on a $5 a month Linode would be more than enough to support the entire community, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants