Google Cloud Bigtable和Google Cloud Datastore / App Engine数据存储区有什么区别,主要的实际优点/缺点是什么?AFAIK Cloud Datastore建立在Bigtable之上。
Google Cloud Bigtable和Google Cloud Datastore / App Engine数据存储区有什么区别,主要的实际优点/缺点是什么?AFAIK Cloud Datastore建立在Bigtable之上。
Answers:
根据Datastore的经验并阅读Bigtable 文档,主要区别在于:
Cloud Bigtable是为大型公司和企业设计的,这些公司和企业通常需要更大的数据需求以及复杂的后端工作负载。
Bigtable和Datastore极为不同。是的,数据存储区建立在Bigtable之上,但这并没有使它变得像它那样。这就好比说汽车是建立在车轮的顶部,所以汽车与车轮没有太大区别。
Bigtable和Datastore在如何更改数据方面提供了截然不同的数据模型和语义。
主要区别在于,数据存储区在称为实体组的数据子集上提供类似于SQL数据库的ACID事务(尽管查询语言GQL比SQL更具限制性)。Bigtable严格来说是NoSQL,但提供的保证要弱得多。
我将尝试总结以上所有答案以及Coursea Google Cloud Platform大数据和机器学习基础知识中给出的内容
+---------------------+------------------------------------------------------------------+------------------------------------------+--+
| 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 | |
+---------------------+------------------------------------------------------------------+------------------------------------------+--+
考虑到一个相对较小的问题,截至2016年11月,bigtable python客户端库仍在Alpha中,这意味着将来的更改可能不再向后兼容。此外,bigtable python库与App Engine的标准环境不兼容。您必须使用灵活的一种。
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.
数据存储区更适合应用程序使用,适用于各种服务,尤其是微服务。
数据存储区的基础技术是Big Table,因此您可以想象Big Table更强大。
数据存储区每天可免费提供2万次操作,您可以期望托管一台具有可靠数据库且成本为零的服务器。
您还可以签出此Datastore ORM库,它具有许多出色的功能 https://www.npmjs.com/package/ts-datastore-orm