Welcome back to class everyone Johnny B who does those dot.com.
And in this lesson we're going to take a look at what firestorm is and why it's awesome.
We will also look at some of the differences between firestorm and the existing firebase a real time
database system.
All right so what is fire store club fire store is a flexible scalable database for mobile web and server
development from fire store and a Google Cloud platform like firebase real database.
It keeps your data in sync across client apps through real time listeners and offers off line support
for mobile and web is available for iOS Android and web.
It has some similarities to the existing car realtime database.
You may be familiar with one of the biggest differences is how the data is organized in Firestar your
data is organized into collections and documents.
Each collection contains one or more documents and each document is made up of key value pairs.
However in Firestar jargon these keys are referred to as fields.
Documents can hold a wide variety of data including strings booleans numbers dates null and nested arrays
and objects.
A document can have its own subcollection of data as well.
So for instance if you had a chat app you might have a root collection of chat rooms and those documents
would each represent a chat room.
Then each of those chat room documents would have a subcollection of documents where each document was
a message sent in that chat room and the pattern continues.
Collection.
Document collection document.
You can nest 100 levels deep like this.
So you may be asking what makes firestorm so amazing.
Well I'm going to go over a few things.
Number one real time updates.
One of the most amazing features of fire storm is its ability to perform realtime updates.
Because of this you are able to synchronize data on any connected device.
Going back to our chat room example.
This means that when Bill sends a message Sally receives it instantly with very little work required
by you and the developer.
One time data fetches are also super easy with higher store number two online support kuffar store caches
data that your app is actively using.
So the app can write read listen to and query data even if the device is off line.
When the device comes back online Coldfire store synchronizes any local changes back to a cloud firestorm.
So this is super cool.
Number three expressive querying filtering and sorting data is super easy with fire store.
You are able to fetch individual documents or entire collections you are able to filter and sort on
any of the document fields and the queries scaled to the size of your result set not the size of your
data.
This means that if you do a filter for say the top five car mechanics in your state it will take the
same amount of time whether your database has 5 mechanics five hundred or five hundred thousand.
Now if you're familiar with the existing firebase real time database system you may be wondering what
is the difference between this and fire store.
Well for one we have the difference in the organization as we've gone over documents and collections.
This leads to several advantages including much more powerful querying capabilities.
Right.
Number two is that fire store is designed to scale fire based real time databases great and meets the
needs of most apps.
However as the app starts to grow and or become more complex things get a little bit difficult.
Claude fire store on the other hand is built on top of the same Google Cloud infrastructure and it will
be able to scale much much more easily.
Another big difference is multi-region support.
This means your data is saved in multiple locations that way in the event of a local catastrophe for
one of the databases.
You can rest easy knowing your data is safe in one of the redundant locations.
Pricing is different in many cases.
Fire Stories is going to be cheaper.
However if your app makes many read and writes per user for prolonged amounts of time the firebase real
time database might be cheaper.
There have been several case studies published by Google though from companies who have made significant
savings by switching over to firestorm.
Now if you want to know the too long didn't read.
And you're just looking for someone to tell you which to use Google themselves or recommend that new
projects start out on the new firestorm.
But if you have an existing realtime database app that is working perfectly fine there probably isn't
much reason to switch over.
That being said there are still some reasons you might want to use the existing firebase real time database
instead a fire store one of those reasons Number one is if you need better latency.
Now fire store is real time.
However the firebase realtime database is slightly faster.
It has better latency.
We're talking to the order of a couple hundred milliseconds though all right.
So not a lot but if that is super important that you need your day to be instantaneously transferred
then the realtime database might be the way to go.
Number two realtime database is better at knowing when a user is on or off line.
So this might be important for games or some other applications where you want to know really well when
your user is inside or outside of your app.
And as I mentioned earlier pricing could be a factor.
So you'll have to look into that as well.
And lastly fire store is still in beta and this means that it is subject to changes and yes bugs.
However from my experience with it so far I am super impressed with it has been pretty rock solid for
me.
All right.
So there you go.
That is firestorm in a nutshell and the following lesson we are going to dive into the documentation
into the code implementation in detail.
So hope you are ready for that and I'll see you in the next one.