supabase / supabase-flutter

Flutter integration for Supabase. This package makes it simple for developers to build secure and scalable products.
https://supabase.com/
MIT License
703 stars 167 forks source link

Client side cache for offline data query #140

Closed iriealex closed 1 year ago

iriealex commented 2 years ago

With Firebase, when you make a change to a document, the document is automatically saved locally (in order to quickly update the views of the application) but this is not the case with Supabase (to my awareness).

Isn't there an existing system to do this or should we code it ourselves? Claiming to be a Firebase alternative, shouldn't this feature be one of the most basic to have been implemented?

bdlukaa commented 2 years ago

You mean cache? If so, this isn't implemented in the client libraries yet

iriealex commented 2 years ago

Yes, I mean cache !

dshukertjr commented 2 years ago

I wanted to link this issue to the following Github Discussions where they discuss offline support of Supabase.

https://github.com/supabase/supabase/discussions/357

iriealex commented 2 years ago

Ok. Let's do it!

On Mon, Jul 11, 2022 at 1:46 AM Tyler @.***> wrote:

I wanted to link this issue to the following Github Discussions where they discuss offline support of Supabase.

supabase/supabase#357 https://github.com/supabase/supabase/discussions/357

— Reply to this email directly, view it on GitHub https://github.com/supabase-community/supabase-flutter/issues/140#issuecomment-1179871403, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUYYUXV3LXSCDKVGHPRAHSDVTN4GRANCNFSM53F4FFRA . You are receiving this because you authored the thread.Message ID: @.***>

dshukertjr commented 2 years ago

Realistically speaking, it will take a while until we can bring this to Supabase, but it would for sure be an awesome feature to have. It turns out conflict resolutions in SQL database is very hard. Most of the databases out there that offer offline support are NoSQL database. That being said, we are constantly exploring options to bring this feature to Supabase!

iriealex commented 2 years ago

Thanks for the feedback!

Le lun. 11 juil. 2022, 11:28, Tyler @.***> a écrit :

Realistically speaking, it will take a while until we can bring this to Supabase, but it would for sure be an awesome feature to have. It turns out conflict resolutions in SQL database is very hard. Most of the databases out there that offer offline support are NoSQL database. That being said, we are constantly exploring options to bring this feature to Supabase!

— Reply to this email directly, view it on GitHub https://github.com/supabase-community/supabase-flutter/issues/140#issuecomment-1180288706, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUYYUXXEGVRXJN5MH5HMEQLVTQAOLANCNFSM53F4FFRA . You are receiving this because you authored the thread.Message ID: @.***>

dshukertjr commented 1 year ago

Just wanted to come back to this issue. Currently, Supabase's features require an internet connection in order to provide data. If the device goes offline, client cannot simply get data. This is a known limitation of Supabase, and we do have some attempts to solve it like this one. Until we find a proper fix for offline support across all Supabase producets, Supabase will remain to have a stable internet connection as a requirement. With this, I will close this issue for now.