[英]Google Cloud Bigtable vs Google Cloud Datastore
What is the difference between Google Cloud Bigtable and Google Cloud Datastore / App Engine datastore, and what are the main practical advantages/disadvantages? Google Cloud Bigtable和 Google Cloud Datastore / App Engine datastore 有什么区别,主要的实际优势/劣势是什么? AFAIK Cloud Datastore is build on top of Bigtable.
AFAIK Cloud Datastore 建立在 Bigtable 之上。
Based on experience with Datastore and reading the Bigtable docs , the main differences are:根据使用 Datastore 和阅读 Bigtable文档的经验,主要区别是:
Cloud Bigtable is designed for larger companies and enterprises who often have larger data needs with complex backend workloads. Cloud Bigtable 专为大型公司和企业而设计,这些公司和企业通常有更大的数据需求和复杂的后端工作负载。
Bigtable and Datastore are extremely different. Bigtable 和 Datastore 非常不同。 Yes, the datastore is build on top of Bigtable, but that does not make it anything like it.
是的,数据存储是建立在 Bigtable 之上的,但这并没有让它变得如此。 That is kind of like saying a car is build on top of wheels, and so a car is not much different from wheels.
这有点像说汽车是建立在轮子上的,所以汽车与轮子没有太大区别。
Bigtable and Datastore provide very different data models and very different semantics in how the data is changed. Bigtable 和 Datastore 提供了非常不同的数据模型和数据更改方式的非常不同的语义。
The main difference is that the Datastore provides SQL-database-like ACID transactions on subsets of the data known as entity groups (though the query language GQL is much more restrictive than SQL).主要区别在于数据存储区在称为实体组的数据子集上提供类似于 SQL 数据库的 ACID 事务(尽管查询语言 GQL 比 SQL 限制性强得多)。 Bigtable is strictly NoSQL and comes with much weaker guarantees.
Bigtable 是严格的 NoSQL 并且带有更弱的保证。
I am going to try to summarize all the answers above plus what is given in Coursea Google Cloud Platform Big Data and Machine Learning Fundamentals我将尝试总结上述所有答案以及 Coursea Google Cloud Platform Big Data and Machine Learning Fundamentals 中给出的内容
+---------------------+------------------------------------------------------------------+------------------------------------------+--+
| Category | BigTable | Datastore | |
+---------------------+------------------------------------------------------------------+------------------------------------------+--+
| Technology | Based on HBase(uses HBase API) | Uses BigTable itself | |
| ---------------- | | | |
| Access Mataphor | Key/Value (column-families) like Hbase | Persistent hashmap | |
| ---------------- | | | |
| Read | Scan Rows | Filter Objects on property | |
| ---------------- | | | |
| Write | Put Row | Put Object | |
| ---------------- | | | |
| Update Granularity | can't update row ( you should write a new row, can't update one) | can update attribute | |
| ---------------- | | | |
| Capacity | Petabytes | Terbytes | |
| ---------------- | | | |
| Index | Index key only (you should properly design the key) | You can index any property of the object | |
| Usage and use cases | High throughput, scalable flatten data | Structured data for Google App Engine | |
+---------------------+------------------------------------------------------------------+------------------------------------------+--+
This might be another set of key differences between Google Cloud Bigtable and Google Cloud Datastore along with other services.
这可能是 Google Cloud Bigtable 和 Google Cloud Datastore 以及其他服务之间的另一组主要区别。 The contents shown in the image below can also help you in selecting the right service.
下图中显示的内容也可以帮助您选择正确的服务。
A relatively minor point to consider, as of November 2016, bigtable python client library is still in Alpha, which means the future change might not be backward compatible.需要考虑的相对较小的一点是,截至 2016 年 11 月,bigtable python 客户端库仍处于 Alpha 阶段,这意味着未来的更改可能无法向后兼容。 Also, bigtable python library is not compatible with App Engine's standard environment.
此外,bigtable python 库与 App Engine 的标准环境不兼容。 You have to use the flexible one.
你必须使用灵活的。
Datastore is more application ready and suitable for a wide range of services, especially for microservices. Datastore 更适合应用程序,适用于广泛的服务,尤其是微服务。
The underlying technology of Datastore is Big Table, so you can imagine Big Table is more powerfuly. Datastore的底层技术是Big Table,可以想象Big Table的功能更强大。
Datastore come with 20K free operation per days, you can expect to host a server with reliable DB with ZERO cost. Datastore 每天免费运行 20K,您可以期望以零成本托管具有可靠数据库的服务器。
You can also check out this Datastore ORM library, it comes with a lot of great feature https://www.npmjs.com/package/ts-datastore-orm你也可以查看这个 Datastore ORM 库,它有很多很棒的功能https://www.npmjs.com/package/ts-datastore-orm
Cloud Datastore is a highly-scalable NoSQL database for your applications.
Like Cloud Bigtable, there is no need for you to provision database instances.
Cloud Datastore uses a distributed architecture to automatically manage
scaling. Your queries scale with the size of your result set, not the size of your
data set.
Cloud Datastore runs in Google data centers, which use redundancy to
minimize impact from points of failure. Your application can still use Cloud
Datastore when the service receives a planned upgrade.
Choose Bigtable if the data is:
Big
● Large quantities (>1 TB) of semi-structured or structured data
Fast
● Data is high throughput or rapidly changing
NoSQL
● Transactions, strong relational semantics not required
And especially if it is:
Time series
● Data is time-series or has natural semantic ordering
Big data
● You run asynchronous batch or real-time processing on the data
Machine learning
● You run machine learning algorithms on the data
Bigtable is designed to handle massive workloads at consistent low latency
and high throughput, so it's a great choice for both operational and analytical
applications, including IoT, user analytics, and financial data analysis.
I just found this useful analogy buried in the length page about eventual consistency in the Datastore documentation (emphasis mine): 我刚刚在长度页面中找到了这个有用的类比, 关于数据存储文档中的最终一致性 (强调我的):
One practice is to combine Cloud Datastore and BigQuery to fulfill different business requirements.
一种做法是结合使用Cloud Datastore和BigQuery来满足不同的业务需求。 Use Cloud Datastore for online transactional processing (OLTP) required for core application logic and use BigQuery for online analytical processing (OLAP) for backend operations.
使用Cloud Datastore进行核心应用程序逻辑所需的联机事务处理(OLTP),并将BigQuery用于后端操作的联机分析处理(OLAP)。 It may be necessary to implement a continuous data export flow from Cloud Datastore to BigQuery to move the data necessary for those queries.
可能需要实施从Cloud Datastore到BigQuery的连续数据导出流,以移动这些查询所需的数据。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.