-1

I have an app that I want to build using Firebase which is basically a chat for users.

There are chat rooms that are temporary, meaning that after each day the rooms (and consequently all the messages) get deleted.

I see a lot of good things about Firestore, but in this case I'll be deleting potentially a lot of messages. Firestore is not only a bit iffy for deleting a bunch of stuff, but also charges for each operation (as I recall I can simply delete a node in rtdb and every children is also deleted).

So which one would be more affordable for my app?

Dharmaraj
  • 47,845
  • 8
  • 52
  • 84
Helder Esteves
  • 451
  • 4
  • 13

1 Answers1

1

Firestore charges are calculated per READ/WRITE operation performed. So using Firestore for large amount of reads and writes will be significantly expensive than RTDB.

Realtime Database on the other hand calculated just GB of data download and is advisable for storing temporary data in your case, since you will be creating and deleting too frequently.

For more elaboration, check out my answer here. I've also mentioned cons of using Firestore in brief there, it was a similar case.

It will be more affordable to by RTDB resources instead of Firestore if you want to update data too frequently.

Dharmaraj
  • 47,845
  • 8
  • 52
  • 84