gpt4 book ai didi

python - 我想了解 Google NDB 数据存储 key

转载 作者:太空宇宙 更新时间:2023-11-03 16:43:51 24 4
gpt4 key购买 nike

我是 GAE 新手。我开始研究 NDB 数据存储服务。但它的父键结构确实让我困惑。我还在 YouTube 上观看了一些教程,但他们只是解释了其文档。

我也遵循了文档,但我仍然不清楚。这是我探索过的链接。

Google App Engine NDB Data Store Service

最佳答案

NDB 数据存储是一个分布式系统。一般来说,绝对的数据一致性对于分布式系统来说是非常困难的。默认情况下,NDB 是最终一致的。这意味着默认情况下:

  • 如果您添加一条记录,它可能不会立即出现在查询中
  • 默认情况下,您无法跨多个记录进行事务

如果您有更严格的要求,您可以通过为实体组提供相同的父键并在查询中指定它来定义实体组。然后,您就能够在这些群体中获得一致的行为。

通常最好根本不使用父 key ,因为它们会带来严重的性能损失。大多数时候应用程序不需要父 key 。

引自Entities, Properties, and Keys

There is a write throughput limit of about one transaction per second within a single entity group. This limitation exists because Datastore performs masterless, synchronous replication of each entity group over a wide geographic area to provide high reliability and fault tolerance.

关于python - 我想了解 Google NDB 数据存储 key ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36528513/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com