Ive been using RTDB for many years throughout various projects, and Ive always followed a hybrid approach where my SOT is an SQL database, and RTDB simply acts like the cherry on top that makes synchronization between devices and data backups work flawlessly. Practically speaking, Im observing for changes in RTDB, and anytime a path/branch is synchronized, the needle (lastSyncTimestamp) for that branch is moved forward so that I only ever observe the smallest possible amount of data. Besides some memory related issues, I have no complaints - it works great.
For a new project Ive opted to use Firestore, and Im now considering using it as my SOT over SQL. Its querying capabilities cover all my needs, and obviously not having to maintain two storage mechanisms is a huge time and brain saver. Yet Im not sure if Im shooting myself in the foot by doing so. My primary concerns are the following:
• Offline: I know that both RTDB and Firestore have awesome offline capabilities, yet its hard to find resources about using it as the SOT, and its hard to find out how well/bad it works when good internet isnt available for periods of time.
• Speed: Since Id query data on a need basis, I imagine there will be quite many scenarios where the user might select another item to view - and Im fairly certain this will be slower than always having that data available locally. How much slower? No idea.
• Costs: The moving the needle bit above has meant moving much less data around. Yet having the SQL database as SOT has meant that I could query to my hearts content without having to worry about any associated costs. Despite a lot of users using it to store a ton of data, my costs are very minimal. Using firestore (or RTDB) as the SOT would mean more data moving around, and higher costs.
I understand that nobody else can make this decision for me - but Im hoping that by asking this, I can at least make the most informed decision possible. Id love to hear your thoughts; if you have any experiences to share, or any relevant resources (Ive read through documentation and probably a bit too many articles). Thank you!