简体   繁体   English

在Google Appengine中的版本/后端之间共享会话

[英]Share sessions between versions/backends in google appengine

I have a fairly big application hosted on appengine. 我在appengine上托管了一个相当大的应用程序。 It has various components and each component is done by a different group in the company. 它具有各种组件,每个组件由公司中的不同小组完成。

I am looking to break down the application into various submodules each hosted separately as a version. 我希望将应用程序分解为各个子模块,每个子模块分别作为一个版本托管。 eg: module1.mainapp.com. 例如:module1.mainapp.com。

Since Google uses a db for sharing sessions and the db is shared among the versions and backends, is there a way to share sessions? 由于Google使用db共享会话,并且该db在版本和后端之间共享,是否可以共享会话? Currently, it looks like each session is different. 当前,似乎每个会话都不同。

I understand that we can put <SessionCookie domain="example.com"/> in web.xml in normal applications but I am not sure if AppEngine honors this. 我了解我们可以在普通应用程序中将<SessionCookie domain="example.com"/>放在web.xml中,但是我不确定AppEngine是否支持。

Thanks. 谢谢。

This isn't possible, because cookies are set by the user system, and the cookies are per domain. 这是不可能的,因为cookie是由用户系统设置的,并且cookie是每个域的。

In any case, I wouldn't recommend this approach - modifying your URL scheme to suit your app's internal organization is a nasty hack; 无论如何,我都不推荐这种方法-修改URL方案以适合应用程序的内部组织是一个讨厌的黑客; the URL scheme you present to your users needn't have any direct relationship with how you handle requests. 您提供给用户的URL方案与您处理请求的方式没有任何直接关系。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM