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

DataStore: support pausing/resuming of cloud sync #5037

Open
nylki opened this issue Mar 4, 2020 · 14 comments
Open

DataStore: support pausing/resuming of cloud sync #5037

nylki opened this issue Mar 4, 2020 · 14 comments
Labels
DataStore Related to DataStore category feature-request Request a new feature

Comments

@nylki
Copy link

nylki commented Mar 4, 2020

Is your feature request related to a problem? Please describe.
If I understand correctly, the DataStore currently always syncs updates immediately to the cloud. This may not be desirable for battery conservation and data usage. We have fullSyncInterval but DataStore will still sync updates in between full syncs.

Describe the solution you'd like
I would like the DataStore-API to support a manual cloud-sync functionality, so that the App could for example sync only a few times a day eg. when the device is connected to power.

eg.:

DataStore.configure({
   manualSync: true
})

DataStore.sync()

or, alternatively, when auto-syncing an option to pause auto-syncing:

// When power is low
DataStore.pauseAutoSync()

// user has plugged in power
DataStore.resumeAutoSync()

Describe alternatives you've considered

Not using DataStore, but fetching/sending data via regular graphQL-API and store the Data manually in a storage-api (localstorage, indexedDB and or React-Native's AsyncStorage). This would complicate things, due to mapping different graphQL datatypes to the storage-api, something that DataStore already does.

Additional context
If this should be already possible in some way, the documentation should be edited to include the feature.

@nylki nylki added the feature-request Request a new feature label Mar 4, 2020
@mdoesburg
Copy link

I need this feature too. Use case:

I am working on an app in which people might be in remote locations (in the jungle, top of a mountain etc.). In the app users have to be able to set if they only want to sync if they are for example on a WiFi network to prevent data charges.

@iqaldebaran
Copy link

I need this feature too¡¡¡
Use Case:
I am working in an app that have a free function with Datastore locally, and a pay function with cloud storage, and this feature proposed by @nylki is so useful for me.

@JPVan
Copy link

JPVan commented Sep 8, 2020

I would also love this feature. Both for a free vs paid user scenario, and also to have control over the number of writes to AppSync. In my use case, users edit only their own data, and only view data from other users. This data needs to be updated in the cloud only once per day, but will be entered locally several times a day. It would be nice to save to the cloud once per session, or only once per day.

@amhinson amhinson added the DataStore Related to DataStore category label Oct 20, 2020
@imoby
Copy link

imoby commented Oct 31, 2020

Please add this!

@jtich
Copy link

jtich commented Nov 4, 2020

+1

@jacobsapps
Copy link

Bumping this - it's needed badly.

I've got a pre-sign-up flow where users create a bunch of data, which saves locally on a User object without an ID. When signing up, this is copied as a real User object with a UUID, and deleting the placeholder, but sometimes the placeholder syncs to DynamoDB too...

@sasweb
Copy link

sasweb commented Feb 2, 2021

+1

2 similar comments
@fizan2904
Copy link

+1

@sallymoon10
Copy link

+1

@nemezisSherokee
Copy link

Hello is the feature now available ?

@sacrampton
Copy link

Our use case is for highly intermittent networks - if its on/off/on/off/on.... then the sync is trying to restart over and over again and consumes essentially all of the phone's resources. This leads the app to hang for several minutes and in some cases eventually crash. Our customers are in very remote places that have highly intermittent networks. They are industrial sites that have some network access, but it varies as they walk around the site.

We need to be able to tell DataStore not to try to sync - alternatively, but be able to have it as a lower priority background process that does not overwhelm the application.

@emilyahsu
Copy link

emilyahsu commented Jun 22, 2022

Hi all,

I'm Emily, a UX Designer on the AWS Amplify team, and we're conducting user interviews to learn more about the use cases of offline-first vs online-only development modes. The interview will be take at most 30 minutes, and as a “thank you”, we’d love to provide you with $25 in AWS credits for your time.

If you are interested in participating, please email me at emilyhsu@amazon.com and we can schedule a time. Thanks!

@chrisbonifacio chrisbonifacio removed the p3 label Feb 7, 2024
@jreyesgfi
Copy link

Is there any update regarding this feature?

@sacrampton
Copy link

sacrampton commented Sep 1, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DataStore Related to DataStore category feature-request Request a new feature
Projects
None yet
Development

No branches or pull requests