Google Firestore Google Cloud Datastore 的子集或超集?
Google Firestore a subset or superset of Google Cloud Datastore?
Google 宣布 Firestore,块上的新文档数据存储。
我使用 Google Cloud Datastore 开发应用程序已有六个月多了,在阅读 blog 之后,我觉得 Firestore 似乎是更好的选择。
备用集合-文档-子集合的概念对我来说非常棒,因为在为数据存储设计架构时我知道我将无法查询嵌套字段。现在有了 firestore 子集合,我获得了完整的查询功能,这对我来说是一个游戏规则的改变者(我可以用最少的查询获得最大的数据)。
作为反驳,flowchart 建议我使用数据存储,因为我没有任何移动客户端。
像使用 Datastore 一样使用 Firestore 是个好主意吗?
(我会方便地忽略移动 client/realtime updates/syncing 功能!)
更新 2 (01/31/19)
截至今天,Cloud Firestore 已不再处于 Beta 阶段,现已全面推出:
https://cloud.google.com/blog/products/databases/announcing-cloud-firestore-general-availability-and-updates
这意味着 Cloud Datastore 不再是 新 项目的选项(您可以在现有项目中继续使用它)。想要使用 Datastore API 的新项目可以在 Datastore 模式下使用 Cloud Firestore。
更新 1
正如您所注意到的,自发布此问题以来,我们已经扩展了 Cloud Firestore。
这意味着 Cloud Firestore 现在有 2 种模式:
- 最初的发布是 'Native mode'
- 新推出增加'Datastore mode'
'Datastore mode' 是第三代 Cloud Datastore。第一个称为 Master/Slave Datastore,第二个是 High-Replication Datastore (HRD),它在 2013 年更名为 Cloud Datastore。
下面的答案在很大程度上仍然是相关的,因为这两种模式目前是相互排斥的,所以你需要选择一个。
主要区别在于 Cloud Firestore 在 Datastore 模式下相对于 Cloud Datastore 的改进。最大的是:
- 每个实体组的写入吞吐量现在不受限制(原为 1 write/second)
- 交易不再局限于 25 个实体组
- 所有查询现在都高度一致。
另请注意,无论模式如何,Cloud Firestore 都是测试版,因此新 Service-Level Agreement (SLA) doesn't go into effect until the product reaches General Availability (GA)。
原答案
Cloud Datastore (CD) 和 Cloud Firestore (CF) 相似,但在重要方面有所不同。
CF 以移动设备为中心,具有直接来自移动客户端的功能以及 Firebase SDK 和规则功能。 CD 以服务器为中心,具有范围更广的服务器客户端库,以及捆绑在内存缓存功能中的 App Engine 标准上的一些成熟框架。
CF 有一个较新的存储层,它与 Cloud Spanner 具有相同的强一致性,但是,它仍处于测试阶段,没有 SLA。 CD 的存储层仅在实体组内强一致,最终跨实体组一致,但是,对于多区域位置,它是具有 99.95% SLA 的 GA。
CF 目前仅在美国多区域可用。 CD 在包括美洲、欧洲、亚洲和澳大利亚等十几个地方的云中可用。
Beta 期间的 CF 有 2500 writes/second 的准则限制,而我们在 GA 之前积累了监控和调整系统的经验,而 CD 将很乐意处理 >1M writes/second(请联系您的不过先是客户代表)。
CF 和 CD 的一组查询功能有重叠但不相同。总体而言,CD 具有我们尚未在 CF 中构建的更广泛的查询功能集,因此您在 CD 中具有更大的灵活性。
总的来说,我会考虑这个列表,看看是否有任何差异会影响或破坏您尝试构建的内容,然后选择最符合您需求的数据库。
我认为 cloud firestore 也有 nodejs 客户端,它不以移动为中心。实际上,这就是以移动为中心的 Firebase 实时数据库与以任何为中心的 Cloud Firestore 之间的区别。
我会说 Datastore 现在是 Firestore 的一个子集:
Cloud Firestore is the next major version of Cloud Datastore and a re-branding of the product.
See Choosing between Cloud Firestore and Cloud Datastore
Cloud Firestore 可以在 "Datastore mode" 中运行,使其向后兼容 Cloud Datastore。在 Cloud Firestore 正式发布一段时间后,Google 将开始联系现有 Cloud Datastore 数据库的所有者,以安排自动升级到 Cloud Firestore 的 Datastore 模式。 See auto upgrade
Firestore 是第三代架构,是 Datastore 的替代品,主要有两种模式:本机模式和 Datastore 模式。
- 有关选择的文档:https://cloud.google.com/datastore/docs/firestore-or-datastore
- 视频概览:https://www.youtube.com/watch?v=SYG-BgXoJFQ
Firestore is the new version of Datastore and removes several
Datastore limitations.
Google 宣布 Firestore,块上的新文档数据存储。
我使用 Google Cloud Datastore 开发应用程序已有六个月多了,在阅读 blog 之后,我觉得 Firestore 似乎是更好的选择。
备用集合-文档-子集合的概念对我来说非常棒,因为在为数据存储设计架构时我知道我将无法查询嵌套字段。现在有了 firestore 子集合,我获得了完整的查询功能,这对我来说是一个游戏规则的改变者(我可以用最少的查询获得最大的数据)。
作为反驳,flowchart 建议我使用数据存储,因为我没有任何移动客户端。
像使用 Datastore 一样使用 Firestore 是个好主意吗? (我会方便地忽略移动 client/realtime updates/syncing 功能!)
更新 2 (01/31/19)
截至今天,Cloud Firestore 已不再处于 Beta 阶段,现已全面推出: https://cloud.google.com/blog/products/databases/announcing-cloud-firestore-general-availability-and-updates
这意味着 Cloud Datastore 不再是 新 项目的选项(您可以在现有项目中继续使用它)。想要使用 Datastore API 的新项目可以在 Datastore 模式下使用 Cloud Firestore。
更新 1
正如您所注意到的,自发布此问题以来,我们已经扩展了 Cloud Firestore。
这意味着 Cloud Firestore 现在有 2 种模式:
- 最初的发布是 'Native mode'
- 新推出增加'Datastore mode'
'Datastore mode' 是第三代 Cloud Datastore。第一个称为 Master/Slave Datastore,第二个是 High-Replication Datastore (HRD),它在 2013 年更名为 Cloud Datastore。
下面的答案在很大程度上仍然是相关的,因为这两种模式目前是相互排斥的,所以你需要选择一个。
主要区别在于 Cloud Firestore 在 Datastore 模式下相对于 Cloud Datastore 的改进。最大的是:
- 每个实体组的写入吞吐量现在不受限制(原为 1 write/second)
- 交易不再局限于 25 个实体组
- 所有查询现在都高度一致。
另请注意,无论模式如何,Cloud Firestore 都是测试版,因此新 Service-Level Agreement (SLA) doesn't go into effect until the product reaches General Availability (GA)。
原答案
Cloud Datastore (CD) 和 Cloud Firestore (CF) 相似,但在重要方面有所不同。
CF 以移动设备为中心,具有直接来自移动客户端的功能以及 Firebase SDK 和规则功能。 CD 以服务器为中心,具有范围更广的服务器客户端库,以及捆绑在内存缓存功能中的 App Engine 标准上的一些成熟框架。
CF 有一个较新的存储层,它与 Cloud Spanner 具有相同的强一致性,但是,它仍处于测试阶段,没有 SLA。 CD 的存储层仅在实体组内强一致,最终跨实体组一致,但是,对于多区域位置,它是具有 99.95% SLA 的 GA。
CF 目前仅在美国多区域可用。 CD 在包括美洲、欧洲、亚洲和澳大利亚等十几个地方的云中可用。
Beta 期间的 CF 有 2500 writes/second 的准则限制,而我们在 GA 之前积累了监控和调整系统的经验,而 CD 将很乐意处理 >1M writes/second(请联系您的不过先是客户代表)。
CF 和 CD 的一组查询功能有重叠但不相同。总体而言,CD 具有我们尚未在 CF 中构建的更广泛的查询功能集,因此您在 CD 中具有更大的灵活性。
总的来说,我会考虑这个列表,看看是否有任何差异会影响或破坏您尝试构建的内容,然后选择最符合您需求的数据库。
我认为 cloud firestore 也有 nodejs 客户端,它不以移动为中心。实际上,这就是以移动为中心的 Firebase 实时数据库与以任何为中心的 Cloud Firestore 之间的区别。
我会说 Datastore 现在是 Firestore 的一个子集:
Cloud Firestore is the next major version of Cloud Datastore and a re-branding of the product. See Choosing between Cloud Firestore and Cloud Datastore
Cloud Firestore 可以在 "Datastore mode" 中运行,使其向后兼容 Cloud Datastore。在 Cloud Firestore 正式发布一段时间后,Google 将开始联系现有 Cloud Datastore 数据库的所有者,以安排自动升级到 Cloud Firestore 的 Datastore 模式。 See auto upgrade
Firestore 是第三代架构,是 Datastore 的替代品,主要有两种模式:本机模式和 Datastore 模式。
- 有关选择的文档:https://cloud.google.com/datastore/docs/firestore-or-datastore
- 视频概览:https://www.youtube.com/watch?v=SYG-BgXoJFQ
Firestore is the new version of Datastore and removes several Datastore limitations.