在Google AppEngine做Session 本身并不是一个复杂的问题,可以基于Memcached API来做,也可以基于DataStore来做,为何让我郁闷?
先看看DataStore 这低下的性能,一般读取也要100ms cpu时间,如果有些写入可能大于200ms cpu时间,这个是以前用python做程序测试的,Java的还没有试过。如果以后访问量大了,有准备付费的打算就惨了。
我们再来看看Memcached吧:
引用
Memcache may be useful for other temporary values. However, when considering whether to store a value solely in the memcache and not backed by other persistent storage, be sure that your application behaves acceptably when the value is suddenly not available. Values can expire from the memcache at any time, and may be expired prior to the expiration deadline set for the value. For example, if the sudden absence of a user's session data would cause the session to malfunction, that data should probably be stored in the datastore in addition to the memcache.
Memcached来存储Session 也是在不放心,当然如果你的网站没有用户机制、状态倒是不用关心这个问题。
没办法在网站应用中可以采用Memcached + DataStore配合的方式,Memcached的数据定时存储至DataStore,这种做法有一定的适用性,但是还是可能造成Session数据丢失或者错误的问题,只是几率大大降低了,而且又能提高不少性能,不过这样做还是有些变扭。
分享到:
相关推荐
google app engine 的帮助文档 不过是英文版的 是我自己根据google官方文档用软件生成的chm版 有时候会出现“internet 脚本错误” 哪位高手可以修改以下让他不要出现 那就太感谢了
基于Google App Engine(GAE)的Java和GWT应用开发_Google App Engine Java and GWT Application Development Nov.2010
clock.rar 这是我今天做的一个基于google app engine写的一个在该平台上开发app的示例,通过该示例的学习,我们可以很快上手学会怎样在GAE上开发属于你的应用程序了,希望对大家有用!
GAE(Google App Engine)空间 GAE(Google App Engine)空间申请使用教程及 GAE域名捆绑方法使用教程及 GAE域 GAE(Google App Engine)空间申请使用教程及 GAE域名捆绑方法捆绑方法
Eclipse Google 插件 Google App Engine SDK for Java Google App Engine文档 按钮 Google App Engine 开发包
云应用开发——Google App Engine & Google Web Toolkit入门指南 Google App Engine入门 Google App Engine 开发人员指南
Google云端的一个重要部分,主要介绍了Google中App Engine的限制。
Google App Engine is a key component of the Google Cloud Platform and one of the most comprehensive cloud services. Together with Python, the first programming language ever supported by the platform,...
Using Google App Engine
google app engine开发实例,实现了GAE的插入,更改,删除,搜索功能
google_appengine_1.9.10 for linux 发布于2014-08-28 To install on Linux: Unzip the App Engine SDK file you downloaded (google_appengine_1.9.10.zip), for example: unzip google_appengine_1.9.10.zip ...
一个应该在Google App Engine 上的一个实例。用Java语言编写,里面包含源代码。致以Google App Engine是什么,请Google。 实例部署的地址是:http://hellojavaweb.appspot.com
菜鸟用GAE(Google_App_Engine)完全指南,网络穿越配置指南
GAE Google App Engine 数据库部分
在google.appengine.ext.remote_api里面,我们看到这个离线访问GAE数据的这个API,这就意味着,定时任务之类的离线应用将可以在本地完成,如果你自己有一台服务器,那么在这台服务器上运行GAE的离线任务,将成为可能...
The App Engine SDK for Java includes a local development server as well as the tooling for deploying and managing your applications in App Engine. By downloading, you agree to be bound by the Terms ...
中文名: 基于Google App Engine(GAE)的Java和GWT应用开发 原名: Google App Engine Java and GWT Application Development 作者: Daniel Guermeur, Amy Unruh 资源格式: PDF 版本: 文字版 出版社: Packt ...
Google App Engine Docs,Google App Engine开发人员指南(Java版),简体中文离线文档,起始页为主目录下的appengine\docs\docs.html
Google App Engine 是一种让您可以在 Google 的基础架构上运行您的网络应用程序。Google App Engine 应用程序易于构建和维护,并可根据您的访问量和数据存储需要的增长轻松扩展。使用 Google App Engine,将不再需要...
这是第一本介绍如何在Google App Engine上开发的书籍.