Weekly Update No. 5

Continuing to work on my app listings and learning more about Firebase

Published on August 25, 2019

I did a little bit of development and a little bit of reading this past week. I now have images loading for my app listings, but they need to be the appropriate size for the preview view of a listing. I was tweaking how my data was being loaded on the home page of my app and realized that the read counts were different than what I expected for Firebase.

Images and Thumbnail Images

I’m now displaying images for all listings on the home page of my app, but I really need to get the thumbnail version of the uploaded image for a listing and display it properly when viewing the listing on a smaller screen. I noticed that this was being done in the Friendly Pix project using HTML5 Canvas, so I’ll look into doing that as well or possibly using some kind of lightweight library.

Firebase Pricing Model

I’m not sure why, but I assumed the reads for Firestore were based on ever query you made. This was wrong. I have 10 fake listings and every time I load those listings, at least initially, it counts as 10 reads. I read instances of people saying their cost for using Firebase unexpectedly went through the roof once they started getting more traffic, so I did some math. If I was careless and decided to load 100 listings when someone landed on the home page of the app that would cost me 100 reads. If I had 100 unique visitors in a day, it would cost me 10,000 reads. In a 30-day month, I would have used 300,000 reads. My total cost would be $0, because Firebase gives you 1,500,000 reads free. The only time I would pay anything is if I had 600 visitors a day, and even then, I would only have 300,000 reads over my free 1,500,000, which means I would pay a total of $0.18. This is the cost for being careless. If I was smarter about how I load my data and only loaded 10 listings on the home page, then the only time I would pay $0.18 is if I had 6000 visitors a day. At that point, I would consider my app a success. I’m deliberately not talking about writes, deletes, bandwidth, or storage, because this won’t be nearly as much as a concern as reading would. So far, Firebase is impressive, but then again, I haven’t gone that deep yet and there are some nuances about reading that may catch me off guard, but I really think those will only matter when I have substantial traffic, which would be a great problem to have.