TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Cloud Firestore: A New Document Database for Apps

377 pointsby crbover 7 years ago

35 comments

jamestover 7 years ago
[Firebase founder] This new database has been in the works for 2.5 years, since shortly after we joined Google. It was developed in close collaboration with the Cloud Datastore[1] team, and uses Google’s core database infrastructure.<p>We built it because we know it can be challenging to build complex apps with our original database -- Firebase Realtime Database -- where we optimized for ease-of-use &amp; real-time sync over querying functionality. For more info, see this comparison between the two[2].<p>This is a open beta launch, so the product has limitations[3] you should be aware of. We’ll be working to remove&#x2F;raise these before General Availability.<p>A note on naming: Firebase launched in 2012[4] with a single product, the original database. As we added products (Firebase Auth &#x2F; Firebase Hosting &#x2F; etc), we began calling the original product ‘Firebase Realtime Database’, or RTDB for short. If you haven’t followed us lately, we’ve grown to become Google’s app platform, and now have 16 products to help you build&#x2F;grow apps.<p>We’re grateful for the support HN has given us over the years and we hope you enjoy Cloud Firestore!<p>[1] <a href="https:&#x2F;&#x2F;cloud.google.com&#x2F;datastore&#x2F;" rel="nofollow">https:&#x2F;&#x2F;cloud.google.com&#x2F;datastore&#x2F;</a> [2] <a href="https:&#x2F;&#x2F;firebase.google.com&#x2F;docs&#x2F;firestore&#x2F;rtdb-vs-firestore" rel="nofollow">https:&#x2F;&#x2F;firebase.google.com&#x2F;docs&#x2F;firestore&#x2F;rtdb-vs-firestore</a> [3] <a href="https:&#x2F;&#x2F;firebase.google.com&#x2F;docs&#x2F;firestore&#x2F;quotas" rel="nofollow">https:&#x2F;&#x2F;firebase.google.com&#x2F;docs&#x2F;firestore&#x2F;quotas</a> [4] <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=3832877" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=3832877</a>
评论 #15395001 未加载
评论 #15393804 未加载
评论 #15393997 未加载
评论 #15394602 未加载
评论 #15393683 未加载
评论 #15394055 未加载
评论 #15398213 未加载
评论 #15395058 未加载
评论 #15398641 未加载
评论 #15395713 未加载
评论 #15394266 未加载
评论 #15395044 未加载
评论 #15394381 未加载
sagadotworldover 7 years ago
We&#x27;re one of the startups shown in the announcement (Crypto Portfolio Tracker [1] - bottom right logo). Firestore enabled us to build the first version of our app in under a week. We&#x27;ve been using the product for over two months now, and it&#x27;s given us a competitive edge in being able to develop features rapidly and not having to spend time on operations.<p>One of the things we liked about Firestore is that it takes the best practices of Realtime Database and makes them more explicit. Before, your RD database structure would look like `collection&#x2F;{id}` and `collection_sub_collection&#x2F;{id}&#x2F;{sub_id}` in order to avoid loading sub-collections in top-level queries. With Firestore, this collections pattern is now part of the API itself, and sub-collections aren&#x27;t fetched when the parent is fetched.<p>Another feature we liked is that transactions are no longer limited to a subtree of your database. Before, you would have to structure all of your transactional data under a single path. This would sometimes lead to having to pile-in unrelated data into a single object, such as adding payment data under a users object instead of a separate collection, so that you could atomically modify both user and payment data. With Firestore, transactions are global, so this isn&#x27;t a concern anymore - we are free to structure our data in any way that makes sense for our app.<p>Overall, we had a great experience with Firestore during the alpha, and we&#x27;ll definitely be keeping it as part of our technology stack. Congrats on the launch!<p>(disclaimer: this post isn&#x27;t sponsored by Firebase)<p>[1] <a href="https:&#x2F;&#x2F;cryptoportfoliotracker.com" rel="nofollow">https:&#x2F;&#x2F;cryptoportfoliotracker.com</a>
评论 #15396786 未加载
stefanoover 7 years ago
I don&#x27;t like this trend of creating new closed source database systems that only exist on a single cloud provider.<p>Your data is your most valuable asset, and by using this you&#x27;re locking it inside Google servers. If they decide five years from now to discontinue it, or to raise the pricing 10x, you&#x27;re screwed.<p>Are most developers only working on short term projects? Why would you put yourself in such a situation instead of using open source technologies that can be deployed anywhere?
评论 #15395057 未加载
评论 #15395163 未加载
评论 #15395780 未加载
评论 #15398270 未加载
nkwover 7 years ago
This is great. I had a feeling something like this was coming given most firebase people were pretty open about what the shortcomings of the Realtime DB were and AngularFire received some much needed attention to its database API last week.<p>That said, I really hope there are plans for some full text search ability beyond the current suggestions[1]. I would very much like to ditch Elasticsearch in favor of db engine provided search. Even a small subset of the Elasticsearch&#x2F;Solr feature set (similar to the full text search capability now available for Postgres[2]) would be a very welcome addition.<p>[1] <a href="https:&#x2F;&#x2F;firebase.google.com&#x2F;docs&#x2F;firestore&#x2F;solutions&#x2F;search" rel="nofollow">https:&#x2F;&#x2F;firebase.google.com&#x2F;docs&#x2F;firestore&#x2F;solutions&#x2F;search</a> [2] <a href="https:&#x2F;&#x2F;www.postgresql.org&#x2F;docs&#x2F;9.5&#x2F;static&#x2F;textsearch.html" rel="nofollow">https:&#x2F;&#x2F;www.postgresql.org&#x2F;docs&#x2F;9.5&#x2F;static&#x2F;textsearch.html</a>
评论 #15395633 未加载
评论 #15398633 未加载
pritambarhateover 7 years ago
Does any of you feel cheated by Google? Rather than improving the existing product and providing backward compatibility, Google has chosen to build a new product with its own proprietary API.<p>I have a client who has invested significant amount time and money in Firebase Realtime Database. Now with this move, I am not sure if Google will support Firebase Realtime Database for next 5 years. So a full rewrite might be needed.<p>Once more it seems that going Cloud Native on one of Google&#x27;s proprietary tools is very risky. I know many of the readers will say that Firebase Real-time Database is still supported. But the main question is: will it stay supported for years to come?<p>Google please please make an announcement and make a commitment to keep Firebase Realtime Database alive for &quot;X&quot; years to come. Otherwise, you are just making us developers lose faith in you.
评论 #15395343 未加载
评论 #15396096 未加载
评论 #15395078 未加载
评论 #15396010 未加载
tannhaeuserover 7 years ago
&gt; <i>Document Database for Apps</i><p>From linked page:<p>&gt; <i>designed to easily store and sync app data</i><p>Maybe I&#x27;m misunderstanding, but that&#x27;s not what I understand a &quot;document&quot; to be.<p>For me a document<p>- is a file that can be stored on a file system<p>- can be send via mail<p>- is using a standard document representation so can be used by different applications, such as markup (XML, HTML, SGML), or maybe PDF
评论 #15393630 未加载
评论 #15393749 未加载
deepsunover 7 years ago
Sounds interesting, but is there any independent description of what it cannot do, or what would be hard to do?<p>I just noticed it&#x27;s much easier to understand a new datastore by reading its limitations (usually carefully omitted from pr articles or documentation).<p>For example, I suspect that Firestore must be built on top of Spanner infrastructure, as it&#x27;s the only way to get usable cross-datacenter many-row transactions. And Spanner&#x27;s limitation is it&#x27;s high price. And if it&#x27;s not Spanner, but more like Cloud Datastore or the old Megastore, then there should be limitations on transactions.<p>Sounds amazing anyway, more datastorage choices is always better for the world.
评论 #15394305 未加载
评论 #15394742 未加载
jczover 7 years ago
The firestore security rules dsl [1] looks like it could become cumbersome as the number of edge cases increases. I&#x27;ve briefly used firebase realtime database json rules [2] in a side project, and while basic acl scenarios can be covered cleanly, rules quickly tangle without a full programming language. It&#x27;s hard to check syntax, lint, test, and collaboratively edit.<p>I believe this custom auth layer is best handled by allowing code with restricted api access and time constraints. The technical approach cloudflare used to implement its edge workers by embedding v8&#x2F;js [3] would be perfect here.<p>[1] <a href="https:&#x2F;&#x2F;firebase.google.com&#x2F;docs&#x2F;firestore&#x2F;security&#x2F;get-started" rel="nofollow">https:&#x2F;&#x2F;firebase.google.com&#x2F;docs&#x2F;firestore&#x2F;security&#x2F;get-star...</a><p><pre><code> example: service cloud.firestore { match &#x2F;databases&#x2F;{database}&#x2F;documents { match &#x2F;{document=**} { allow read, write: if false; } } } </code></pre> [2] <a href="https:&#x2F;&#x2F;firebase.google.com&#x2F;docs&#x2F;database&#x2F;security&#x2F;" rel="nofollow">https:&#x2F;&#x2F;firebase.google.com&#x2F;docs&#x2F;database&#x2F;security&#x2F;</a><p>[3] <a href="https:&#x2F;&#x2F;blog.cloudflare.com&#x2F;introducing-cloudflare-workers&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blog.cloudflare.com&#x2F;introducing-cloudflare-workers&#x2F;</a>
评论 #15395936 未加载
hmexxover 7 years ago
I’m still looking for a product that provides firebase-levels of ease of getting up and running (no API to design, rule-based authentication, etc) , but runs on your own infrastructure, off of a traditional RDBMS.<p>Someone tell me they’ve found the holy grail?!
评论 #15395350 未加载
评论 #15394981 未加载
评论 #15396562 未加载
评论 #15395034 未加载
评论 #15395399 未加载
评论 #15394472 未加载
评论 #15394740 未加载
评论 #15394071 未加载
HammadBover 7 years ago
This is amazing! I just spent yesterday writing a separate app engine service to use cloud datastore even though the rest of our stuff is on Firebase (RTDB wasn&#x27;t a fit for us). Great to see this is out
adamonkeyover 7 years ago
How is the pricing? Firebase Realtime Database is fairly expensive ($5&#x2F;GB of storage per month), so it makes economic sense for developers to migrate to their own backend once they hit a certain scale. This is why third-party mobile backends are nowhere near the popularity of non-mobile backends with Google Cloud &#x2F; AWS.<p>Do you think $0.18 per 100000 writes solves this problem?
评论 #15394228 未加载
fiokodenover 7 years ago
Just <i>never</i> use Google for building applications.<p>They have invested heavily over the lifetime of the company in avoiding providing support. That reputation can never be revived.<p>Google does not have direct customer support in its DNA, it has the opposite, whatever that is.<p>They have not demonstrated relentless commitment to being available to resolve issues, and <i>nothing</i> matters more than this if you&#x27;ve bet your company on their platform.<p>If something goes really wrong. Amazon has your back and you&#x27;ll find someone who&#x27;ll listen who has the power to resolve it. Google, you&#x27;re stuffed. If you&#x27;ve built you&#x27;re business around that thing that went wrong, well time for regret.
评论 #15400270 未加载
polskibusover 7 years ago
A couple of questions:<p>What&#x27;s the underlying synchronisation mechanism?<p>Is it based on CRDTs?<p>How does this product differ from Gun.js and realm.io?
评论 #15396250 未加载
评论 #15394781 未加载
评论 #15394892 未加载
fictionfutureover 7 years ago
Looks great, however, I still have hopes that something similar to a GraphQL interface for a SQL based database is coming.<p>NoSQL is cool, but ultimately GraphQL&#x2F;Apollo serves many of the same issues but has the capability of a much richer, standardized and potentially lower cost backend.
评论 #15394862 未加载
ralusekover 7 years ago
Couple of questions. For the querying:<p><a href="https:&#x2F;&#x2F;firebase.google.com&#x2F;docs&#x2F;firestore&#x2F;query-data&#x2F;queries" rel="nofollow">https:&#x2F;&#x2F;firebase.google.com&#x2F;docs&#x2F;firestore&#x2F;query-data&#x2F;querie...</a><p>It seems as though there is just the capability for AND logic between the WHERE queries, is that correct. Is the any plans to add AND&#x2F;OR and perhaps a concept for representing grouping like parentheses?<p>And for the data structures:<p><a href="https:&#x2F;&#x2F;firebase.google.com&#x2F;docs&#x2F;firestore&#x2F;manage-data&#x2F;structure-data" rel="nofollow">https:&#x2F;&#x2F;firebase.google.com&#x2F;docs&#x2F;firestore&#x2F;manage-data&#x2F;struc...</a><p>Is there any capability to perform joins or have the data populated at query time?<p>And for the last thing:<p>It is mentioned multiple times in the documentation that nested collections will not be deleted if the parent is deleted. I&#x27;m just curious why there isn&#x27;t the capability to insert a document with options that would allow something like a cascade delete. Since you allow indexes on collections, there is obviously some sort of metadata maintained, why not just add an additional flag that could be set so that whenever a record is deleted it can optionally have its subcollections removed as well?
jgmmoover 7 years ago
How is this different than using datastore?
评论 #15393745 未加载
评论 #15393728 未加载
tnoletover 7 years ago
I&#x27;m sorry if I overlooked, but no aggregations? Like calculating sums or averages?
评论 #15397108 未加载
dotmanishover 7 years ago
What happens to &quot;Backups&quot; with Firestore? (Firestore console doesn&#x27;t have a Backups tab)
评论 #15394145 未加载
niftichover 7 years ago
Grats! Can you talk a bit about your consistency model?
评论 #15393849 未加载
jinjin2over 7 years ago
The offline database experience still looks really primitive compared to Realm, and all the documentation seems to purposefully avoid any details with regards to conflict resolution. Are there any plans to address this?
ben75011over 7 years ago
Having a consistent relational db background, I always feel a bit lost about the patterns provided to associate models in no-sql land. Firebase db was &#x27;weird&#x27; when it came to associations, don&#x27;t see that much changes here. The feature is available, but... Fire store provide 3 ways to do so, but why ? Going through the docs the results&#x2F;benefits for each patterns remains unclear, the way to query each of those is not really understandable reading the docs. is this state will remains or is it a field that is potentially to be improved in the next releases ?
评论 #15399117 未加载
plexicleover 7 years ago
Very excited to see a Go SDK for it, too! Can I use it for real-time as well?
评论 #15394450 未加载
willchenover 7 years ago
Looks very exciting! I&#x27;ve used firebase for some small weekend projects and it&#x27;s been very productive for me.<p>I&#x27;m curious, what&#x27;s the react native support like for Firestore &#x2F; firebase in general?
评论 #15393867 未加载
评论 #15393791 未加载
us0rover 7 years ago
So read through the docs, decided to give the free tier a go and of course they are punishing me for being an existing customer.<p>&quot;The Blaze billing plan (pay-as-you-go) for Firebase is required for Google projects with billing enabled.<p>To use the free tier, you must first turn off billing in your Google project.&quot;<p>I don&#x27;t want 15 &quot;projects&quot;. I want to add this to my existing one. Why on earth is this not possible?
drumttocs8over 7 years ago
Should I really be so excited for built-in query support in 2017? For a mature product supported by a dominant tech company? Because I am.
ristonover 7 years ago
I do like the new solution more than the Realtime Database, but I see only this solution to fit smaller scale. Applications with heavy write could get really expensive. Also, the standard plan has only &quot;Maximum write rate to a document 1 per second&quot;. The write is currently three times expensive operation as read hopefully, this would be lowered in future.
unitbooleanover 7 years ago
Cosmos DB from Microsoft Azure seems to be a much better choose, because it provides tons of useful features, but it also compatible with MongoDB, so if they decide to increase prices or shut it down some day, you will be able to use regular MongoDB instead. With Firestore it&#x27;s not the case and you are locked with a proprietary solution.
troikaover 7 years ago
Great update, congratulations. It sounds similar to <a href="https:&#x2F;&#x2F;deepstream.io" rel="nofollow">https:&#x2F;&#x2F;deepstream.io</a> records - small JSON documents that are stored and synced in realtime across clients and can be arranged in lists and reference each other.
kkotakover 7 years ago
I just hope your Firestore Status Dashboard is going to look very differerent than your Realtime DB one. I mean - much less yellow and red dots.
vira28over 7 years ago
Can this be used with the old firebase sdk? Upgrading looks like pain
jadboxover 7 years ago
Hmm, is there react-native support?
评论 #15410074 未加载
projectpubliusover 7 years ago
Will GeoFire remain solely on RTDB?
评论 #15394434 未加载
bikamonkiover 7 years ago
What&#x27;s the difference with Firebase RTDB?
评论 #15394601 未加载
评论 #15394582 未加载
alexnewmanover 7 years ago
Why anyone still uses firebase when there&#x27;s trivial to get running OSS ways of getting this done I&#x27;ll never understand. People think stuff like this makes time to development smaller, I say it increases it deceptively
评论 #15399711 未加载
p2t2pover 7 years ago
Another cool Google tech which will SUDDENLY go extinct when you need it most and which will ignore all of you support requests if it doesn&#x27;t work properly and which will block you from all of you stuff in Google&#x27;s system if you break smallest shady statement line in the TOS. Do you really want to base your business on top of Google&#x27;s stuff? Come on, even MS is more trustworthy than modern Google.