Should use Firestore + HiveDB or only Firestore with offline support

66 Views Asked by At

I'm a newbie in mobile development with Flutter. My application requires real-time updates from the server to devices, however, the data must be changed a few times per day then I want to apply local caching for it. I’m considering 2 options. First, using Firebase Firestore with a real-time update then anytime the server updates data, saving on Firestore devices will get updated and stored in HiveDB. It means Firestone looks like servers send events. I think this one has less latency, is fast, and saves cost. The second option will use only Firestore with offline compatibility mode, but i don't know so many details about this option.

For any update I will call APIs to the server not allowing to write data to firestore directly (CQRS pattern).

Any suggestions for me for this case. Thank you a lots.

Which one should i go? Or any alternative options?

1

There are 1 best solutions below

1
On
Firestore + HiveDB

Advantages: Real-time updates, offline support, fast access.
Considerations: Data consistency, complexity.

Firestore with offline compatibility mode

Advantages: Real-time updates, offline support, simplified implementation.
Considerations: Limited offline capabilities, network dependencies.

Choose ultimately based on your needs and factors like data consistency, complexity, offline functionality, and network dependencies.