http://pythoughts.com/facebook-apps-with-google-app-engine
不過要每個環節都不出錯,才能一次ok,我認為還是需要相當的經驗
關於各版本的演進、優缺點等,可以參考以下這個網站
http://blog.wahahajk.com/search/label/Google%20App%20Engine?max-results=5
相當於ms sql的bulk insert,在一開始要倒資料時相當有用的
http://code.google.com/intl/zh-TW/appengine/docs/python/tools/uploadingdata.html
處理中文時有些地方要注意,同時可以將命令寫成批次檔
http://roy2006tw.blogspot.com/2010/10/google-app.html
有用過RoR的話,GAEO是一個類似的工具,利用scaffold來產生骨架
http://blog.kengao.tw/2008/12/project-google-app-engine_22.html
若您要開發伺服器在啟動之前刪除其資料存放區,請於啟動伺服器時,使用 --clear_datastore 選項:
dev_appserver.py --clear_datastore helloworld/
可參考原文 http://code.google.com/intl/zh-TW/appengine/docs/python/gettingstarted/usingdatastore.html
否則的話會花很久時間,刪一筆要一秒(!!),其中根據我在本機上的測試,all()不需要花時間,fetch()花了0.8秒,delete()花了0.2秒
http://efreedom.com/Question/1-3129391/Google-App-Engine-Devserver-Hideously-Slow
選擇性刪除時,請參考 http://stackoverflow.com/questions/4448123/do-a-mass-db-delete-on-app-engine-without-eating-cpu
真的要大量刪除時,要用cursor
http://stackoverflow.com/questions/3034327/google-app-engine-delete-until-count-0
q = Location.all(keys_only=True)
results = q.fetch(500)
while results:
db.delete(results)
q = Location.all(keys_only=True).with_cursor(q.cursor())
results = q.fetch(500)
沒有留言:
張貼留言