Switching or migrating from local-only ObjectBox to ObjectBox Sync

69 Views Asked by At

Neither Firebase Realtime db or Atlas Realm support this, but it's not clear from the docs whether ObjectBox supports this.

What I want to do:

  • I don't want to require users to create an account to use my audio app.
  • Initially they'd be using the app with their preferences and playlists being saved in ObjectBox locally.
  • If they want to access their saved preferences on other devices they have the option to create an account, at which point I'd like to switch to using ObjectBox Sync.

Questions:

  • Does ObjectBox support switching from a local-only ObjectBox to ObjectBox Sync?

  • If not, does it support manual migration by creating an ObjectBox Sync and then opening the local-only ObjectBox and migrating the data in code?

  • If it doesn't support either of these are there any plans to do so in the future? The ability to switch from a local-only db to a synchronized db, and maybe even back again, is something I see devs looking for. Not every user wants or needs synchronization and devs don't want to require account registration for everyone just to support the subset that does. They also don't want to pay for the overhead of synchronization for every user, when most are just single device users.

  • On the ObjectBox website it sounds like ObjectBox Sync can be either hosted by ObjectBox or downloaded and self-hosted. Is that correct, and if so, what's the pricing for self-hosted?

So far I've tried this with other realtime sync databases, with only Firebase Realtime coming close. The problem with Firebase Realtime is in local-only mode it runs with Anonymous auth, which can't be relied upon for long term storage--I'm not sure why that is.

1

There are 1 best solutions below

0
Uwe - ObjectBox On

There is currently no user-specific syncing (see FAQ at https://objectbox.io/sync/). Entities can not be changed from non-sync to sync (https://sync.objectbox.io/sync-client).

But a solution can be to have two separate stores and only one that syncs and is used on-demand as you suggested.

As for pricing you probably should contact ObjectBox: https://objectbox.io/sync-pricing/