What's the Difference Between Cloud Firestore & Firebase Realtime Database?

  Рет қаралды 107,731

Firebase

Firebase

Күн бұрын

On this episode of #AskFirebase, Jen & Todd answer even more questions about Cloud Firestore from users like you! Do you want to ask our expert Firebase Engineers your Firebase questions? Then don’t forget to use #AskFirebase 👍
Zero to App Talk → • Zero to App: Live Codi...
Zero to App Code → goo.gl/oenQk4
Text Search in Firestore Example → goo.gl/tUAkh3
Blog - Cloud Firestore for Realtime Database Developers → goo.gl/pBbEmp
Documentation - Comparing Realtime Database and Cloud Firestore → goo.gl/VTSdFm
0:24 “Are auto generated keys in Cloud Firestore based on timestamp, like it is in the realtime database? If not, how can I query document data ordered by document key?”
2:22 “Can I do text searching or Like queries with Cloud Firestore?”
4:01 “Why did you make a new database instead of updating the old realtime database?”
Watch more #AskFirebase Videos → goo.gl/ODpnrC
Subscribe to the Firebase Channel → goo.gl/9giPHG

Пікірлер: 145
@HammadKhanYT
@HammadKhanYT Жыл бұрын
Here are the differences (from the linked article) 1. Realtime Database (RDB) allows 100k max concurrent connections, while Cloud Firestore (CF) allows 1M, per database 2. RTDB does not allow easy queries across multiple fields while CF does allow it without you having to create sperate join fields 3. There is no compromise on speed in CF. CF can store bigger data but will return results in the same time (size of DB does not matter - query is always optimized) 4. CF is much easier to scale if your App becomes popular 5. You can fetch an individual node or point in CF, thus no need to fetch unwanted data. 6. RTDB is much more natural for chat applications. While CF allows one-time fetch and you can add listeners, but that functionality is not 'natural' for real-time database applications. 7. CF store data across multiple regions, if one server goes down, data is server from another server without loss of data. RTDB only stores data in the US, and does not support other regions. 8. CF has slightly high uptime and availability than RTDB. 9. They have different pricing models. Data for RTDB and No of request for CF
@francoisbouchet9907
@francoisbouchet9907 Жыл бұрын
great! a 6:30 video that does not answer the question featured in its title ^^! ..."check the link below" well thanks!... and thankfully, you're here Hammad, doing their job ^^! muchas gracias!
@siom7617
@siom7617 6 жыл бұрын
OK, I know this might sound pretty weird, but Firebase is the reason why I'm so eager to continue developing Android apps. I'm relatively new to the scene, been doing it for the past few months. And although I'm not at the level of calling myself the "real" Android app developer, Firebase has such an amazing documentation that makes you want to implement it in your app and try out different things. It's amazing just how complex this thing is, especially for someone like myself who's fairly inexperienced, but if I'm capable of navigating through the documents and *actually making progress*, then anyone can. Good job to the team for making this awesome product. If I'll ever publish an app, it will probably have at least some Firebase compontent in it! Awesome work, you've got yourself a fan here!
@Jeffrey7P
@Jeffrey7P 5 жыл бұрын
This video sure does explain the differences...
@javierbryan6357
@javierbryan6357 5 жыл бұрын
Jeffrey Paulino ikr 😂
@williamviolette4555
@williamviolette4555 4 жыл бұрын
I hope this is sarcasm b/c they asked the question and then yah, didnt answer it. Unless I missed something.
@KeithPrice-OurBusinessHero
@KeithPrice-OurBusinessHero 4 жыл бұрын
@@williamviolette4555 The answer was, "I've written a full blog post with all the details and I've linked to it in the description." (paraphrased)
@lasoupedjour
@lasoupedjour 3 жыл бұрын
yeah cool video
@xnivaxhzne
@xnivaxhzne 2 жыл бұрын
@@KeithPrice-OurBusinessHero 😂
@CO8848_2
@CO8848_2 4 жыл бұрын
Didn’t answer the question
@codinginflow
@codinginflow 6 жыл бұрын
Wow, there is so much good content explaining Firestore
@testwhwhja
@testwhwhja 3 жыл бұрын
yes
@hartnil93
@hartnil93 6 жыл бұрын
Hi Firebase, Can you tell me when there will be a button for backing up the data from the firestore ( like in the realtime database)? #AskFirebase
@datasciencetoday7127
@datasciencetoday7127 3 жыл бұрын
The best title for the video, it certainly explains the difference between the two ... for 2 seconds 5:07 to 5:08
@learn_now_dot_sh_28
@learn_now_dot_sh_28 6 жыл бұрын
Can you tell me how login first from Google OAuth in a website and then log out? Then log in from facebook, I got the same account in both OAuth login. Why? How to manage this in firebase web?
@nate4257
@nate4257 4 жыл бұрын
man id love to work with Todd, he seems like an awesome person!
@fgscaglioni
@fgscaglioni 6 жыл бұрын
Great video!! Thanks for the links, they will help a lot.
@Krishna-bz5iz
@Krishna-bz5iz 6 жыл бұрын
Sir I want to develop two android apps. First app that store some edit text value into firestore cloud db. And the second app that shows that value into textviews. So how to do that. how I retrieve data from different firestore cloud project.
@franmaric
@franmaric 4 жыл бұрын
If I write to cloud firestore the same data that is already in the same place does that count as a write? So if I update one of my documents with same data that is already inside of that document so no change is being made to cloud firestore document does that still count as a write to database?
@markusgattol
@markusgattol 6 жыл бұрын
could you do a firecast how one would integrate a hosted firebase app with stripe (maybe even chargebee)?
@mdhosnealwalidshaiket8047
@mdhosnealwalidshaiket8047 4 жыл бұрын
How Can I Export the data from Cloud Firestore toa CSV or JSON file like the Realtime database?
@KommissarBoelles
@KommissarBoelles 10 ай бұрын
Wow. A video TITLED "What's the Difference Between Cloud Firestore & Firebase Realtime Database?" does "answer" that question by saying: yeah, go read a blog post about it. Great job guys! /s
@jassisingh672
@jassisingh672 4 жыл бұрын
can i use firebase spark plan for a particular project that will not expand its reads and writes for years. Is it actually free regarding time. And how can I backup my database using console { Firestore}.
@vladlomakin4807
@vladlomakin4807 6 жыл бұрын
#AskFirebase Can I use Crashlytics in Unity project(Android)? I can add dependency in gradle build file(in unity project) and C# wrappers from Fabric. Is it correct way to do this?
@mariovargek
@mariovargek 6 жыл бұрын
#AskFirebase When implementing "foreign keys" in Cloud Firestore, is it better to use document ID as string or built-in type reference?
@wincevilleaguer5043
@wincevilleaguer5043 6 жыл бұрын
how do i send a notification after uploading a file to firebase database
@devillspdr
@devillspdr 6 жыл бұрын
can i limit the number of requests per user in cloud firestore? (daily limit)
@jenmansfield3207
@jenmansfield3207 6 жыл бұрын
Short answer is no, there's no built-in way to do this, but you could probably hack something together. So, off the top of my head, you could do something like have a counter for each user and increment it in a transaction whenever there is a write. Then either in security rules or within the transaction, prevent the write when that daily limit is reached. Finally, you could set up a cron job from a server or from a Cloud Function to run once a day and reset all the counters to 0.
@g46psk
@g46psk 6 жыл бұрын
#AskFirebase 1. do you have a planned release date of Firestore stable version to be used in production environment? 2. is it possible to fix a warm up time problem for Cloud Functions? 3. I am using Blaze plan with some Cloud Functions, do I have to pay for Google Cloud Playform too? I have been switching from Realtime Db to Firestore for a while, and waiting for stable release to have my app released too!
@weicao4101
@weicao4101 4 жыл бұрын
if I have a cloud firestore, I want to export data to local, how can I do it?
@spyro47
@spyro47 6 жыл бұрын
#AskFirebase I want to use Firestore in my new Unity3D project. When firestore will be available for Unity3D. Is it good idea to start with firebase realtime database and then migrate to firestore when it releases. How much efforts it will add ?
@mahbubhasan5905
@mahbubhasan5905 5 жыл бұрын
Hi ... i tried multiple time to read a specific dara from realtime database . Like user/info , under info i saved my won personal detail. But when i called the data using this url. I can't face the data, i think , you can add a short query for collter this data. Like ref(user/info).getData(); then we can use this as a array. In our view . #askfirebase
@erikpolygon5471
@erikpolygon5471 3 жыл бұрын
But why is there a simple "storage" with much lower pricing? Whats the different here to firestore or realtime database?
@mahmoodali1871
@mahmoodali1871 6 жыл бұрын
#AskFirebase Let say i have users , movies and startReview document startReview has userId and movieId and numberOfStar my question is how to retrieve user name and movie name from startReview in android there is no query can be select from multi-documents so how i can retrieve this date and display in recyclerView ?.
@nimraaslam6760
@nimraaslam6760 6 жыл бұрын
Is that possible to connect nodemcu to firebase storage
@daviidon
@daviidon 6 жыл бұрын
#Askfirebase why do I have to use order_by when using start_after when querying?
@Taalaibek
@Taalaibek 6 жыл бұрын
Can you make a tutorial on elastic search integration?
@divertechnology
@divertechnology 5 жыл бұрын
two geniuos - excellent work
@gourbera4635
@gourbera4635 6 жыл бұрын
how to create the api end point for cloud firestore using python?
@stevengao8345
@stevengao8345 6 жыл бұрын
inside my app project , can i mix these two database up ? what i mean is can i put half of my project in old realtime database and half of my data use firestore ? thanx
@jenmansfield3207
@jenmansfield3207 6 жыл бұрын
Yup! You can use both databases within a project.
@LydellAaron
@LydellAaron 2 жыл бұрын
So Firestore is a document database which does not support full text search. Realtime database is json based shared structure?
@generalomosco4495
@generalomosco4495 6 жыл бұрын
How can i make order sorting without using the inequlity as priority in first orderby? e.g where("geopoint",'>',' .. '). where("geopoint",'
@mahaltech
@mahaltech 6 жыл бұрын
#AskFirebase Sorry for asking this question many time I want to know if there is any way to use c# or vb.net to build Rest Clint for Firebase remote config Api ? Pleaaaaaaaaaaaaaaaaaaase help
@theera-thek10unlimited77
@theera-thek10unlimited77 6 жыл бұрын
#AskFirebase Hello, I just wanna ask one thing that gets me confuse. Whenever I add a single item using FireStore the 'REMOVED' .getType() is always being called before the 'ADDED' document type. Is this really how FireStore addOnSnapshotListener works? I use switch (doc.getType()){ case ADDED: break; case REMOVED: break; case MODIFIED: break;}
@theera-thek10unlimited77
@theera-thek10unlimited77 6 жыл бұрын
I also do some pagination, please see the sample code here: stackoverflow.com/questions/50201870/how-to-perform-crud-in-cloud-firestore
@acche-rc
@acche-rc 6 жыл бұрын
#askfirebase does it make sense to use both realtime db and firestore? Any example use case?
@lukasj6182
@lukasj6182 6 жыл бұрын
#AskFirebase I‘m a little bit confused now. Can Firestore DB only generate 500 documents that include a server timestamp per second in general, or is there 500 timestamps/second limit per collection?
@lukasj6182
@lukasj6182 6 жыл бұрын
Thank you for the quick answer :)
@codinginflow
@codinginflow 6 жыл бұрын
#askfirebase When I make tutorial videos about Firestore, am I allowed to use a few of your official images?
@zearthus7089
@zearthus7089 6 жыл бұрын
the real big missing piece here is the query function. I'm using firebase for basic database structure but for complicated search query and joint tables I still prefer sqldb. I hope google can create a features that runs like an sql.
@theera-thek10unlimited77
@theera-thek10unlimited77 6 жыл бұрын
#AskFirebase How many instances can be use when using Blaze since the spark is able to take 10 thousand working at the same time?
@qureshiowais6951
@qureshiowais6951 4 жыл бұрын
make a playlist on the security of firestore database, please!!!
@stevengao8345
@stevengao8345 6 жыл бұрын
can i manage the backend of firebase database, what i mean is i created a social media app, the posts that each user created i added a time stamp to it, once posts pass 7 days limit ,those outdated posts will be removed automatically ? how can i make this possible? thanks so much
@stevengao8345
@stevengao8345 6 жыл бұрын
ZEUS MYLIFE_2.0 thanks for reply me, do you mind show me a few lines of code to demonstrate how it work? Not very familiar how firebase function work,
@stevengao8345
@stevengao8345 6 жыл бұрын
ZEUS MYLIFE_2.0 thanks, i will go watch it
@lglf77
@lglf77 2 жыл бұрын
Não entendi até hoje, se tenho registro de usuário no REAL TIME DATABASE, como posso pegar esses usuários registrados para serem vistos pelo FIRESTONE DATABASE e criar coleções referentes a esses usuários registrados no REALTIME DATABASE? Esse vídeo é insuficiente para eu entender o que um relacionamento entre REALTIME E FIRESTONE trabalhando em conjunto. Alguém me salva?
@nikhilagarwal5326
@nikhilagarwal5326 6 жыл бұрын
#AskFirebase What is the best practice for generating reports using firestore? As of now I have written a few cloud functions that calculates aggregate data in real time as data is being added in my app. However, after I deploy the app, I am not sure how to add new reports to the system. My cloud functions listen to data being added and not the previous data. What would be the right way to go over previous data as well as listen to new data when I need to add a new report?
@theincompletecircle
@theincompletecircle 6 жыл бұрын
Jen Person By reports I mean business reports where for example we calculate total annual sales. So whenever an order entry is made in my app, my cloud function runs to add it to the total value for sales. My concern is that let's say after deploying my app, I want to add another report/graph where I want to track total sales of different items. How do I calculate this for existing data because my cloud function just works when data is added? Also I have to keep in mind that while I go over previous data I have to keep track of any new data being added at the same time.
@theincompletecircle
@theincompletecircle 6 жыл бұрын
Jen Person Thanks but the issue could be that while my function is running over previous data, new data might be added. And for new data my onAdded function could be running as well as my previous data function might also add it to the report data. Is there some solution where I can move the data to some other pipeline and run SQL like queries that allows me to do whatever analysis I want later?
@MetsuryuVids
@MetsuryuVids 6 жыл бұрын
#AskFirebase When will Firestore come out of beta?
@cutiko
@cutiko 6 жыл бұрын
#AskFirebase when are geopoints gonna be available...
@alexr.4409
@alexr.4409 6 жыл бұрын
Yesterday
@MetsuryuVids
@MetsuryuVids 6 жыл бұрын
@Alex R. Cloud functions is out of beta. Firestore is still in beta.
@bryceyorkpm
@bryceyorkpm 6 жыл бұрын
6 months later and still no answer.
@RaghavNarangg
@RaghavNarangg 5 жыл бұрын
1 Year Later, Still no Answer
@ebenjs228
@ebenjs228 6 жыл бұрын
#AskFirebase Is firebase more suitable for tchat application than Mysql?
@TheKodati
@TheKodati 4 жыл бұрын
#AskFirebase .. What is the best way to export data from Firestore CloulFirestore.. Basically, we are trying to add mock data for testing.. And we wanted to create some collections/docs,. export it , mimic and create entries #BrandnewtoFirestore..
@cemxwekta358
@cemxwekta358 6 жыл бұрын
#AskFirebase It is possible to export a document of a collection using pre-defined key? For example how do I get all of my users "First Name"s in a txt file?
@cemxwekta358
@cemxwekta358 6 жыл бұрын
Thank you for your answer. I started doing the same thing. Luckily I caught you here, I am having ClassNotFoundException when I instantiate new object using FirebaseOptions.Builder() Why is this happening? (I am new to Firebase) Edit: I post it on Stack Overflow too with more details: stackoverflow.com/questions/48613264/noclassdeffounderror-while-using-firebase-admin-sdk
@mahmudamen
@mahmudamen 6 жыл бұрын
Big fan
@segerlabs
@segerlabs 6 жыл бұрын
Can you do fanout updates with firestore? Also, how would you do a many to many relationship? Specifically users and groups.
@jenmansfield3207
@jenmansfield3207 6 жыл бұрын
Can you tell me more about what you mean about fanout updates specifically in this case? Do you mean not update all client devices with the new data at once? As for a many to many relationship, that would be an opportunity to denormalize the data. We have an old post on it for the Realtime Database here: firebase.googleblog.com/2013/04/denormalizing-your-data-is-normal.html It's a bit outdated I realize, but it still has a good foundation of information.
@altair0800
@altair0800 6 жыл бұрын
Denormalization (intermediary collection which references relationships between your users and groups).
@geniushumans5114
@geniushumans5114 3 жыл бұрын
why realtime db is not working
@RumakInaph
@RumakInaph 6 жыл бұрын
3rd time I am asking, why don't you support the in function to search for a list of documents IDs like.how mongo DB does it #askfirebase say get list of all users whose document ID in [x1,X2,X3,x4,x5]
@RumakInaph
@RumakInaph 6 жыл бұрын
thank you for the reply Todd. How does it work in social networking kind of applications. Say I have an event which is attended by 50000 users. If I want to see the the users who are attending, I will query my collection lets say 50 at a time and get the user IDs. To get the name and profile picture of all these 50 users, now I need to make 50 queries to the users collection. Lets say, I keep the profile pic and name of every user in events collection so that I don't have to query users collection, but if a user changes name/profile picture, I need to go update all the collections where this profile pic and name are saved to keep information up to date otherwise the application will show one pic at one place and another pic at another place. In Oracle, I can join two tables and can get it or I can use the in operator as a single query on users table. In MongoDB, I can fetch all 50 users in one query using the in operator on users collection. How do I get around this using cloud Firestore? #AskFirebase
@acche-rc
@acche-rc 6 жыл бұрын
#askfirebase anything special to watch out for when building PWAs with Firebase?
@cartoonist6012
@cartoonist6012 6 жыл бұрын
Soooooooo, FireStore needs a way to recognize which user is signed in.
@AnshumanKumar007
@AnshumanKumar007 Жыл бұрын
Firebase RTDB and Datastore are the same?
@SumitChandelatGoogle
@SumitChandelatGoogle Жыл бұрын
Firestore is the next generation of Cloud Datastore. Firebase RTDB is a completely separate product from Firestore, and has various differences for data storage depending on your needs. Check out this page for comparisons and selection criteria between the two: firebase.google.com/docs/database/rtdb-vs-firestore.
Жыл бұрын
#AskFirebase why no cloud functions in spark plan? Even like an absolute minimum would allow me to learn how to use them and integrate in app.
@MrWhoever
@MrWhoever Жыл бұрын
WHERES THE ANSWER TO THE QUESTION IN THE TITLE THO
@brayanhernandezmora8619
@brayanhernandezmora8619 6 жыл бұрын
nice
@DimuDesigns
@DimuDesigns 6 жыл бұрын
We need a video explaining the differences between Cloud Datastore and Cloud Firestore.
@dougstevenson3769
@dougstevenson3769 6 жыл бұрын
The differences are detailed here: firebase.google.com/docs/firestore/rtdb-vs-firestore There is also a blog post: firebase.googleblog.com/2017/10/cloud-firestore-for-rtdb-developers.html
@DimuDesigns
@DimuDesigns 6 жыл бұрын
That's Cloud Firestore and the Real-time database, there is no mention of *Cloud Datastore* in either of those articles (Cloud Datastore is a NoSQL solution released by Google back in 2008).
@dougstevenson3769
@dougstevenson3769 6 жыл бұрын
Ah, I misread. Cloud Datastore mostly just doesn't have realtime capabilities like Firestore does, and doesn't have mobile client SDKs. So they're not really comparable in the context of an app that uses Firebase and expects to read and write the database directly. stackoverflow.com/questions/37178919/google-cloud-datastore-vs-firebase
@mahmudamen
@mahmudamen 6 жыл бұрын
Hi Jen . I'm new user firebase . How i send my quest
@stevengao8345
@stevengao8345 6 жыл бұрын
create an account with firebase, gerate a plist then download it and drag it to your app, then import Firebase inside your app, then Database.database.reference.... read it's document, it is kinda strightforward. good luck
@yahyaewida7142
@yahyaewida7142 6 жыл бұрын
#AskFirebase I am beginner at Firebase and I just wanna know how I can access data without using onDataChange events. I mean just accessing the data without waiting its value to change
@yahyaewida7142
@yahyaewida7142 6 жыл бұрын
Thank you xD
@naumanahmed19
@naumanahmed19 5 жыл бұрын
#AskFirebase How to enable automatic backup for Firestore?
@lglf77
@lglf77 2 жыл бұрын
I still don't understand, if I have a user registration in REAL TIME DATABASE, how can I get these registered users to be seen by FIRESTONE DATABASE and create collections referring to these registered users in REALTIME DATABASE? This video is insufficient for me to understand what a relationship between REALTIME and FIRESTONE is working together. Someone save me?
@AndreiNedelus
@AndreiNedelus 4 жыл бұрын
Ii came hero to know what's the difference, and what I got?
@joshxperia441
@joshxperia441 6 жыл бұрын
#AskFirebase How to save images in cloud firestore or realtime database for Android App so they can be displayed when the user invokes them?
@joshxperia441
@joshxperia441 6 жыл бұрын
Thank you i was a bit confused,but now is it possible to save my own images in cloud storage so that they can be displayed in my android app?
@joshxperia441
@joshxperia441 6 жыл бұрын
How to save images in cloud storage for Android App so that they can be retrieved and displayed within the App?(no uploaded by the users)
@sariegomon
@sariegomon 6 жыл бұрын
Ig you want to mantain a finite number of images I think Firebase Hosting is more appropiate for your use case. Then use the links and displaythem in android with Glide, Picasso or whatever
@joshxperia441
@joshxperia441 6 жыл бұрын
thank you this will work for me
@ronnelgalag8265
@ronnelgalag8265 6 жыл бұрын
#AskFirebase I am using Firestore for my newest project. But I have few problems. 1. How can I do a search activity where I can search the data based on on a field and show it to a recyclerview? 2. When I click the document inside the recyclerview, how can I send ita to an activity and display the fields based on the searched data? Thanks in advance :)
@dhiyaulhaq8369
@dhiyaulhaq8369 6 жыл бұрын
#AskFirebase Cloud Firestore is awesome, when and why we still need Firebase Realtime Database??
@jenmansfield3207
@jenmansfield3207 6 жыл бұрын
dhiya ulhaq I love this question! It depends on the needs of your app. For example, Real-time Database charges per GB of data, whereas Cloud Firestore charges per write. This means if you have an app that’s making a lot of small writes (say chat app) RTBD could be a better choice. Also, listening to .childAdded events can be useful for certain apps, and this capability doesn’t exist in Cloud Firestore. You can mimic it, but it’s a bit more work.
@dhiyaulhaq8369
@dhiyaulhaq8369 6 жыл бұрын
Jen Person Awesome, thanks !
@edwinfcapidos
@edwinfcapidos 4 жыл бұрын
@@jenmansfield3207 Thank you for this. Same goes with real time tracking of location right?
@navnitkapadiya7011
@navnitkapadiya7011 6 жыл бұрын
Firestore - OR query how can i perform or condition? #AskFirebase
@deanjackson3238
@deanjackson3238 2 жыл бұрын
each time i see that guy i think of Robin Williams
@behnamKhanii
@behnamKhanii 3 жыл бұрын
I love you 😍😍
@cutiko
@cutiko 6 жыл бұрын
People want one million of functionality but that fail to see the value in the serverless
@mgtla4868
@mgtla4868 6 жыл бұрын
I went from 1)ranting about the lack of Firestore geo-queries, and vowing to be the FIRST person to grab Todd on the street and demand answers... to 2) realizing it's impossible to think anything besides "he's awesome," after seeing his facial expressions from 6:01 to 6:04, and how he handled the hashtag letdown. Wait... ok, yeah. I've snapped back out of it. Seriously, where are the geo-queries? Did some lawyer stiff you guys on a bad deal with the original GeoFire? Or is it simply that not enough people want this? Would love an estimated date.. or an Alpha invite... (: #askfirebase
@mgtla4868
@mgtla4868 6 жыл бұрын
Thanks for the reply, happy to see you feel similarly (: At that link you provided, which option should I choose for the "Component" - Firestore? Functions?
@PaulPeavyhouse
@PaulPeavyhouse 6 жыл бұрын
#AskFirebase Silly/Noob question: How do I get "firebase.firestore().collection('items').onSnapshot(querySnapshot => { ... })" to contain only a newly added document? If I add a document to the "items" collection, querySnapshot contains all documents in that collection, not just the newly added one. Do I need to update my items query with a new timestamp each time, or is there something more automagic that I am missing? I am using Web/NodeJS.
@jenmansfield3207
@jenmansfield3207 6 жыл бұрын
Good question! You are correct in thinking you'll want to add a timestamp and order by timestamp to get the latest document added to the collection.
@PaulPeavyhouse
@PaulPeavyhouse 6 жыл бұрын
Thanks @Jen! If that is true, then won't I have to re-query firestore with a new timestamp constraint after every new document that I see? In a collection where *at least* a few documents might get added every minute, there could be potentially hundreds of seemingly unnecessary queries per hour. So, there really isn't a single query way to be advised whenever any new document is added to a collection? :/
@PaulPeavyhouse
@PaulPeavyhouse 6 жыл бұрын
This also seems error prone when, if for example 100 documents are added very quickly at 12:00:00.000, upon seeing the snapshot for the first document I create a new query for >= that document's timestamp (not just ">", because then I might miss some of the other 99 documents), and then see all 100 documents again, and now have to keep track of document ids of what I have seen and resolve them out and ignore ones that have already been seen. I'm new to firestore, and have been very surprised that getting notifications of only newly added documents seems to not be a simple task. :/
@jenmansfield3207
@jenmansfield3207 6 жыл бұрын
You can just order by timestamp--you don't have to query greater to or equal to a certain timestamp.
@PaulPeavyhouse
@PaulPeavyhouse 6 жыл бұрын
Thank you for your reply, but I'm confused: If I "just order by timestamp", any time a single document is created in a collection, my app will still receive the entire collection, albeit sorted by timestamp, so my app will still need to manually keep track of the timestamp of the previously received document so that it knows when to stop iterating through the collection of all documents. The intention of my question was that I would like to save the bandwidth by 100% avoiding getting events for created documents that my app has already seen in the first place...preferably automagically.
@help-ever
@help-ever 6 жыл бұрын
We want Logical OR
@drjoaoventura
@drjoaoventura 4 жыл бұрын
Remember: Firestore Limit of 500 writes/second limit
@KeithPrice-OurBusinessHero
@KeithPrice-OurBusinessHero 4 жыл бұрын
If I understood correctly, that's only the case when using some kind of sequential ID. Hopefully, they can confirm or correct me.
@_Amilio_
@_Amilio_ 3 жыл бұрын
but did you answer the question?
@edrivenstudioslevar
@edrivenstudioslevar 5 жыл бұрын
So with this title .. I thought the video would have the answer. #boywasiwrong
@OzieCargile
@OzieCargile Жыл бұрын
It's ironic that this video doesn't explicitly answer the question posed by its title. Rather, it sends you to a lengthy blog post linked in the description. Sigh. For those interested, the relevant paragraphs read: While the Firebase Realtime Database is basically a giant JSON tree where anything goes and lawlessness rules the land, Cloud Firestore is more structured. Cloud Firestore is a document-model database, which means that all of your data is stored in objects called documents that consist of key-value pairs - and these values can contain any number of things, from strings to floats to binary data to JSON-y looking objects the team likes to call maps. These documents, in turn, are grouped into collections. This new structure gives you several important advantages in being able to query your data. For starters, all queries are shallow, meaning that you can simply fetch a document without having to fetch all of the data contained in any of the linked subcollections. This means you can store your data hierarchically in a way that makes sense logically without worrying about downloading tons of unnecessary data.
@amanbereket6451
@amanbereket6451 2 жыл бұрын
More than 95% of the time you will have to pick firestore than a real-time database.
@MrMarcoAlvarado
@MrMarcoAlvarado 2 жыл бұрын
fun faaact..!?
@lgopt7467
@lgopt7467 6 жыл бұрын
Since you guys say you are listening.. Here is A very important point- Do you know why non Google developers or any random developers Firebase videos are more appreciated than yours? Its because they don't keep saying, "In the links below". Every Jens video has her saying that with her customary nod! Not in the best taste of encouraging young developers
@lgopt7467
@lgopt7467 6 жыл бұрын
Jen Person .. Thanks for the reply, as for this video, it doesn't really apply.. But all your other ones they are plagued with that line. The other day, for a cron job tutorial, your video was 20%, remaining stuff our team landed up seeing way better videos, to implement the same stuff you just thought was irrelevant! Don't get me wrong, we love the way you present, but its becoming too short cut oriented. Can you imagine me making a video about Firebase, where all I do is introduce the product... And everything else is "in the links below"! Its a beautiful product, so why don't you guys try to make this development ride smoother. At your level it must be kept in mind, the video presentation isn't the goal.. The knowledge to make Firebase the preferred choice must be the goal. You can't make developers chose this system if you introduce something with everything else being "Fill in the blanks" . Thanx for understanding
@weho_brian
@weho_brian 6 жыл бұрын
why google, why
@hachij_
@hachij_ 6 жыл бұрын
xD
@agentsmidt3209
@agentsmidt3209 6 жыл бұрын
Who is this Jen Person?
@chuganator
@chuganator 6 жыл бұрын
Lol
@paulwary
@paulwary 6 жыл бұрын
In fact she is @ThatJenPerson.
@josiahbvevo
@josiahbvevo 6 жыл бұрын
Is her family called the People
@dranipani
@dranipani 3 жыл бұрын
Maybe i'm worng, but is this a AI video?
@letslearncomputerprogramming
@letslearncomputerprogramming 5 жыл бұрын
Firebase performance is slow .
@FredericBiondi
@FredericBiondi 5 жыл бұрын
Horrible format