Realtime Database price vs Firebase CloudStore - firebase

First, I read the documents on the Firebase. And it is still not neatly organized. I'm going to publish kind of an app for the first time.
That's why I get a lot of confusion.
I think this is a place for beginners to ask questions also.
It has only one photo on profile in my app.
I mean my app is text-centric, not photos.
I think the Realtime-Database would be advantageous because it requires less storage space.
But bandwidth is a problem. I do not know exactly what the bandwidth is. Bandwidth is said to occur when downloading, but when reading text into my database is it called bandwidth?
I do not have much money and I want to try it in an optimized environment. What do you think would be better?
My app doesn`t need photos other than profile pictures that can identify each user.
I am a beginner, so the contents of the documents are difficult and I am asking questions.
I don't want you to think it is a duplicate question.

In firebase realtime database bandwidth is calculated for data transferred from the database (and it is given a quota for the month). If you go through their docs you can get a nice idea. Here's the link to their pricing documentation.
To store your one image (as far as i know) you'll have to use "storage" in the firebase and save the reference in the firebase database.
Since your app is text based, you can most probably get away with their free tier, which is cool. Have fun, hope this helps you
here's the link to their database documentation.

Related

Create firebase project when user log in to SaaS application

I have seen a firebase api in which you can create firebase projects and it occurred to me for example, when a user wants to counter a SaaS, make it easier for me to create a project and connect it to their SaaS but I have the following questions:
If there are supposed to be limits to creating firebase projects in a google account, will there be a time when databases can no longer be created for new users?
If the above is true, how can this be solved?
I have seen that you can ask for more projects, but how many can I have?
I know that with firestore, I can model data and only in a database have all the information, but for example, each user may have special requirements in their system and also provide security and information saving operations that would be impossible if all information is in a single database.
Thanks for the help.
EDIT
"How many projects can you have as a developer?" Yes, that's what I mean, having all the user bases in a single firebase google account. For example, on a web page, the user wants to pay for the application, with firebase admin and google cloud functions, I can automatically create a project and have all the databases in a google account. And what I want to know is if you can have multiple databases. I have seen that you can ask google to give you permission to host several projects but, for example, can you have more than 100 projects or even 1000? (I may never have reached that number, but in that case, I would like to know the limits that can be reached).
Edit 2
This first structure I have all the documents in a "universal" collection and I identify them with an id to know the user who used it.
But the second structure seems to me more organized and clean, in addition to the fact that users at no time need to share information among others. I have read that having nested collections is not good but over the years and the progress that firestore has had, this is no longer or was a problem only that the limitation is that you can only have up to 100 collections anidades but I never think to reach that quantity.
Inside of list, have all products for that user, because inside of document, only can have 1 mb of data and download 1 mb and is not the best option.
in the firestore documentation I see that it does not reveal other problems, it only says that it is difficult to delete the subcollection, but I do not allow users to do that and if I need to delete the subcollections, with the Google Cloud functions i can do it.
So, the second structure is more intuitive for me, but is the best option for that? or actually firestore is not good for this strcucutre?

Using Firebase Firestore for tracking app

Quick question please. I am working on an on-demand app that uses live tracking which would require the constant update of people’s lat and lng, and I plan to you Firebase Firestore for it. Having read a few scary articles (lol scary in terms of costing) about how Cost shoot up overnight while using firestore. I’d like to know if it’s advisable to use firestore for this, as I think the entire BaaS it offers covers everything I need. If you can recommend the best approach possible to this, thanks
It depends on how large is your userbase and how frequently you want to update their current location.
Under the Flame Plan ($25/month) 100k document writes per day for firestore is supported. If you want more than that you'll need Blaze Plan (pay as you go).
See the pricing for details:
https://firebase.google.com/pricing

How to optimize firebase/firestore for a sensible synchronization tool for big online database?

In my app I have a lot of PNGs, about 150 mb. First time my user will download them all, but then the user should only download new/deleted/modified PNGs, not the ones that stay the same. How can I use Firebase/Firestore for this?
First, I decided to use SQLite as offline database, because I read that firebase will charge for offline reads. Then I read that when keepSync enabled and setPersistanceEnabled(true), Firebase will download my entire 150 mb database every time the app starts.
The problem is; my app is a mainly offline app. I don't to pay for offline usage, and I expect firebase to be smart and sync "on demand" and sync only "new stuff". To be clear, the user will only display my PNGs, not modify them. So data flow in my sample is one way; from online db to local device.
I hope I made it clear what I expect. Feel free to recommend other tools. I can change the order of my PNGs, add new PNGs, delete them, modify them, but in the end most will stay same and I don't want to be charged for PNGs that are same for years.
Sorry for long post, but I couldn't see any solid answer despite a lot of questions.

How fast can i reach 1GB in firebase realtime database

I am using firebase database and my question is, for example how fast can I reach 1GB if i have 100 users each storing worth 10 document pages of microsoft word full of text everyday, for one month?
Word documents would be stored in Firebase Storage, not the realtime database. Realistically, the only way you will be billed anything for using the Firebase platform is if your app gets a significant of usage. I suspect that 99% of firebase apps do not generate any billing whatsoever. ...that's just a hunch.
If you do run into billing issues, that will/would be a good thing.
Although this question is too broad since it lacks various variables like the number of users, size of the files and how this data is presented in the app I will try to give my $0.02 on this in a very generic way which can also be interpreted as how not to end up with a huge bill while using firebase,
Even though Firebase provides a sufficient space to test out the app in production there is a lot of ways in which things can go bad real quick like,
1) since firebase automatically handles the sync this additional read/write call comes out of your quota apart from the call you trigger check-out how one app developers found this out the hard way
2) if you have bad DB schema/design that you have not addressed, then you end up making multiple calls to the server to fetch the data which again bloats up the number of calls you make read about this here
3) Not setting spending limits and alerts, this should be a mandatory step to avoid a lot of the above problems even though the docs clearly gives an indication on how to set this up
These are some of the cases that I have come across I hope this serves as a guideline to set up your app

Firebase storage states full after deleting all files

Like many other people out there, I am using Firebase for my project. In the past few days I have used Firebase quite a lot for sending media files between users. Now, I am also on the free plan, as I am still testing Firebase.
All of a sudden, Firebase has stopped responding, mentioning that
"You have exceeded your quota for this project. Please upgrade your plan.
LEARN MORE"
I know that Firebase has a limit on the amount of data I can transfer per day and store, that's no problem. My problem is that even after a full day, and having everything in storage deleted, I still get the same error.
Truth is, this error only shows up for the storage section. But, as you can see in the picture, my storage is now empty. Therefore my question is how can I reset firebase, or there's no other way around other than paying?
Since I am not able to see any files, I am also suspecting that I have not deleted them all, or them correctly? Could this be what's going on?
The more interesting part is the when clicking on "LEARN MORE", I am prompted to the following page, which is even more misleading.
Update: After looking at my quota details I found out that my Cloud Storage Network is full:
Looking at the Pricing for Storage on the Spark Plan it says that you can store up to 5Gb of data. Now this plan is based on Cloud Platform's Always Free and their documentation says "5Gb-months". I'm not sure of what that means, but I'm assuming that you have already exceeded your 5Gb for this month (even though you deleted the files afterwards). Maybe your quota will actually have some kind of "refresh" next month so you'll probably only be able to use Firebase storage again by that time.

Resources