[MUSIC PLAYING]
FRANK VAN PUFFELEN: Welcome to Firebase Release Notes
for January, where we cover recent big and small updates
from Firebase.
Now, we have seven topics today.
So let's begin right away.
There were a bunch of updates to Firestore,
and we're starting off with support
for having multiple Firestore databases in a single project.
We've been rolling this out as a preview release
since mid last year, and we've now completed all the features
on the Cloud side.
So we're changing it to general availability.
On the Firebase side of things, while all SDKs were up-to-date,
you can still only see the default database
over projecting your Firebase Console.
We're working on adding support for the non-default databases
there too, but for now, switch to the Google Cloud Console
to see the data in your non-default Firestore
databases.
Last month, I told you that the sum and average operators
had been added to Version 12 of our Admin SDK for Node.js.
Many of you then tried to use these new Firestore operators
in your Cloud Functions, and guess
what, it didn't work there yet.
That's my bad for not calling it out, and thank you
for bringing it to my attention.
Thanks to your reports, we've rolled
out Version 4.6 of the Firebase SDK
for Cloud Functions, which includes the required peer
dependency for the new Admin SDK version.
So update to the latest Firebase functions
to use the sum and average operators
in your Cloud Functions.
And on the topic of the sum and average operators in Firestore,
you can now use them in your Flutter apps too.
To ensure that it aligns with how these aggregations look
on other platforms, the Flutter code
looks a bit different from how you could already
count documents.
Here's a code sample of using all the aggregations, count,
sum, and average in a single Flutter snippet.
So, upgrade to the latest Cloud Firestore package
today and start calculating sum and average values of fields
without needing to read the entire documents.
In our constant move to make Firestore available close
to your users and to allow you to meet
regulatory requirements, we keep adding Firestore
to more servers and more data centers around the world.
And we just added it to our data centers
in Dammam and in Belgium, bringing us
to a total of 30 regional locations.
And keep in mind that Firestore is also
available in multi-region locations in Europe and North
America, as we can see here.
If you use one of these multi-region locations,
your data is automatically replicated
to multiple regional locations in that area
to maximize its availability and durability.
And our final Firestore topic is about the Key Visualizer.
As you may know, the Key Visualizer
lets you visually explore your Firestore data structure,
identify issues, and understand query behavior.
Its index scan feature lets you focus on
writes and reads on Firestore's indexes
and it has just graduated to general availability.
Firebase Cloud Messaging is our no cost cross-platform
messaging solution that lets you send messages
from your server to the app while the user is not actively
using it.
You can use this for things like notifying the app
that new email or other data is available to synchronize
or to send notification messages to drive user re-engagement
and retention.
We just added a page to our documentation
with best practices for sending FCM messages at scale.
This covers topics like the request per second quota
that each project gets, how to make the most of that quota
by spreading out the API calls over a whole minute interval,
how to use Jitter to minimize the chance of being throttled
by the FCM servers, and how to use exponential backoff just
in case you do get throttled.
My personal favorite best practice
is to separate the delivery of a message
from the display of the notification.
Many use cases allow for this practice of presenting
the data for a notification.
For example, you can send a message with the necessary data
right away when the data becomes available on the server,
and then you hold the data on the device
until it's time to display it with a local notification.
There are many more great practices in the documentation.
So read it today with the link in the description
and check back here in a few weeks
to catch Marina's deep dive video on the topic.
Those were all the updates we have for today.
If you liked this video, be sure to give it a thumbs
up and subscribe to the channel below.
Now, my name is Frank, or Puf, and I'll
see you on a future episode of Firebase Release Notes.
[MUSIC PLAYING]