<<上篇 | 首页 | 下篇>>

Google云计算GAE开发的一个IT技术推荐应用

IT Technology Network是用Google App Engine - Google Code google的云计算服务开发的一个网站。

 

 

      这算是Google App Engine的试用应用吧,渐渐地才发现云计算不是一个概念,而中国的云计算可能还落后很多,而这个又像马云说的那样,云计算可能蕴藏颠覆性力量。“我最怕的是老酒装新瓶的东西,你看不清他在玩什么,突然爆发出来最可怕。假如从来没有听说的,这个不可怕。雅虎当年做搜索引擎,然后Google出来了,雅虎很多人认为跟我们也差不多,后来几乎把他们搞死。”

 

标签 : , , ,

Google App Engine性能调优 - 页面性能优化

GAE提供了简单实用的API和开发工具,结合已有的开发框架,Java开发人员可以很容易开发出自己的业务应用系统。

本次先介绍页面部分的性能优化技巧,只需要进行简单的设置和少量的编码,即可获得不错的性能提高。后续的文章

文中提到的技巧已经在本博客取得验证,从后来的统计数据中可以看到,首页的处理时间从平均400ms减少到了平均26ms,性能提高了15倍!

阅读全文……

标签 : , ,

Google App Engine for Java数据备份下载

It is possible to use python tool bulkloader.py to create datastore backup of GAE Java app.

You just have to set up remote_api by adding following lines to web.xml:

<?xml version="1.0" encoding="utf-8"?>
<web-app>
 
<!-- Add this to your web.xml to enable remote API on Java. -->
 
<servlet>
   
<servlet-name>remoteapi</servlet-name>
   
<servlet-class>
com.google.apphosting.utils.remoteapi.RemoteApiServlet
</servlet-class>
 
</servlet>
 
<servlet-mapping>
   
<servlet-name>remoteapi</servlet-name>
   
<url-pattern>/remote_api</url-pattern>
 
</servlet-mapping>
 
<security-constraint>
   
<web-resource-collection>
     
<web-resource-name>remoteapi</web-resource-name>
     
<url-pattern>/remote_api</url-pattern>
   
</web-resource-collection>
   
<auth-constraint>
     
<role-name>admin</role-name>
   
</auth-constraint>
 
</security-constraint>
</web-app>

After that you can use bulkloader.py with --dump to download backup

and with --restore to upload backup to datastore.

You can also use the --kind=... argument to download all entities of a specific kind:

bulkloader.py --dump --app_id=<app-id> --kind=<kind> --url=http://<appname>.appspot.com/remote_api --filename=<data-filename>

You can download and upload every entity of a kind in a format suitable for backup and restore, all without writing any additional code or configuration. To download all entities of all kinds, run the folowing command:

bulkloader.py --dump --app_id=<app-id> --url=http://<appname>.appspot.com/remote_api --filename=<data-filename>

Downloading Data from App Engine

To start a data download, run appcfg.py download_data with the appropriate arguments:

appcfg.py download_data --config_file=album_loader.py --filename=album_data_archive.csv --kind=Album <app-directory>

If you are using a Google Apps domain name and need appcfg.py to sign in using an account on that domain, you must specify the --auth_domain=... option, whose value is your domain name.

If the transfer is interrupted, you can resume the transfer from where it left off using the --db_filename=... and --result_db_filename=... arguments. These arguments are the names of the progress file and the results file created by the tool, which are either names you provided with the arguments when you started the transfer, or default names that include a timestamp. This assumes you have sqlite3 installed, and did not disable progress files with --db_filename=skip.

标签 : , ,