1
00:00:06,690 --> 00:00:10,130
Welcome back to class everyone Johnny B who does those dot.com.

2
00:00:10,170 --> 00:00:15,220
And in this lesson we're going to take a look at what firestorm is and why it's awesome.

3
00:00:15,240 --> 00:00:20,700
We will also look at some of the differences between firestorm and the existing firebase a real time

4
00:00:20,700 --> 00:00:22,140
database system.

5
00:00:22,140 --> 00:00:29,430
All right so what is fire store club fire store is a flexible scalable database for mobile web and server

6
00:00:29,430 --> 00:00:34,880
development from fire store and a Google Cloud platform like firebase real database.

7
00:00:34,980 --> 00:00:41,340
It keeps your data in sync across client apps through real time listeners and offers off line support

8
00:00:41,340 --> 00:00:46,000
for mobile and web is available for iOS Android and web.

9
00:00:46,110 --> 00:00:49,900
It has some similarities to the existing car realtime database.

10
00:00:49,920 --> 00:00:55,800
You may be familiar with one of the biggest differences is how the data is organized in Firestar your

11
00:00:55,800 --> 00:00:59,450
data is organized into collections and documents.

12
00:00:59,490 --> 00:01:05,590
Each collection contains one or more documents and each document is made up of key value pairs.

13
00:01:05,610 --> 00:01:10,400
However in Firestar jargon these keys are referred to as fields.

14
00:01:10,410 --> 00:01:17,400
Documents can hold a wide variety of data including strings booleans numbers dates null and nested arrays

15
00:01:17,430 --> 00:01:18,810
and objects.

16
00:01:18,810 --> 00:01:22,530
A document can have its own subcollection of data as well.

17
00:01:22,530 --> 00:01:28,440
So for instance if you had a chat app you might have a root collection of chat rooms and those documents

18
00:01:28,920 --> 00:01:31,030
would each represent a chat room.

19
00:01:31,200 --> 00:01:36,810
Then each of those chat room documents would have a subcollection of documents where each document was

20
00:01:36,810 --> 00:01:40,380
a message sent in that chat room and the pattern continues.

21
00:01:40,380 --> 00:01:41,010
Collection.

22
00:01:41,010 --> 00:01:42,940
Document collection document.

23
00:01:42,960 --> 00:01:45,840
You can nest 100 levels deep like this.

24
00:01:46,230 --> 00:01:49,000
So you may be asking what makes firestorm so amazing.

25
00:01:49,290 --> 00:01:50,700
Well I'm going to go over a few things.

26
00:01:50,700 --> 00:01:52,940
Number one real time updates.

27
00:01:53,040 --> 00:01:57,430
One of the most amazing features of fire storm is its ability to perform realtime updates.

28
00:01:57,510 --> 00:02:01,670
Because of this you are able to synchronize data on any connected device.

29
00:02:01,800 --> 00:02:03,520
Going back to our chat room example.

30
00:02:03,600 --> 00:02:09,270
This means that when Bill sends a message Sally receives it instantly with very little work required

31
00:02:09,270 --> 00:02:10,930
by you and the developer.

32
00:02:11,130 --> 00:02:18,030
One time data fetches are also super easy with higher store number two online support kuffar store caches

33
00:02:18,030 --> 00:02:20,680
data that your app is actively using.

34
00:02:20,880 --> 00:02:26,750
So the app can write read listen to and query data even if the device is off line.

35
00:02:26,940 --> 00:02:32,930
When the device comes back online Coldfire store synchronizes any local changes back to a cloud firestorm.

36
00:02:32,930 --> 00:02:34,470
So this is super cool.

37
00:02:34,470 --> 00:02:40,320
Number three expressive querying filtering and sorting data is super easy with fire store.

38
00:02:40,330 --> 00:02:45,930
You are able to fetch individual documents or entire collections you are able to filter and sort on

39
00:02:45,930 --> 00:02:52,500
any of the document fields and the queries scaled to the size of your result set not the size of your

40
00:02:52,500 --> 00:02:53,240
data.

41
00:02:53,520 --> 00:02:58,890
This means that if you do a filter for say the top five car mechanics in your state it will take the

42
00:02:58,890 --> 00:03:05,330
same amount of time whether your database has 5 mechanics five hundred or five hundred thousand.

43
00:03:05,340 --> 00:03:10,110
Now if you're familiar with the existing firebase real time database system you may be wondering what

44
00:03:10,110 --> 00:03:13,370
is the difference between this and fire store.

45
00:03:13,680 --> 00:03:20,070
Well for one we have the difference in the organization as we've gone over documents and collections.

46
00:03:20,070 --> 00:03:24,550
This leads to several advantages including much more powerful querying capabilities.

47
00:03:24,550 --> 00:03:25,650
Right.

48
00:03:25,810 --> 00:03:33,450
Number two is that fire store is designed to scale fire based real time databases great and meets the

49
00:03:33,450 --> 00:03:34,930
needs of most apps.

50
00:03:35,100 --> 00:03:40,540
However as the app starts to grow and or become more complex things get a little bit difficult.

51
00:03:40,560 --> 00:03:46,050
Claude fire store on the other hand is built on top of the same Google Cloud infrastructure and it will

52
00:03:46,050 --> 00:03:49,480
be able to scale much much more easily.

53
00:03:49,480 --> 00:03:52,190
Another big difference is multi-region support.

54
00:03:52,320 --> 00:03:58,410
This means your data is saved in multiple locations that way in the event of a local catastrophe for

55
00:03:58,410 --> 00:03:59,750
one of the databases.

56
00:03:59,820 --> 00:04:04,610
You can rest easy knowing your data is safe in one of the redundant locations.

57
00:04:04,620 --> 00:04:07,350
Pricing is different in many cases.

58
00:04:07,350 --> 00:04:08,940
Fire Stories is going to be cheaper.

59
00:04:09,090 --> 00:04:15,210
However if your app makes many read and writes per user for prolonged amounts of time the firebase real

60
00:04:15,210 --> 00:04:16,870
time database might be cheaper.

61
00:04:17,100 --> 00:04:22,290
There have been several case studies published by Google though from companies who have made significant

62
00:04:22,290 --> 00:04:24,890
savings by switching over to firestorm.

63
00:04:25,080 --> 00:04:27,630
Now if you want to know the too long didn't read.

64
00:04:27,900 --> 00:04:33,180
And you're just looking for someone to tell you which to use Google themselves or recommend that new

65
00:04:33,180 --> 00:04:36,370
projects start out on the new firestorm.

66
00:04:36,750 --> 00:04:41,460
But if you have an existing realtime database app that is working perfectly fine there probably isn't

67
00:04:41,460 --> 00:04:43,590
much reason to switch over.

68
00:04:43,590 --> 00:04:49,470
That being said there are still some reasons you might want to use the existing firebase real time database

69
00:04:49,500 --> 00:04:55,320
instead a fire store one of those reasons Number one is if you need better latency.

70
00:04:55,410 --> 00:04:57,840
Now fire store is real time.

71
00:04:57,840 --> 00:05:01,620
However the firebase realtime database is slightly faster.

72
00:05:01,620 --> 00:05:03,910
It has better latency.

73
00:05:03,970 --> 00:05:06,860
We're talking to the order of a couple hundred milliseconds though all right.

74
00:05:06,870 --> 00:05:12,930
So not a lot but if that is super important that you need your day to be instantaneously transferred

75
00:05:13,320 --> 00:05:16,110
then the realtime database might be the way to go.

76
00:05:16,110 --> 00:05:21,250
Number two realtime database is better at knowing when a user is on or off line.

77
00:05:21,270 --> 00:05:26,250
So this might be important for games or some other applications where you want to know really well when

78
00:05:26,250 --> 00:05:29,390
your user is inside or outside of your app.

79
00:05:29,460 --> 00:05:32,450
And as I mentioned earlier pricing could be a factor.

80
00:05:32,550 --> 00:05:34,560
So you'll have to look into that as well.

81
00:05:34,560 --> 00:05:42,920
And lastly fire store is still in beta and this means that it is subject to changes and yes bugs.

82
00:05:42,920 --> 00:05:47,910
However from my experience with it so far I am super impressed with it has been pretty rock solid for

83
00:05:47,910 --> 00:05:48,960
me.

84
00:05:48,960 --> 00:05:49,160
All right.

85
00:05:49,170 --> 00:05:50,150
So there you go.

86
00:05:50,190 --> 00:05:56,490
That is firestorm in a nutshell and the following lesson we are going to dive into the documentation

87
00:05:56,490 --> 00:05:58,910
into the code implementation in detail.

88
00:05:59,010 --> 00:06:03,150
So hope you are ready for that and I'll see you in the next one.
