使用多个 GAE 应用程序版本来让多个应用程序共享同一个数据存储有任何问题吗? [英] Any issues using multiple GAE app versions to get multiple apps to share the same datastore?

查看:11
本文介绍了使用多个 GAE 应用程序版本来让多个应用程序共享同一个数据存储有任何问题吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据我所做的研究(参见例如 这个 gae 问题这个堆栈溢出问题),不可能在两个应用程序之间共享一个数据存储,大多数人建议使用 RemoteAPI 或使用同一应用程序的多个版本",其中每个版本实际上是一个完全不同的应用程序.根据 GoogleAppEngine Issue 1300,允许多个 GAE 应用程序共享相同的数据存储已被接受",这大概意味着该功能可能有一天会得到正式支持.

According to the research I've done (see for example this gae issue and this stack overflow question), it is not possible to share one datastore across two applications, and most folks recommend using either the RemoteAPI or using multiple "versions" of the same application, where each version is really an entirely different application. According to GoogleAppEngine Issue 1300, allowing multiple GAE applications to share the same datastore has been "accepted" which presumably means that this feature may be officially supported some day.

我对使用 RemoteAPI 犹豫不决,因为我怀疑在我的应用程序中响应时间至关重要的部分会对我造成性能损失.所以我想知道是否有人使用过在同一个应用程序 ID 下使用多个版本来共享同一个数据存储的方法?如果是这样,您能否评论一下您是否发现这种方法有任何问题?这大概不会违反 GAE 许可条款,该条款通常禁止多个不同的应用程序像一个应用程序一样运行?

I'm hesitant to use the RemoteAPI because I suspect there will be a performance penalty for me in the part of my app where response time is critical. So I'm wondering if anyone has used the approach of using multiple versions under the same application ID to share the same datastore? If so, would you be able to comment on whether you have found any problems with this approach? Presumably this does not violate the GAE license terms that generally prohibit multiple distinct applications from behaving like one application?

大卫

更新:我尝试了这种方法,并有一些关于这种方法的可能问题要报告.在我的本地 GAE 实例(端口 8080 和 8081)上将我的两个应用程序部署为同一应用程序的两个版本时,在我停止/启动它之前,另一个应用程序并不总是看到我对一个应用程序所做的更新.我在 appspot.com 上没有看到这种行为.我认为这里更广泛的问题是我假设高复制数据存储具有与传统 SQL 数据库类似的事务属性.正在发生的事情是,在一个应用程序提交更改和其他应用程序可以读取更改之间似乎存在显着延迟.想知道是否有一种方法可以有效地刷新"您的更改,或者清除某处的缓存,以便让一个应用程序所做的提交显示在另一个应用程序所做的查询中.或者,也许我在错误的兔子洞里吠叫......

Update: I gave this approach a try and have some possible issues to report about this approach. When deploying my two applications as two versions of the same app on my local GAE instance (on ports 8080 and 8081), updates I make with one application are not always seen by the other application until I Stop/Start it. I do not see this behavior on appspot.com. I think the broader issue here is that I was assuming that the high replication data store had similar transactional properties as a traditional SQL database. What's happening is that there seems to be a significant delay between when changes are committed by one application, and when they're available to be read by the other application. Wondering if there's a way to effectively "flush" your changes, or clear a cache somewhere in order to get commits made by one app to show up in queries made by the other. Or maybe I'm barking down the wrong rabbit hole...

推荐答案

为此使用多个版本是一个很好的方法,并且服务条款没有问题——但是您可能无法提供仅使用免费配额为多个应用提供全天候服务.

Using multiple versions for this is a fine way to do this, and there is no problem with the terms of service -- however you may not be able to provide round-the-clock service for multiple apps using only the free quota.

请注意,这意味着您在更新应用程序时必须格外小心使用正确的版本,并且您不能轻松地同时将版本用于其他目的,因为版本现在是用户使用的 URL 的一部分访问应用程序.

Do note that this means that you have to be extra careful about using the correct version when updating an app, and you can't easily use versions for other purposes simultaneously, since the version is now part of the URL that users use to access an app.

此外,不同版本之间无法区分管理控制台权限.

Also, admin console permissions cannot be differentiated between different versions.

最后,可能有一些调度器特性(可能是实例控制?)只适用于默认版本;我不是回答这个问题的合适人选.

Finally, there may be some scheduler features (maybe instance control?) that only apply to the default version; I'm not the right person to answer that.

这篇关于使用多个 GAE 应用程序版本来让多个应用程序共享同一个数据存储有任何问题吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆