问题
Google provides two cloud based data storage services Google Cloud Datastore and Firebase (after its acquisition). While typical usage scenarios are provided to enable a developer to make selection between various services provided by the Google cloud platform, there is no mention of how Firebase fits into the picture in its current / future development.
Can anybody picture some insight on the matter and provide typical use cases for Google Cloud Datastore vs Firebase?
回答1:
Google has already made a guide for that
https://cloud.google.com/storage-options/
回答2:
Both products have their strengths and weaknesses. Here are some reasons to use one or the other:
Use Firebase if you want:
- A database without your own backend: The Firebase SDKs allow you to write mobile and web apps without running your own backend. You can read from and write to the Firebase Database directly from your app, no server code required. The database security model allows fine grained access control without a server based on your users.
- Realtime data: Firebase allows you to listen to changes on your data, which makes writing certain kind of apps very easy. One great example is the collaborative text editor.
- A simple data model: The Firebase Database stores JSON. If you know JSON, you know the Firebase data model.
- To benefit from other Firebase features: For example, Firebase provides user management & authentication that works great with the database.
Use Datastore if you want:
- Near infinite scalability: Datastore is known to scale to massive amounts of data
- More powerful queries: Datastore queries are more powerful than what you can do with Firebase.
回答3:
firebase could be said specifically for mobile platform. Google cloud was an enterprise solution.
Firebase has developed its sdks keeping Android, IOS, Web and Unity(game engine) in mind. You don't need the web-server to interact with its components. Its sdks are sufficient to do that. So no cost of web-server or application servers. It has realtime database, you can listen on and it is ridiculously fast.
It has cloud messaging service, authentication, Lambda functions and mass storage (like any other cloud). Its documentation is very succint. So you don't need to go through 1000s of pages to understand any typical cloud service like AWS or Google Cloud. It took me a month to integrate my game with AWS but it took my just a week to integrate with firebase.
回答4:
Update October 2017 (Firebase released Cloud Firestore):
It should be noted that with the recent release of Cloud Firestore (Beta as of Oct 2017), the advantages of Datastore over "Firebase" that johnydee mentioned are now obsolete if you use the Firestore product, as it has powerful queries and is highly scalable.
These products (Datastore and Firestore) share common roots and only one can actually be used on the same project.
Johny's answer still applies if you compare the Firebase Realtime Database to Datastore.
回答5:
The question is automatically addressed in the latest release of Firebase launched in Google IO 2016, in which they have brought large scale integration between Firebase and Google Cloud Platform.
Please see https://firebase.googleblog.com/2016/05/firebase-expands-to-become-unified-app-platform.html
All the Google Cloud Platform services are now accessible is much simpler way through Firebase. The Firebase way of accessing Realtime Database has been extended to Google Cloud Storage as well. Many of the Google Cloud client side APIs like Google Cloud Messaging have moved to the Firebase brand.
Firebase is clearly the Google intended way forward for the client side access to the Google Cloud Services infrastructure.
来源:https://stackoverflow.com/questions/37178919/google-cloud-datastore-vs-firebase