144

Google Cloud Bigtable和 Google Cloud Datastore / App Engine 数据存储有什么区别,主要的实际优势/劣势是什么?AFAIK Cloud Datastore 建立在 Bigtable 之上。

4

9 回答 9

106

根据使用 Datastore 和阅读 Bigtable文档的经验,主要区别在于:

  • Bigtable 最初是为 HBase 兼容性而设计的,但现在有多种语言的客户端库。Datastore 最初更适合 Python/Java/Go 网络应用程序开发人员(最初是 App Engine)
  • Bigtable 比 Datastore 更“多一点 IaaS”,因为它不是“就在那里”,而是需要配置一个集群。
  • Bigtable 仅支持一个索引 - “行键”(Datastore 中的实体键)
    • 这意味着查询在 Key 上,这与 Datastore 的索引属性不同
  • Bigtable 仅在单行上支持原子性 - 没有事务
  • 突变和删除在 Bigtable 中似乎不是原子的,而 Datastore 提供最终的强一致性,具体取决于读取/查询方法
  • 计费模式非常不同:
    • 读/写操作、存储和带宽的数据存储费用
    • Bigtable对“节点”、存储和带宽收费
于 2015-05-06T20:05:09.327 回答
105

Bigtable 针对大量数据和分析进行了优化

  • Cloud Bigtable不会跨专区或区域复制数据(单个集群内的数据是复制且持久的),这意味着 Bigtable 更快、更高效,成本也更低,尽管它的持久性较低且在默认配置中可用
  • 它使用HBase API - 没有锁定或学习新范式的风险
  • 它与开源大数据工具集成,这意味着您可以在客户使用的大多数分析工具(Hadoop、Spark 等)中分析存储在 Bigtable 中的数据。
  • Bigtable 由单个 Row Key 索引
  • Bigtable 位于单个区域中

Cloud Bigtable 专为大型公司和企业而设计,这些公司和企业通常需要更大的数据和复杂的后端工作负载。

数据存储区经过优化,可为应用程序提供高价值的交易数据

  • Cloud Datastore通过复制和数据同步具有极高的可用性
  • 数据存储,由于其多功能性和高可用性,更昂贵
  • 由于同步复制,Datastore 写入数据较慢
  • 数据存储在事务和查询方面具有更好的功能(因为存在二级索引)
于 2015-05-06T23:24:01.443 回答
19

Bigtable 和 Datastore 截然不同。是的,数据存储是建立在 Bigtable 之上的,但这并不像它。这有点像说汽车是建立在车轮之上的,所以汽车与车轮没有太大区别。

Bigtable 和 Datastore 提供了非常不同的数据模型和非常不同的数据更改语义。

主要区别在于,Datastore 在称为实体组的数据子集上提供类似于 SQL 数据库的 ACID 事务(尽管查询语言 GQL 比 SQL 限制性更强)。Bigtable 是严格意义上的 NoSQL,并带有更弱的保证。

于 2015-05-06T20:30:57.180 回答
15

我将尝试总结以上所有答案以及 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    |  |
+---------------------+------------------------------------------------------------------+------------------------------------------+--+

也检查此图像:在此处输入图像描述

在此处输入图像描述

于 2019-03-04T20:08:56.833 回答
8

如果你阅读论文,BigTable 就是这个,Datastore 就是MegaStore。数据存储是 BigTable 加上复制、事务和索引。(而且要贵得多)。

于 2017-05-12T21:13:09.783 回答
7

这可能是 Google Cloud Bigtable 和 Google Cloud Datastore 以及其他服务之间的另一组关键区别。下图中显示的内容也可以帮助您选择合适的服务。

在此处输入图像描述

在此处输入图像描述

于 2020-04-05T10:36:28.007 回答
2

需要考虑的一个相对较小的点是,截至 2016 年 11 月,bigtable python 客户端仍处于 Alpha 阶段,这意味着未来的更改可能无法向后兼容。此外,bigtable python 库与 App Engine 的标准环境不兼容。你必须使用灵活的。

于 2016-11-16T07:27:33.140 回答
2

在此处输入图像描述

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.
于 2020-04-01T08:14:15.643 回答
1

数据存储更适合应用程序,适用于广泛的服务,尤其是微服务。

Datastore的底层技术是Big Table,可以想象Big Table更强大。

数据存储每天可免费运行 20K,您可以期望以零成本托管具有可靠数据库的服务器。

您还可以查看这个 Datastore ORM 库,它具有很多很棒的功能 https://www.npmjs.com/package/ts-datastore-orm

于 2020-02-29T02:16:47.553 回答