- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
根据 Google 的文档,似乎我有两个主要选项可以使用 Python 连接到 Datastore:App Engine 的 NDB Datastore 库和适用于 Python 的 Google Cloud Datastore API。
我目前使用的是 App Engine(标准版),但我想构建我的应用程序,使其在需要时可以超越标准,可能是通过迁移到 Compute Engine。考虑到这一点,我应该使用哪个库? App Engine 的文档指出可以使用 NDB,但似乎不再积极开发它了。在撰写本文时,最后一次提交是在 6 个多月前,尽管看起来它们之前可能是 planning some expansion .一切最终都会改用 Google Cloud Datastore API 吗?如果 NDB 被淘汰,我真的不想对它产生依赖。
我还没有尝试过,但似乎在 App Engine 中使用完整的 Google Cloud Datastore API may come with its own issues .
如果有人有在 App Engine - 标准版上使用 Google Cloud Datastore API 的经验,我很乐意听取您的想法。
编辑 - 2016-11-30 - 唯一性
此问题被标记为类似于 this one .虽然有一些相似之处,但我特别提到希望选择一种能够在 App Engine 之外轻松增长的解决方案。在这一点上,我假设 NDB 库只适用于 App Engine,所以如果我超越 App Engine,它就不会工作。但是,我认识到在 App Engine 上使用 NDB 可能仍然有优势,然后如果我超出范围,则切换到 Cloud Datastore API。我提出的一些相关的、更具体的问题包括:
谢谢。
最佳答案
阅读更多内容后,我将继续回答我自己的问题,希望对其他人有所帮助。
看完discussion on google-cloud-python总而言之,我的许多问题都可以得到一定程度的回答。
首先,开发人员对该项目的意见似乎是Google Cloud Datastore API should work on App Engine , 但性能将是 worse than NDB .这当然是在 App Engine 上使用 NDB 而不是 Datastore API 的原因。
其次,听起来开发人员认为 NDB 既复杂又相当成熟,并且似乎一致支持 its eventual inclusion in the Cloud Datastore python library .因此,NDB 似乎不太可能停产。最有可能的是,它最终可能只需要包含在更广泛的 gcloud 库集中。
第三,开发者表示 NDB support beyond App Engine is being actively developed ,所以如果我的项目超出了 App Engine,NDB 到那时可能已经在更多环境中可用,因此不需要切换到 Cloud Datastore API。此外,超越标准 App Engine 的下一步是灵活环境,which seems to already support NDB nicely .
所有这一切都表明我应该清楚地继续推进 NDB,受益于它在 App Engine 上更好的性能和 ORM 功能,除非 Google 对此事的意见/方向在未来发生变化,否则我很可能会在 Google Cloud 上的其他环境中继续使用 NDB 的选项。我打算使用 NDB 并期待它最终包含在 google-cloud-python 中。
如果有人对此事有任何其他经验,我很想听听您的想法。
关于google-app-engine - App Engine 上 Cloud Datastore 的客户端库 - NDB 或 google-cloud-datastore,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40872410/
我有一个 Cloud Run 服务,它通过 SQLAlchemy 访问 Cloud SQL 实例.但是,在 Cloud Run 的日志中,我看到 CloudSQL connection failed.
关闭。这个问题是opinion-based .它目前不接受答案。 想改善这个问题吗?更新问题,以便可以通过 editing this post 用事实和引文回答问题. 4年前关闭。 Improve t
在将 docker 容器镜像部署到 Cloud Run 时,我可以选择一个区域,这很好。 Cloud Run 将构建委托(delegate)给 Cloud Build,后者显然会创建两个存储桶来实现这
我正在尝试将 Cloud Functions 用作由 PubSub 触发的异步后台工作程序,并进行更长时间的工作(以分钟为单位)。完整代码在这里https://github.com/zdenulo/c
这是/etc/cloud/cloud.cfg的内容Ubuntu云16.04镜像: # The top level settings are used as module # and system co
如何从 Google Cloud Function 启动 Cloud Dataflow 作业?我想使用 Google Cloud Functions 作为启用跨服务组合的机制。 最佳答案 我已经包含了
我想使用 Cloud Shell 在我的第二代 Cloud Sql 实例上运行数据库迁移。 我找到了一个 example in the docs关于如何使用 gcloud 进行连接.但是当我运行命令时
我正在尝试使用 Google Cloud PubSub和我的 Google Cloud Dataproc群集,我收到如下身份验证范围错误: { "code" : 403, "errors" :
这是我的用例。 我已经有一个以私有(private)模式部署的 Cloud Run 服务。 (与云功能相同的问题) 我正在开发使用此 Cloud Run 的新服务。我在应用程序中使用默认凭据进行身份验
如何连接到 Cloud SQL 上的数据库,而无需在容器中添加我的凭据文件? 最佳答案 使用 UNIX 域套接字 (Java) 从云运行(完全托管)连接到云 SQL At this time Clou
我有一个google-cloud-ml作业,需要从gs存储桶加载numpy .npz文件。我遵循了this example上关于如何从gs加载.npy文件的操作,但是由于.npz文件已压缩,因此它对我
我想创建链接到另一个项目中的 Cloud Source Repository 的 Cloud Build 触发器。但是当我在应该选择存储库的步骤中时,列表是空的。我尝试了不同的许可,但没有运气。谁能告
向 Twilio 发送 SMS 时,Twilio 会向指定的 URL 发送多个请求,以通过 Webhook 提供该 SMS 传送的状态。我想让这个回调异步,所以我开发了一个 Cloud Functio
我需要更改我的项目 ID,因为要验证的 Firebase 身份验证链接在链接上显示了项目 ID,并且由于品牌 reshape ,项目名称已更改。根据我发现的信息,更改项目 ID 似乎不太可能。我正在考
用于部署我的 Angular 应用程序的 CI/CD 管道已关闭,但我看到 Google Cloud Run 在容器镜像更新后没有部署新修订版。 我已将 Cloud Build 设置为在 GitHub
报价https://cloud.google.com/load-balancing/docs/https/setting-up-https-serverless#enabling While Goog
Cloud Spanner 提供了两种不同的 API。 Cloud Spanner 读取与 Cloud Spanner SQL API 之间有什么区别? 最佳答案 在幕后,它们都使用相同的执行机制,因
我是 GCP 堆栈的新手,所以我对用于存储数据的 GCP 技术数量感到非常困惑: https://cloud.google.com/products/storage 虽然上面的文章中没有提到googl
我发现 Google Cloud Functions 的网络出站费用令人惊讶,我正在尝试了解发生这种情况的原因以及如何避免这种情况。 Stackdriver 监控表明有问题的函数是我的 ingest
我使用 Prisma使用 Cloud Run 和 Cloud SQL。在向 prisma.schema 提供 DATABASE_URL 后,它会在运行时抛出一个错误。 Can't reach data
我是一名优秀的程序员,十分优秀!