Can offline FireBase be used only for localstorage?

Consider a blogging application that allows offline mode in the free version. And as soon as the user subscribes to the paid version, the data is synchronized with firebase.

The question is, since firebase has autonomous capabilities, can it work (for example, Parse), that requests will explicitly use local storage when requesting data? (Saving / reading). Thus, paid sync can only be a function flag

Due to the fact that I can say by looking at the documents, the offline feature seems to be designed only for β€œkeep offline while I'm offline” scenarios

thanks

+6
source share
1 answer

The Firebase database is basically an online database that continues to work when the user is offline.

While the user is disconnected, Firebase queues the local write operation in memory (and if you call setPersistenceEnabled(true) on disk). The way this works means that local-level performance will deteriorate as the local write queue increases.

So, if you do not have a reasonable maximum for this local number of writes, your script may not work in the stand-alone Firebase architecture.

+4
source

Source: https://habr.com/ru/post/1247406/


All Articles