Skip to content

Commit 6d3d453

Browse files
committed
Edits
1 parent 04671c9 commit 6d3d453

File tree

1 file changed

+25
-21
lines changed

1 file changed

+25
-21
lines changed

getting-started-with-firebase-2019-edition/getting-started-with-firebase-2019-edition.md

+25-21
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
1-
# Getting Started with Firebase, 2019 Edition
1+
# Firebase: 2019's Dominant Web App Platform
22

33
## tldr;
44

5+
Google has invested heavily to make Firebase a full-featured application platform for web. It's dirt cheap to use. It's reliable. It saves up to 50% of your dev time.
6+
7+
Firebase is all you need... with a few exceptions. Firebase is still missing search functionality, but we can plug that hole with Algolia. Google Cloud Platform provides a few more ancillary services such as DNS, Cloud SQL for reporting data and Bigtable for graph data.
8+
59
## A Quick History
610

711
Firebase was [birthed from a Y Combinator company](https://hackernoon.com/how-to-build-a-product-loved-by-millions-and-get-acquired-by-google-the-firebase-story-82dab4e3e80c) that was acquired by Google in 2014.
812

913
Firebase is a classic [disruptive company](http://claytonchristensen.com/key-concepts/). It started as a quick prototyping tool for developers who wanted to move quickly but didn't necessarily need much scale or sophistication.
1014

11-
They've spent the last eight years building capabilities from that original base of passionate freelancers and indie devs, and as a cornerstone of Google Cloud Platform's strategy, Firebase is poised to enter the larger corporate market.
15+
They've spent the last eight years building capabilities from that original base of passionate freelancers and indie devs, and as a cornerstone of Google Cloud Platform's strategy, Firebase is fighting its way into the larger corporate market.
1216

1317
## What is Firebase?
1418

@@ -50,15 +54,15 @@ Firebase and other NoSQL datastores optimize for reads, which are much more comm
5054

5155
## Firebase crushes other databases (for many use cases)
5256

53-
Let's say that I have new user sign up for a multi-player RPG. I want to show that user's email address on their profile, next to any messages that they chat to other users, and finally I'll need a list of all user emails for my admin dashboard.
57+
Let's say that I have new user sign up for a multi-player RPG. I want to show that user's email address on their profile, next to any messages that they send to other users. Finally, I'll need a list of all user emails for my admin dashboard.
5458

55-
Firebase asks you to write that email address in three different places. "But Chris!" you ask. What if I need to change the email address??? Isn't that inefficient???
59+
Firebase asks you to write that email address in three different places, one for each type of read operation. "But Chris!" you ask. What if I need to change the email address??? Isn't that inefficient???
5660

5761
Yep. It's inefficient. You'll have to update that email address in three places, and you'll have to be careful to track everywhere that you saved it.
5862

59-
But how often do you actually need to write an email address? What about the reads???
63+
But how often do you actually need to **write** an email address? What about the reads???
6064

61-
The reality, and the reason that Firebase works so well, is that most apps read data **significantly more** than they write it.
65+
The reality, and the reason that Firebase works so well, is that most apps **read data significantly more** than they write it.
6266

6367
So get over your SQL-induced anxiety and duplicate data throughout your Firebase data structure. Your database reads will dramatically outperform SQL reads at scale.
6468

@@ -81,7 +85,7 @@ The [Iron Triangle of Project Management](https://en.wikipedia.org/wiki/Project_
8185

8286
Firebase is the lowest-cost and fastest development experience of which I'm aware.
8387

84-
I bootstrap projects on a regular basis. Most of my projects are solo projects. I'm the developer, designer and marketer. I'm incredibly time-constrained, so I use Firebase to enable me to achieve greater scope.
88+
I bootstrap projects on a regular basis. Most of my projects are solo projects. I'm the developer, designer and marketer. I'm incredibly time-constrained, so I use Firebase to enable me to achieve greater scope while keeping my time costs low.
8589

8690
I've built the following projects entirely on my own with Firebase:
8791

@@ -94,7 +98,7 @@ Calligraphy.org powers my wife's business. It took me four months to write it in
9498

9599
The other projects took between 75 and 200 hours each. Again, I finished them in my spare time while relying heavily on Firebase.
96100

97-
Firebase has spoiled me. I haven't spun up a new production server in two years. And these aren't just rapid prototypes. They're fully-functional, scalable and used by thousands of customers.
101+
Firebase has spoiled me. I've used Firebase instead of SQL since 2013. And these aren't just rapid prototypes. They're fully-functional, scalable and used by thousands of customers.
98102

99103
## Firebase includes _nearly_ everything I need to build small- to medium-sized apps
100104

@@ -110,17 +114,17 @@ These five pillars can support an enormous range of apps.
110114

111115
Realistically, you'll need to "cheat" on Firebase a bit for larger apps. I use GCP for a few things that don't fit neatly within the Firebase offering. I also use [Algolia](https://www.algolia.com/) to power my search.
112116

113-
The funny thing is that Algolia is the most expensive part of my stack at \$35/month. The Firebase databases are optimized for everything **except search**. This is an important caveat to recognize early. Searching Firestore collections or anything in the Realtime Database is extremely limited, and for strong architectural reasons. I don't expect to ever see Firebase support search.
117+
The funny thing is that Algolia is the most expensive part of my stack at $35/month. The Firebase databases are optimized for everything **except search**. This is an important caveat to recognize early. Searching Firestore collections or anything in the Realtime Database is extremely limited, and for strong architectural reasons. I don't expect to ever see Firebase support search.
114118

115-
I primarily use GCP to manage the DNS for my domains. But I've also run some Cloud Compute instances for build processes.
119+
I primarily use GCP to manage the DNS for my domains. And I sometimes run Cloud Compute instances for small, custom tasks.
116120

117-
And I use [GitLab.com](https://gitlab.com/deltaepsilon) for CI/CD purposes... so I guess I step out on Firebase a couple of times on each project :)
121+
I also use [GitLab.com](https://gitlab.com/deltaepsilon) for CI/CD purposes... so I guess I step out on Firebase a couple of times on each project :)
118122

119123
## Firebase scales effortlessly
120124

121125
Firebase does not allow slow operations. The database does not execute joins. It doesn't search.
122126

123-
I've never brought a Firebase app up to massive scale. I've heard that the Realtime Database can run into limits and require manual sharding; however, Firestore is architected much differently, and I wouldn't be surprised if it scales more like [Cloud Spanner](https://cloud.google.com/spanner/).
127+
I haven't personally built a Firebase app up to massive scale. I've heard that the Realtime Database can run into limits and require manual sharding; however, Firestore is architected much differently, and I wouldn't be surprised if it scales more like [Cloud Spanner](https://cloud.google.com/spanner/).
124128

125129
Firestore has some awesome performance characteristics.
126130

@@ -136,11 +140,11 @@ Firebase services are built on Google Cloud Platform (aka GCP) infrastructure, a
136140

137141
For instance, Firebase Cloud Storage uses GCP Storage buckets that you can access through the GCP SDKs.
138142

139-
GCP is an enterprise-focused suite of service. It's massive.
143+
GCP is an enterprise-focused suite of services. It's massive.
140144

141-
Each Firebase project comes with its own GCP account, granting you access to the full power of GCP. So don't worry if Firebase doesn't fulfill your every need. GCP likely has it covered.
145+
Each Firebase project comes with its own GCP account, granting you access to the full power of GCP. So don't worry if Firebase doesn't fulfill your every need. GCP has it covered.
142146

143-
For example, If you don't want to pay for Algolia, you can spin up an Elasticsearch cluster on GCP and roll your own search. It'll be just as expensive as Algolia... so I can't recommend it for small projects; however, those capabilities are all there if you need them.
147+
For example, If you don't want to pay for Algolia, you can spin up an Elasticsearch cluster on GCP and roll your own search. It'll be just as expensive as Algolia... so I can't recommend it for small projects; however, those capabilities are all there.
144148

145149
## Common concerns with Firebase
146150

@@ -157,11 +161,11 @@ Engineering is all about tradeoffs. Firebase trades a bunch of control and auton
157161

158162
## When to NOT use Firebase
159163

160-
**DO NOT** use Firebase if you have highly relational data.
164+
**DO NOT** use Firebase for highly relational data.
161165

162-
**DO NOT** use Firebase if you have complex graph data.
166+
**DO NOT** use Firebase for complex graph data.
163167

164-
**DO NOT** use Firebase if you have complex server needs.
168+
**DO NOT** use Firebase for complex server needs.
165169

166170
I sometimes recommend hybrid architectures. Store your relational data in GCP's Cloud SQL or Cloud Spanner databases. Store your graph data in JanusGraph on top of Cloud Bigtable.
167171

@@ -171,19 +175,19 @@ But these are all advanced use cases! Don't worry about them until you need them
171175

172176
Firebase's direct competition is dead. [Facebook killed off Parse](https://blog.parseplatform.org/announcements/a-parse-shutdown-reminder/) and [RethinkDB](https://rethinkdb.com/blog/rethinkdb-shutdown/) suffered a similar fate.
173177

174-
The most direct alternative to Firebase at this point is AWS or GCP. They're quite a bit more complicated and harder to use... but you could achieve similar architectures with other services.
178+
The most direct alternative to Firebase at this point is AWS or GCP. They're much more complicated and harder to use... but you could achieve similar architectures with other services.
175179

176180
Or just use Postgres. Postgres is killer... as long as you have budget to write your own API on top of it.
177181

178182
That's about it. Use AWS, GCP or Postgres. Your dev velocity will suffer, but at least with Postgres you can run everything locally!
179183

180-
I've spent a lot of time with Postgres running in a local Docker container, and it's slick. I didn't write that API myself. It was expensive to maintain, and I could have duplicated it in Firebase at a much lower cost. But the business I was working with wasn't a fan of managed services. What could I do :)
184+
I've worked in a corporate setting with Postgres running in a local Docker container, and it's slick. I didn't write that API myself. It was expensive to maintain, and I could have duplicated it in Firebase at a much lower cost. But the business I was working with wasn't a fan of managed services. What could I do :)
181185

182186
## Conclusion: Firebase is preferred for most front-end-focused apps
183187

184188
Firebase is a slam dunk for small- to medium-sized projects, especially if they're front-end focused.
185189

186-
You may need to re-architect if you hit massive scale... but you **always** have to re-architect for massive scale. Don't optimize for scale prematurely.
190+
You may need to re-architect if you hit massive scale... but you **always** have to re-architect for massive scale. Don't prematurely optimize for scale.
187191

188192
Choose Firebase because it gets you to market faster. It helps you validate your ideas and get feedback.
189193

0 commit comments

Comments
 (0)