GAE 1.4 随想
zihua
2013-09-28 23:09:40
点击: 1056
|
收藏
Gae 1.4 变化:
- The Always On feature allows applications to pay and keep 3 instances of their application always running, which can significantly reduce application latency.
- Developers can now enable Warmup Requests. By specifying a handler in an app’s appengine-web.xml, App Engine will attempt to to send a Warmup Request to initialize new instances before a user interacts with it. This can reduce the latency an end-user sees for initializing your application.
- The Channel API is now available for all users.
- Task Queue has been officially released, and is no longer an experimental feature. The API import paths that use ‘labs’ have been deprecated. Task queue storage will count towards an application’s overall storage quota, and will thus be charged for.
- The deadline for Task Queue and Cron requests has been raised to 10 minutes. Datastore and API deadlines within those requests remain unchanged.
- For the Task Queue, developers can specify task retry-parameters in their queue.xml.
- Metadata Queries on the datastore for datastore kinds, namespaces, and entity properties are available.
- URL Fetch allowed response size has been increased, up to 32 MB. Request size is still limited to 1 MB.
- The Admin Console Blacklist page lists the top blacklist rejected visitors.
- The automatic image thumbnailing service supports arbitrary crop sizes up to 1600px.
- Overall average instance latency in the Admin Console is now a weighted average over QPS per instance.
- Added a low-level AysncDatastoreService for making calls to the datastore asynchronously.
- Added a getBodyAsBytes() method to QueueStateInfo.TaskStateInfo, this returns the body of the task state as a pure byte-string.
- The whitelist has been updated to include all classes from javax.xml.soap.
-
Fixed an issue sending email to multiple recipients.
其中,最感兴趣的数 Channel API的公布 和 Task Query API 的升级。
前者可以解决一直以来的GAE Server push问题,后者则基本可以构建一个可用的任务发布系统(以前的任务请求时间30秒结束,没有办法能做太多的事情)
对于我们的项目,可以将原来的轮询改为Channel API的实现,但是在阅读了Channel API之后,有了新的问题:
Channel API 是基于JavaScript 类似于 WebSocket的实现 我们的项目是GWT + GAE的架构,类似于一个DynamicDataBase的系统,必须有一个途径让我们的GWT类型与JSON之间透明转换,GWT 已经有了类似的解决办法:
JSONObject json=(JSONObject) JSONParser.parse(filterParam.getCriteria());
- filterForm.getItem(name).setValue(Boolean.valueOf(((JSONString)json.get(name)).stringValue()));
但是还没有找到一个动态解决的办法……
Task Query
需要通过定义 queue.xml ,如果动态增加我们的任务呢?这也是一个问题?
原文链接:http://herist.iteye.com/blog/852716