To Realtime or Not? | Get to know Cloud Firestore #10

  Рет қаралды 115,294

Firebase

Firebase

5 жыл бұрын

Should you use realtime listeners in Cloud Firestore, or one time-fetch calls? In this episode of Get To Know Cloud Firestore, Todd explains the difference between these two methods for fetching data, what kind of impact they would have on your app's performance and battery usage, and how to structure your app to take advantage of a real-time data listener.
Get Realtime Updates → goo.gle/2Y54Enl
This video is also subtitled in Chinese, Indonesian, Italian, French, German, Japanese, Korean, Portuguese, and Spanish.
More episodes on Cloud Firestore → goo.gle/Cloud-Firestore
Subscribe to Firebase → goo.gle/Firebase

Пікірлер: 81
@BreakingBarriers2DIY
@BreakingBarriers2DIY 3 жыл бұрын
Every time I see this gentleman on a video thumbnail...I know I'm in for an enlightening experience full of understanding of the problems and worries that I have.
@toastrecon
@toastrecon 5 жыл бұрын
These videos are invaluable. Thank you for producing such clear content!
@AnimateLogo
@AnimateLogo 5 жыл бұрын
The Reddit example for one-time fetch call was spot on. I kept trying to find a use case for it the entire video. Thanks, Todd!
@Mambo56783
@Mambo56783 5 жыл бұрын
On the other hand. Now I would like to see Reddit in real time.... at least to see how irritating it is. But having some sense of how much is currently going on in real time would be interesting.
@Kevin-yw5qr
@Kevin-yw5qr 3 жыл бұрын
@@Mambo56783 you can now, and its just as annoying as you guessed.
@willroberts1891
@willroberts1891 Жыл бұрын
😮
@Apoka03
@Apoka03 4 жыл бұрын
Woah dude I had totally stopped using real-time because I had freaked out when I saw many documents get returned every time a single one of them had changed. This sure clarifies things lol.
@NGC7603
@NGC7603 4 жыл бұрын
The most clear and informative video I've seen in a long time, please keep making these!
@flonmackenzie2876
@flonmackenzie2876 4 жыл бұрын
Any more of these videos by Todd coming out? They are great. Keep em coming.
@justdavebz
@justdavebz 5 жыл бұрын
great high-level explanation
@codinginflow
@codinginflow 4 жыл бұрын
That was very enlightening, thank you
@tanaykamath1415
@tanaykamath1415 4 жыл бұрын
yeah ikr!!,your channel too!
@rckahale
@rckahale 3 жыл бұрын
Great to find you here Sir!
@tuyenvokhac7943
@tuyenvokhac7943 3 жыл бұрын
Idol
@roycelennox9211
@roycelennox9211 2 жыл бұрын
@Hector Kyson You are welcome =)
@JonatanWitoszekk
@JonatanWitoszekk 4 жыл бұрын
Awesome video! Made me completely rethink caching solution used in my app.
@orange_machine264
@orange_machine264 5 жыл бұрын
This was a great video! Very helpful. Also, I need to buy one of those shirts
@egopak
@egopak 3 жыл бұрын
I had to come back to this video a couple of times to finally make up my mind about Realtime vs. Not
@video.jomichaelis
@video.jomichaelis 5 жыл бұрын
This was very understandable! Thanks👍🏼
@SociedadAndroide
@SociedadAndroide 5 жыл бұрын
Awesome video Todd
@DheerajRijhwani
@DheerajRijhwani 5 жыл бұрын
Need more videos on 🔥 ☁️ firestore database structure and querying.
@baixartv
@baixartv 4 жыл бұрын
Another level of explanation. Thanks!
@DKPstudios
@DKPstudios 5 жыл бұрын
Will Firebase ever support indexing and query or will we always have to use a third-party integration to create a search feature in our apps. It's easy enough to break a title of a book or something in an array and perform a query on that, but searching for a specific word in a description is expensive because you either have to break the description up into an array, or use one of these third parties.
@rckahale
@rckahale 3 жыл бұрын
I love how i get to understand concepts & laugh at the same time.
@ProfessionalTycoons
@ProfessionalTycoons 3 жыл бұрын
such a good series of video
@ectoid6316
@ectoid6316 4 жыл бұрын
Any idea if there is support for Go, there were a few samples that I found, which seemed to be still in development. However the website says // Snippet coming soon. Any info on the matter ?
@Kubaguette
@Kubaguette 3 жыл бұрын
I love this guy, I love firebase, I would like to hug him sooo much and thank the team behind firebase haha :)
@magnet1te
@magnet1te 4 жыл бұрын
Fantastic video series!!! Now I want to do realtime in Flutter but I have a problem... Flutter Firestore plugin has no 'onSnapshots'. It has a 'snapshot' and a 'listener'. 'Snapshot' does not seem to start the listener. And theFlutter widget StreamBuilder seems to manage listening, turning it on and off. Have I misunderstood it all or is it a simple workaround?
@jesselima_dev
@jesselima_dev 5 жыл бұрын
I love these videos. Very technical and fun. :D
@rupayanc
@rupayanc 4 жыл бұрын
hi ... is there any king of logger which i can use to monitor the no of reads and writes in firestore?
@immortaleternal5125
@immortaleternal5125 5 жыл бұрын
I'm in, i am loving it and all that... but i often find myself unable to convince my employer to use firebase because i fail to answer all their "What if?s", which are mostly related to server cost and what happens when exceeding the free plan's limits.
@Jason-ul9tq
@Jason-ul9tq 5 жыл бұрын
Automagically does sound impressive! 9:12
@kpertsev
@kpertsev 4 жыл бұрын
en.m.wikipedia.org/wiki/Jargon_File
@inaglimpse
@inaglimpse 3 жыл бұрын
Thanks for the great content. A question: does realtime listeners will be triggered on changes to subcollections? I have an issue but don't know why my listener is not triggered.
@EnglishTurkishExpert
@EnglishTurkishExpert 3 жыл бұрын
Any example (in java) to use addSnapshotListener with LiveData? I am trying to observe when and if data changes in FireStore database and failing miserably. There is almost no examples on the net. I found a few but they are in Kotlin, which I have no idea how to convert them into Java code.
@tilakmadichettitheappdeveloper
@tilakmadichettitheappdeveloper 4 жыл бұрын
9:12 it happens "automagically"
@ginger-viking
@ginger-viking 3 жыл бұрын
I love these videos
@kevinliu6002
@kevinliu6002 4 жыл бұрын
Robin Williams, Software Engineer at Google. He's back!!!!!!
@tockra95
@tockra95 2 жыл бұрын
How high is the traffic if there is no update in the collection? Does a onSnapshot generates traffic throw ping and some other internal reasons?
@shubhamsharma0099
@shubhamsharma0099 4 жыл бұрын
pls tell me that how to update OR send player vectors (movements) to my real time database in firebase asa i'm trying to make a simple multiplayer game using firebase RTDB and also how top get that movement value back to show other players in realtime? pls help there i no such tutorial for this
@duanehodges3146
@duanehodges3146 3 жыл бұрын
How do I only get new documents from firebase using .onSnapshot when used with .limitToLast for pagination I'm trying to implement a chat app with infinite scroll using Firebase. The problem is that if I don't empty my messages array when a new message is added then they're duplicated. If I empty the messages array then it doesn't keep the previous messages.
@_dinesh
@_dinesh Жыл бұрын
Thank you for the explanation. The question is.... Under the hood does firestore use websockets to push the data to the client? Or is it GRPC.. The term listener seems pretty generic.
@AmitJayant
@AmitJayant 3 жыл бұрын
Very informative video. Thanks. Btw... where can i get that t-shirt?
@intentionalvideos456
@intentionalvideos456 4 жыл бұрын
Hi Guys, This one time fetch means normal http calls we will be making right the real time means calls through cloud class , Am i correct ?
@8Kexperience
@8Kexperience 4 жыл бұрын
Awesome explanation! Quick question: realtime make sense when multiple clients working on same data, realtime is keeping everything synced. What about single device, when I call set or update on same client/browser tab I get the update too. Is it costing me extra read.
@flechs-software
@flechs-software 3 жыл бұрын
Find an answer on this?
@8Kexperience
@8Kexperience 3 жыл бұрын
@@flechs-software nope
@flechs-software
@flechs-software 3 жыл бұрын
@@8Kexperience FWIW: I found a relevant SO question here: stackoverflow.com/questions/55919435/do-local-writes-to-firebase-rtdb-or-firestore-with-attached-listeners-cost-a-rea But I don't think the answer is correct :/
@8Kexperience
@8Kexperience 3 жыл бұрын
@@flechs-software :'(
@manjunathpatil2489
@manjunathpatil2489 3 жыл бұрын
Tq u sir u saved my week
@taufeekahmadkhan3953
@taufeekahmadkhan3953 5 ай бұрын
Does this liveSync works on same thread or different thread?
@matthiasgehrmann1573
@matthiasgehrmann1573 5 жыл бұрын
thx !
@sushantchandla
@sushantchandla 4 жыл бұрын
Thanks ... 😄😄😄😄
@SteveKovacs
@SteveKovacs 5 ай бұрын
This seems perfect for my use case until he brought up pagination/infinite scroll example. Can someone explain why that would make a difference? Or direct me to the explanation of that? Thanks ahead of time.
@guasaentertainment9694
@guasaentertainment9694 3 жыл бұрын
But if I need to make a call in real time within another. For example, I want the comments to be heard when new Posts are added and in turn I want the comments of each post to be heard in real time. Thanks
@laudijksterhuis
@laudijksterhuis 2 жыл бұрын
Automagically... love it 😂
@godrugal1
@godrugal1 4 жыл бұрын
in android for example, if I have a real-time listener in an activity A, and if I went to activity B then I went back to activity A. will Activity A read all the data again or will it read all data from cache and only get updates from the updated documents? from what I know is that it will read all data again is that right?
@ranjeetkumaryadav3978
@ranjeetkumaryadav3978 3 жыл бұрын
​@@ToddKerpelmanCorp Can you explain "ton of time elapsed"? If user navigates 10 times between going from A to B to A in span of two mins,then how many times it will get the all data gain from server.
@guanacodevs
@guanacodevs 5 жыл бұрын
Automagically!!!
@lokisingh9944
@lokisingh9944 4 ай бұрын
he's really good
@JnanadasKKunjan
@JnanadasKKunjan 4 жыл бұрын
thanks
@basketballico508
@basketballico508 5 жыл бұрын
Hi, if I write data offline, this update the cached data and then sync with server, but when is offline the user can write data that break the security rules and the cached data is wrong 😞, when is online the new sync remove this wrong data, but I don't like this :(, I want to show also a permission denied error when is offline
@AnimateLogo
@AnimateLogo 5 жыл бұрын
Todd explained a similar scenario in another video. Look it up.
@DenisTRUFFAUT
@DenisTRUFFAUT 5 жыл бұрын
Good point. Validating some rules offline could be possible with a strong CSP (ensuring no JS alteration on client side), but to really evaluate rules you would have to download the rules validator (I mean, js files are already super fat, nearly 1 Mb). Plus, you still won't be able to validate rules that make database reads ('cause you are offline)
@bazoozoo1186
@bazoozoo1186 4 жыл бұрын
what is name of this guy? I want to search and watch all his videos. there is no name even at the description :(
@MrDasebasto
@MrDasebasto 4 жыл бұрын
Todd Kerpelman
@yeilmusic
@yeilmusic 4 жыл бұрын
so i need remove listener for avoid 30 minuts offline .. :/ ?¿?¿
@aminelouni
@aminelouni 3 жыл бұрын
*The one million dollar question :* How to paginate in real time
@Kevin-yw5qr
@Kevin-yw5qr 3 жыл бұрын
10:50 speak of the devil, Reddit just rolled out that feature and its incredibly annoying.
@AymanShaabanELsayedDEVELOPER
@AymanShaabanELsayedDEVELOPER 4 жыл бұрын
Hi, @Todd Kerpelman Please help me,i need to support my firestore java chat app with fcm Give me an link that helps me, Thanks
@lidory98
@lidory98 3 жыл бұрын
Anyone knows this guy name by any chance?
@el7284
@el7284 3 жыл бұрын
Amazing, but still way too expensive
@afj9966
@afj9966 4 жыл бұрын
9:11 auto-magically
@seccat
@seccat Жыл бұрын
OK, let's do this... Leroy Jenkins!
@planktonfun1
@planktonfun1 Жыл бұрын
You don't have to sell it to me, I already bought it
@lukecross5439
@lukecross5439 4 жыл бұрын
Firestore is better than Realtime Database in everything?
@too-many-phils
@too-many-phils 8 ай бұрын
realtime UX is much more complicated than this presumes. I strongly disagree it should be the default experience
@modoestudiopa2062
@modoestudiopa2062 2 жыл бұрын
This was useless for me, not that the information wasn't well presented, or the info itself was useless, the useless part is that seeing that this is in the page of the documentation for the topic, I was expecting at least a little bit of code explanation
@hawarhekmat1174
@hawarhekmat1174 Жыл бұрын
Flutter and firebase the magic 🪄✨🪄✨
@Firebase
@Firebase Жыл бұрын
We're so glad you enjoyed the video, Hawar! Check out more episodes on Cloud Firestore here: goo.gle/Cloud-Firestore 😎
@hawarhekmat1174
@hawarhekmat1174 Жыл бұрын
@@Firebase thank you so much, I'm enjoying it more than anything.
How do Cloud Functions work? | Get to know Cloud Firestore #11
18:21
Must-have gadget for every toilet! 🤩 #gadget
00:27
GiGaZoom
Рет қаралды 12 МЛН
When You Get Ran Over By A Car...
00:15
Jojo Sim
Рет қаралды 16 МЛН
NERF WAR HEAVY: Drone Battle!
00:30
MacDannyGun
Рет қаралды 49 МЛН
Is Supabase Legit? Firebase Alternative Breakdown
8:16
Fireship
Рет қаралды 345 М.
How to Structure Your Data | Get to know Cloud Firestore #5
13:57
Cloud Firestore Pricing | Get to know Cloud Firestore #3
16:23
Firestore Data Modeling - Five Cool Techniques
11:44
Fireship
Рет қаралды 253 М.
Using Cloud Firestore For Your REACT Backend 2023 | CRUD App
51:15
Travis Media
Рет қаралды 19 М.
Firestore Security Rules - How to Hack a Firebase App
10:05
Fireship
Рет қаралды 129 М.
Choose a phone for your mom
0:20
ChooseGift
Рет қаралды 6 МЛН
GamePad İle Bisiklet Yönetmek #shorts
0:26
Osman Kabadayı
Рет қаралды 622 М.
Игровой Комп с Авито за 4500р
1:00
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 1,9 МЛН
После ввода кода - протирайте панель
0:18
Up Your Brains
Рет қаралды 1 МЛН