I've been testing Firebase lately and considering using it to replace my own backend for Kids In Touch. I'm liking Firebase very much. The two way syncing is so fast and smooth. The "three-way binding" with Angular is really nice too.

Very importantly, I've been really impressed with the Firebase team. When I first started dabbling, I put out a few Tweets with complaints and questions. Very quickly, I had responses from a founder and multiple support engineers. At one point, I was immediately invited to a call with one of their solution architects. Wow. We spent over an hour discussing different architectural approaches and possible problems. This really helped put me at ease.

One amazing aspect of Firebase is the cost. It's downright cheap compared to some semi-competitors. For example, I had been considering using PubNub. However, their cost structure was way out of my league. Let me explain:

DISCLAIMER : Let me just say that PubNub is really awesome. Their technology and instantaneous messaging is very compelling. I'm not here to bash them. I'm just describing my own experience and concerns. I had some great emails with their account managers about costs. They were very helpful, informative, and even provided suggestions about further monetizing Kids In Touch. No hard feelings here.

Example PubNub Cost Analysis

10,000 Users monetized @ .70 each annually : $7000

Required Features:

Go Cloud Base : $125
Multiplexing : $99
Storage & Playback : $99
Access Manager : $99
Forever Storage : $60

Annually : $482 X 12 = $5784

$7,000 - $5784 = $1216 remaining after PubNub costs alone.

Caveats:
Assumes ALL 10K users are active in a one month period

Example Firebase Cost Analysis

10,000 Users monetized @ .70 each annually : $7000

Required Features : All built-in

Annually : $149 X 12 = $1788

$7,000 - $1788 = $5212 remaining after Firebase costs

Caveats:
Assumes only 750 CONCURRENT connections

Wait a minute. I'm comparing apples to oranges here, right? Yes, I am.

Features

PubNub only had SOME of the features I needed. I'd still have to run my own API server, database, tasks processes, etc. Firebase has almost ALL of the features I need. I'll still need some task processors, but I won't need an API server or a database anymore. That's saving me another $200 per month over PubNub. In fact, I'm getting all the Firebase features for the same price as my current database and API server costs. So, I'm upgrading for free!

Users

So, what's the deal with saying PubNub is going to be 10K users vs. 750 for Firebase? PubNub counts monthly active users. So, if you have 10,000 accounts and all 10,000 of them happened to use the app in a month, then you get charged for all 10,000.

Now, you might suggest that all 10,000 of my users might not use the app during the month. I certainly hope that is not the case. I want the app to be "sticky". However, each one of my "users" is really 3 or 4.

See, if one of my Kids In Touch users buys an in-app purchase for their family, they might have 2 or 3 kids using the same account. Depending on use-cases, each of my "users" could really be 2 or 3 or 4 or 5. So, even if all my "accounts" didn't connect in one month, the extra "users" from the other accounts could easily push me over 10,000. In fact, if all 10,000 "accounts" were active in a month, I might have 15K or 20K active "users" and my bill would be astronomical.

UPDATE : Jordan Shaw and Stephen Blum let me know that PubNub counts active users for billing on a daily basis -not monthly. So, the chances of my hitting 10,000 active users in a single day are reduced a bit.

With Firebase, it's different. It doesn't directly matter how many users my app has. It just matters how many of them are using the app at the exact same instant. Firebase counts concurrent users. So, in my example above, I am just assuming I'll have no more than 750 concurrent users. I could be wrong, but I think that's a pretty HIGH estimate for a user base of 10K. If I'm wrong, then Firebase charges a bit more for each additional concurrent user. Let's say I'm off by 250; my new bill would be $192.75 per month. Still half as much as PubNub.

It's Not All Roses

Again, I'm not bashing PubNub. Their service is very impressive. They've got some nice features that would be great for many developers. For me, Firebase is a better deal.

Not everything is great with Firebase. Because of the way Firebase works, I've got to really rejigger some of the work flows in my app. Since I can't change the Firebase code, I'm stuck with their way of doing stuff. I've got to use a few new task runners to do stuff that my own API could do on the fly. There are some other issues that really get under my skin. Maybe I'll post about them later.