Parse-SDK-Flutter icon indicating copy to clipboard operation
Parse-SDK-Flutter copied to clipboard

offline capabilities and auto-syncing

Open marqueeeeeee opened this issue 6 years ago • 17 comments
trafficstars

Does this support offline saving and auto-sync when network is available? similar to saveEventually from parse sdk and firebase db? Thank you!

marqueeeeeee avatar Apr 11 '19 05:04 marqueeeeeee

Hi @marqueeeeeee, this feature is not available yet.

RodrigoSMarques avatar Apr 14 '19 05:04 RodrigoSMarques

Hello, is the implementation of this feature planned? it would be great to have offline support

frsisalima avatar Aug 05 '19 15:08 frsisalima

we can implement saveEventually in android by caching saves if there is no connectivity then with the help of workmanager plugin which is a wrapper around android WorkManager we can sync the cached saves when the device connects to internet This is easy in android but I'm trying to figure out how to implement in iOS because the background jobs are restricted in iOS we have just background fetch. One point to have in mind about saveEventually is that there is no callback after saving I have an app which is developed using native sdk If the server is down and device get connected to internet the save fails

monajafi avatar Aug 22 '19 11:08 monajafi

Hey Noida

We should stick to keeping it pure Dart.

We simply need a connection manager and a save pool of objects.

On Thu, Aug 22, 2019, 12:35 Mousa Najafi [email protected] wrote:

we can implement saveEventually in android by caching saves if there is no connectivity then with help of workmanager plugin which is a wrapper around android WorkManager we can sync the cached saves when the device connects to internet This is easy in android but I'm trying to figure out how to implement in iOS because the background jobs are restricted in iOS we have just background fetch. One point to have in mind about saveEventually is that there is no callback after saving I have an app which is developed using native sdk If the server is down and device get connected to internet the save would fail

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/phillwiggins/flutter_parse_sdk/issues/149?email_source=notifications&email_token=AB4CPXQMFGGIJQ7HL47XF7DQFZ2YNA5CNFSM4HFDBAV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD44ZI7I#issuecomment-523867261, or mute the thread https://github.com/notifications/unsubscribe-auth/AB4CPXV7XA7LNTRLZTJ2PZ3QFZ2YNANCNFSM4HFDBAVQ .

phillwiggins avatar Aug 22 '19 11:08 phillwiggins

One important thing is that after successful save the save pool should be cleared not just after gaining connectivity and saving without considering the save result, which is a behaviour in native sdks

monajafi avatar Aug 22 '19 12:08 monajafi

100% correct logic. We only clear the pool, once confirmed successfully saved.

I was looking at this but in the past few months been too busy to implement.

On Thu, Aug 22, 2019, 13:00 Mousa Najafi [email protected] wrote:

One important thing is that after successful save the save pool should be cleared not just after gaining connectivity and saving without considering the save result, which is a behaviour in native sdks

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/phillwiggins/flutter_parse_sdk/issues/149?email_source=notifications&email_token=AB4CPXW35EJVEKF5SOZVJN3QFZ5V3A5CNFSM4HFDBAV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD443CGQ#issuecomment-523874586, or mute the thread https://github.com/notifications/unsubscribe-auth/AB4CPXRITUVEN7ICKJII3SLQFZ5V3ANCNFSM4HFDBAVQ .

phillwiggins avatar Aug 22 '19 12:08 phillwiggins

Would love to see this feature. It's basically all I'm missing from what I need to replace firebase in my app (hopefully before launching)

Is there some engineering docs for this that I could help contribute?

cadaniel avatar Nov 27 '19 13:11 cadaniel

The project is using SEMBAST which is also a NoSQL database written in Dart. The sample application is using SEMBAST to do some offline resources. Take a look at the sample project.

You can study the source of Parse SDK on Android to see how it works. This is how I contributed to this plugin.

RodrigoSMarques avatar Nov 28 '19 22:11 RodrigoSMarques

I also would love to see saveEventually implemented for both Android and iOS.

Sun3 avatar Dec 15 '19 05:12 Sun3

It's very important to have offline support for our application.

allanwolski avatar Jan 22 '20 18:01 allanwolski

It's very important to have offline support for our application.

I agreed

prasantco avatar May 28 '20 12:05 prasantco

Hello, any progress?

paulocagol avatar Feb 17 '21 01:02 paulocagol

No progress.

RodrigoSMarques avatar Feb 18 '21 02:02 RodrigoSMarques

No progress.

RodrigoSMarques avatar Feb 18 '21 02:02 RodrigoSMarques

Okay, thanks for the feedback.

paulocagol avatar Feb 18 '21 03:02 paulocagol

We need this feature. I moved from Firebase to Parse because it is a great OSS. But while migrating my app I have feeling of using other platform like Appwrite because this SDK is very parse specific. I mean why we need to use get set instead we can do it in simple dart way using constructors and ability to use freezed package to create data class will be great.

I haven't yet understood the usage of clone() in the SDK. I hope I can contribute to this awesome SDK in future.

2shrestha22 avatar May 25 '21 00:05 2shrestha22

For others looking here, this approach seems interesting, though it involves ditching the SDK sadly: https://www.back4app.com/docs/flutter/graphql/offline-first-database

sils avatar May 22 '22 20:05 sils

Nice!

sils avatar Oct 18 '23 20:10 sils

I Loved this feature from my objective C days nice one.

pastordee avatar Oct 18 '23 20:10 pastordee