NEW Firebase Features Just Dropped
Vložit
- čas přidán 18. 10. 2022
- Firebase just announced a bunch of big new features like SSR hosting for Next.js, aggregation queries for Firestore, an extensions marketplace, and more in at Firebase Summit 2022.
Become a PRO member at fireship.io/pro to see these features in action.
am I the only one who thinks that Jeff has taught a text to speech model his voice and he has been using that in his videos for some time?
Lol kinda
taught*
Of course, I thought we all know this already
True, I no longer hear kids in the background
15% chance
For those wondering about the cost of the count() firestore function, it’s going to cost 1 document read for every 1000 documents the function reads, so it’s very cheap to use. If your wondering where I found this, a firebase developer answered this question during a q&a at the summit event
its also under billing now
Can't kill the golden goose...
Thanks Max...
@@matthewrideout2677 finally time to delete my 50 firestore function triggers 😌
You're*
Omg I remember 4 year ago creating a project and could find any simple way to count documents. Can’t believe they took so long for this 😅
Note: Firebase functions are not included in the free plan anymore, you still get 2 million function invocations for free but you have to upgrade to their pay as you go plan. You can't set a limit on the number of invocations, you can only set notifications for a certain $ budget.
So if you wrote some bad code, your card might rack up some serious charges.
One such example is having a firestore trigger on a document update, but this trigger modifies the document again. This type of pattern will cause an infinite chain of function invocations.
The collection size is awesome, firestore finally learned how to count
During #AskFirebase they said that COUNT() would cost one read per 1000 documents!
Counting documents is literally the biggest reason why i use MongoDB over Firebase on my projects. Implementing pagination without knowing your document count is hell and I've implemented several ways to circumvent it (even writing to a JSON file every time a document is deleted/created!). This certainly levels the playing field now.
Hopefully the aggregation queries also allow us to chain filtering, because that's also something that MongoDB does better.
I'm a bit disappointed they still didn't add search. Google, the search engine company, is yet to add search to firebase.
I do see potential with extensions though, maybe the people could provide what google seemingly can't.
And they won't son, You betta go to MongoDB I just did
When i used Firebase for a project, i found it to be so easy and cool. Like real time updates, authentication and so much more that i wondered why someone would write a backend for a small application but then i found that it couldn't even count ffs. Atleast that is no longer an issue.
Could get extremely expensive too. We replaced it with Postgres and websockets. Some things it just couldn't do for us.
Thank you so much! I hadn't had the time to watch the summit
Literally so awesome! These features have been something I wanted for so long!!!
Very cool! Looking forward to the new courses.
Support for Next is huge addition
Thanks for keeping us updated Jeff
Ok but still no default full text search without extensions...
jam packed with info!!! the only channel I actually slow down to 0.75x
Love from Kolkata, India. You are awesome Jeff! ❤️❤️❤️
Amazing!!
each time getting better and better
Go to 1:14:00 of the Summit, I asked the exact question about the cost of aggregation queries. They said you get charged 1 read per 1000 documents counted.
Blocking as in a non-blocking event.
The blocking function has nothing to do with rejecting signups, it has to do with (blocking) the "process" of signing up to run your function before the user is fully created instead of listening on event which would happen AFTER the user signs up. This essentially allows you to ensure all docs are created before the user finishes signing up.
Pretty sure this is incorrect ^
They're described as running synchronously during the signup flow, and if you throw a specific error, it will block the signup, thus rejecting...
@@benaloney They’re talking about reasoning behind its name, not what it can also do by design. Synchronous call = Blocking.
i really apreciate your help with dowloanding this software
The main problem in my opinion about ttl is you need an explicit timestamp for the expiration date. When you use server timestamp you can't really add a duration on FieldValue, you have to rewrite the expiration date Incase you use FieldValue. It would be great if they gave an option to specify a timestamp and a duration, so that we don't have to add a separate timestamp
This is one of the bases of all time!!!1
This even fortifies my earlier thought that this channel is just disguised Firebase ad channel
Great compilation!
wow this is some powerful stuff. I’m so excited! Always a fan of firebase and fireship. Jeff please make a video of Angular universal and firebase hosting please please 🙏.
OMG the hours I have spent writing and testing count functions. Finally!!!
Wow this is the update I have been waiting for
I can't believe how much time I invested in writing my pagination logic because the query does not have a count method to get the query length in total! FINALLYYYYYY!! data.count() has been implemented!
thank you jeff for the amazing video
thanks firebase for the hard work
(One of my favorite walled gardens.)
As soon as I joined the firebase summit, I knew Jeff's new video 😄
1:33 I heard that 1000 "counts" equals 1 document read on Firebase CZcams channel...
Note: the price is not fractional... If you count 50 "counts" in a query, that equals 1 document.
Finally I can get rid of my "counters" collection 😱
Support for SSG and SSR hosting channels is also on the way. Stay tuuuned
COUNT! COUNT! COUNNNNNNNNNNTT!!!!
There's something really wrong, when in 2022, I'm excited about a document store offering count functionality.
I didn't understand most of it but all this sounds pretty cool. 👍
I can finally get rid of some machinery I have put in place that increment/decrement a value for each collection when I create or delete data.
The question is, will we be able to query a collectiom with ordering and pagination? Like get from XXX, order by ZZZ desc, page 0, limit 100 ?
Thought about using supabase for my next project but these changes are awesome! So I might stick with firebase 🎉
Document collection count is billed 1 read by 1000 documents.
Self host supabase.
@@charlesm.2604 Self-hosting supabase is pretty limited compared to the service offering :/
And I will see you in the nex ....
Going fast
"Laughs in Django"
Nice!
Awesome 😍
Please make a video about how to host the next.js app on firebase with advantages and disadvantages of both
all features are tightly coupled and price tiers on each one of them
I’d really love a UI that looks like an excel sheet. Supabase seems to have this.
😅quick question how do you manage 2 Accounts + a school?
Finally a count? I feel lucky for leaving it alone all these years.
Just simply put the code, it works! thanks!
hell that's cool!
public extensions is huge ! nice updates however no full text search too bad
Actually huge update
This is cool but what I really want from firebase is just better performance. The bundle size is too big and should be even more modular. It adds too much overhead to your Lighthouse performance scores, even when you are using the latest versions of firebase/firestore
I'm using Firebase on fireship.io and have a smaller bundle than hello world react. The key is to split firestore from the bundle if possible
Yeah the size of the SDK is huge, but there are ways around it. First, you could use the firebase lite sdk for a smaller size but less features. Or like Jeff said, use dynamic import for the firebase functions/modules needed. If your using nextjs you can create a firebase context provider, wrap your app in it and dynamically load the provider. Add a hook to the data you want from the provider and bam, the code isn’t part of the initial bundle and you can use the hook anywhere in the app to get your db/app data you want without extra size
You can lazy loan both firestore and firebase. It's a pain still tho that they have not got the bundle size down over the years. I tried different solutions, and deferring both with lazyloader is the key to getting perfect lighthouse scores. Using nextjs to build static means I can get homepage loading instantly, and then by the time user navigate to another page firestore is up.
0:44 there is a typo: NEXT IMAGE *OPTIMZATION*
wow I just ask him in Twitter about this yesterday
But are those features available on the free tier?
Do you think the SSR hosting will be possible with Astro SSR as well ? Or it is only specific to next and angular ssr ? Like to access to the users from the astro props and share sessions you showed would be amazing.
i bet there will be an option to configure the deployment steps individually, don't you think?
Firestore has always had modern approaches so it wouldn't surprise me if all of this deployment stuff would be tightly integrated with the CD pipeline tools you're using.
Astro will likely be leaning on the Vite integration in the mid-term, given their (and our) roadmaps. We're closely watching what Vite's abstractions over SSR will be, once a clear pattern emerges we'll jump on it.
@@JamesDaniels0 Well wasn't Vite created after the former project that the Astro team was working on ?
I'm pretty sure Vite started out as a continuation of Astro team's build tool for which the development got abandoned.
@@charlesm.2604 not sure on the history there. I’ve not followed it as closely as I should, historically speaking. I’ve been very busy on the Firebase side working on the tooling by which we can ship the integrations.
Vite certainly seems to be taking the ecosystem by storm & making our lives easier.
Since we’ve added first class support, any framework that uses Vite should “just work” on Firebase-even if it’s not explicitly called out.
Will you update the course?
Awesome news! Now.. if they dont mess with my firebase menu collapsing it automatically I would be really grateful!
Finally, can deploy NextJS apps to firebase hosting.
🔥🔥
When deploying the NextJS app on Firebase with this new hosting, do API routes get deployed as well? I am not sure about it but just wondering. I have a NextJS app which I have deployed using Cloudrun but using all other firebase functionalities so it would be awesome if I can also deploy the whole thing using Firebase hosting.
Same Q here. Did you find an answer? I tried hosting but if it deployed the API routes as well, I'm not sure how to access them..
@@misterbelgic Nope i haven't. Did you see if it deployed those API routes as cloud functions? Could you access the API routes from your components? If not then I guess they are not deployed. My sense is that you have to deploy the API routes as cloud functions yourself and hosting bit in this case is more server side rendering of static pages. I am going to explore it more in future ans will let you know as soon as I figure it out
API routes will be deployed alongside the static content in a Cloud Function ;) Happy coding!
@@sanesanyo I only see one cloud function which is the ssr one that's automatically generated
@@JamesDaniels0 Thanks
I wonder if some of these features will be available in their REST API
anything that sounds or looks cool will kost me money!!!!
🔥
search is still missing.... I thought they were gonna add it.
I'm disappointed that they didn't include full database search 😓
So with the new doc count feature, I'm going to assume this will make reading a random document a lot easier, is that right or am I thinking about this wrong? Any thoughts are appreciated
It will make knowing how many documents in query/collection much cheaper(about 1000 times cheaper than what it has been)
i have an application built using nextjs but, i can't get currentUser on server side, in firebase docs i cant understand how to get res.locals
LOL, quickly getting a count of the number of object in a collection???? It's like we're finally reinventing basic tech from 40 years ago! But hey, at least we get to deal with 20 configuration files! Progress!!!
To get a count in firebase requires you to iterate through the entire collection, which means 1 read per doc and it gets very expensive. Firebase’s solution is to reduce the read 1000 times less but still get the actual count of all docs in the collection if you use the count prop.
firebase released all this because pocketbase had that cool eye automation
Is firebase hosting + nextjs with ssr free? Since it needs to run server side code will it cost price?
If you deploy with SSR or any other features that require a backend (e.g, Image Optimization), your project will need a payment method and will cost you money once you exceed the free tier of 2 million req/month.
for for for 🤣
Asking for for forever
BTW now I hope Google fixes GCP web interface, it's unacceptably lagging..
nice
If you create a pages/api route in Next.js, how do you access that same endpoint once it's hosted on firebase. Anyone know?
you can just hit the /api/*** url, if the CDN cache is missed it will fall through automatically to a backing Cloud Function
@@JamesDaniels0 That's what I've been trying but doesn't seem to be working. I dunno if the root url is meant to be different maybe?
@@misterbelgic file a bug on the firebase-tools repo, happy to look into it
Crazy that it took this long to be able to just import or export data, but also crazy that we have to go into the ugly Cloud UI app outside of Firebase
The count function can actually get really expensive. If you have a 1000 users requesting a count of a query, and the number is greater than a 1000, like 10000 let's say, that's 10 reads per user, which means 10000 document reads per user reading a count, at ay time. Assuming an user reads a count of 1 query a day, that's 6 cents every 10 days for showing 1 number greater than 10000 to a 1000 users. If you have 10 numbers like this, that's easily 6 cents a day, or almost $2 a month. If you grow to 10000 users, that's $20 a month.
For an app with 10,000 monthly active users, $20 shouldn’t be horribly expensive.
That’s kinda cheap actually…
SSR will also work with nuxt?
I want to know too
Yes, Nuxt is a work in progress! We should be ready to deploy your apps soon
still no support for any other language except for JS for firebase functions.
Why are you the only one on CZcams how scale code editor enough for conveniently reading code on iPhone 7 screen?
Still no full text search 😖😖😪
I don't know why but my app just stopped loading just 18 hours after its first deployment. I was in a free tier.
Great content,
But I'm curious about how is this channel different from fireship, because this video could be a "the code report"
I heard he coded a custom AI version of himself and flew to the Mars habitat he had remote AI powered robots building these last 6 months. He is sippin on top shelf margaritas in his BioDome reading our comments and chuckling to himself I suspect.
Youre saying we get to finally leave Vercel. Thank god
I couldn't care less about whatever the hell Firebase is, but you are hilarious so I'm just gonna watch the video.
🙌💯✨
I'm waiting the next firebase update in 2028
Firebase is Fire, Google just fired the ship.
How so? I'm more exited by the incumbents (Supabase, Appwrite, Realm) than Firestore.
@@erickheredia8910 Yeah bro, do what makes you feel happy. I love firebase, especially firestore, made me more money, I have ever dream. More updates means more money
Any one suggest me for best tutorial for firebase & React
Has firebase GraphQL now? Dropped it for that reason four years ago
What do you mean by asking if _Firebase_ has GraphQL? Nothing is stopping you for using GraphQL in a cloud function.
Vercel may go bankrupt!
from the start of watching fireship to now i always thought firebase was a site Jeff owned but turns out its not
As a new dev with no budget i just desperately want to be able to set a spending limit. I know there's ways to handle it, but it's all a lot more difficult than it is to get going so makes deploying any real app a potential disaster and raises the complexity floor by a lot. I would literally just not be able to pay a large bill, so I can't take the risk that google would forgive it.
I totally agree. I'd be happy to pay if I could set a limit, but without a safety net I just don't have the confidence that something won't go wrong.
Self host open sourced alternatives
@@charlesm.2604 Yeah I've been looking at supabase. It's just a bummer because my needs are so simple and I have them all covered already with firebase, except being able to set that limit.
@@charlesm.2604 Yeah I started asking myself the same thing. I use next which satisfied the api needs I have, and I've actually been using the Notion api recently since I already use the software a lot and have the unlimited plan. For my needs it honestly might be enough haha. I used cloudinary for a project recently too and it was great.
@@xylvnking I wasn't aware of the existence of Notion it seemed like a complete collaboration tool. I'll ask my team to look into it and potentially integrate it in our pipeline.
If you're learning I'd still suggest you to mess around with back-end stuff. Just doing side silly projects like a local file streaming server, some (web)socket-involved software (chat, notification system, collaboration editing, etc...) or even just a simple social media mock-up.
It's gonna help you a whole lot later on. :)
Firebase Summit 2023: We'll be shutting down Firebase within a month.
What about Nuxt?
It's on the way! Nuxt3 RC broke a couple things on us in the lead up to Firebase Summit, so we put it on the back burner until the dust settled from the launch.
I didn't followed but I have two questions. Is DESC sort implemented already? Are awkward "shallow" security rights still there? Thanks.
Jeff, you made a man out of me
And no FullText Search yet
I don't think it ever will natively, but there are extensions for meillisearch, algolia, and typesense.
@@beyondfireship You are right, the extensions market will change everything , thank you for reply ❤
What about better filters like mongo db
I love all these Tools but unfortunately you can use pretty much none of them because of EU-GDPR