使用多个GAE应用版本获取多个应用以共享相同数据存储的任何问题? [英] Any issues using multiple GAE app versions to get multiple apps to share the same datastore?

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

问题描述

根据我所做的研究(例如,请参阅此gae问题这个堆栈溢出问题),所以无法在两个应用程序之间共享一个数据存储区,而大多数人推荐使用RemoteAPI或使用同一应用程序的多个版本,其中每个版本实际上是完全不同的应用程序。根据 GoogleAppEngine Issue 1300 ,允许分享多个GAE应用程序相同的数据存储已被接受,这大概意味着该功能可能在某一天被正式支持。

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

David

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

解决方案

这与服务条款没有任何问题 - 但是您可能无法为仅使用免费配额的多个应用程序提供全天候服务。



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



另外,管理控制台权限不能区分不同的版本。



最后,是一些只适用于默认版本的调度程序功能(可能是实例控制?);我不是正确的人回答。


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.

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?

David

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.

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天全站免登陆