Live data from Hacker News

Why I’m dumping Firebase for Web

lugassy.net

71–80 of 123 posts

Re: Why I’m dumping Firebase for Web

#71
Firebase documentation is very lacking and their support is slow but it is an amazing product. The problem is when people try to use it generally for anything and everything.

Firebase is not meant to be a backend for any Web app. It is a special tool for specific problems. If you just use it without evaluating if it is a good fit for your problem then you'll certainly run into a wall.

Re: Why I’m dumping Firebase for Web

#72

I loathe Googles various scaling limits. "You need to ask a Google person to scale further, but hey we're Google and we do everything we possibly can to avoid human contact." Bleh.

I had to increase our quota of layer 7 load balancer backends recently on GCP, submitted the request and the quota was increased within minutes. YMMV though, I guess?

Re: Why I’m dumping Firebase for Web

#73

I loathe Googles various scaling limits. "You need to ask a Google person to scale further, but hey we're Google and we do everything we possibly can to avoid human contact." Bleh.

I had to increase our quota of layer 7 load balancer backends recently on GCP, submitted the request and the quota was increased within minutes. YMMV though, I guess?

The issue is that googles reputation is to avoid all contact. This gives less than zero faith in their commitments to support.

Re: Why I’m dumping Firebase for Web

#74
post #67

Earlier quoted context omitted.

are you adding custom claims to the core firebase user or as a custom jwt/additional user object? can you have a user signed in with facebook and assign a "experiment1=b" claim to it?

JWT claims are strictly meant for JWT. I don't know how or why they would work with Facebook login, but if you need to support Facebook/Google login for users in addition to JWT, you can still implement claims/roles. You just need to create a collection for users in firebase that stores claims for all users. Protect it with security rules and then this collection to power security rules for other collections. Somethi…

my database.rules file is over 2000 LOC, and I have lots of these: root.child('users/' + auth.uid + '/roles/admin').exists(). that's my point really, you need a supplemental user record in a second database, even if all you wanted is a bit of information attached to a user login. see this guy's question: https://stackoverflow.com/questions/43329143/access-firebase...

Re: Why I’m dumping Firebase for Web

#76

I have had so many issues with Firebase, but the one that really pisses me off the most is that they used to advertise things like "scale worldwide to millions of users" and "Unlimited Connections" but then cap you at 100k concurrent users (10k initially and will gradually bump you up to 100k). When we got in contact with them about this they were nice enough to explain that we could create another database and shard…

I'm curious, what DB tool will you now consider using instead?

Re: Why I’m dumping Firebase for Web

#77
Some years I was on a team that needed to remove a Firebase dependency.

We were using Firebase for simple read-only queries and our dataset wasn't changing much, so statically served nested JSON files/folders were a great substitute.

In case it helps anyone else out, here's the script that automated the creation of those files from a Firebase data dump: https://github.com/zackbrown/firebasic

Re: Why I’m dumping Firebase for Web

#79
post #14
post #7

Earlier quoted context omitted.

What was your decision for REST over GraphQL?

GraphQL requires you to know upfront what you want to receive. You can't for example receive data for a menu with submenus with undetermined level of depth. You can hack your way around the problem, but it's ugly. Another problem GraphQL hasn't tackled (afaik) is polymorphism. You can say "hey give me this person" or "give me this company", but what if you want a customer that can be either a person or a company?

If I want to get all levels of an arbitrarily nested tree, I just query for all of the objects that are in the tree in a flat array and then reconstruct the tree on the client side using the parent/child Ids.

This is similar to what I would have to do server side if I were using SQL to get the data and then processing it to return a tree in JSON.

If I know how deep the tree will be (and it is only two or three levels) I query it directly with graphql

Post reply on HN