Using google appengine
Upcoming SlideShare
Loading in...5
×
 

Using google appengine

on

  • 1,557 views

 

Statistics

Views

Total Views
1,557
Views on SlideShare
1,557
Embed Views
0

Actions

Likes
1
Downloads
6
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Using google appengine Using google appengine Presentation Transcript

    • 使用GoogleAppEngine做个人信 息中心 weibo.com/sagasw twitter.com/sagasw
    • 个人信息服务聚合● Twitter 客户端● RSS 聚合● 获取网页 (urlfetch)● Cron Jobs● 个人笔记● 好玩的玩具● 了解云计算 (自己订制用的越多,花钱越多)
    • Google AppEngine 编程语言 Go language, Python, Java (JRuby, Lua, Rails etc.) 免费限额对于个人日常使用,已经足够 常用及有用的特点 ○   UrlFetch, Memcache, XMPP, Mail, TaskSchedule, Cron ○   OAuth, Google 账号绑定   ○   Image 处理 ○   MapReduce, Channel, High Replication Datastore ○   Custom domain ○   容易使用,容易管理,数据 统计信息强大 ○   容易扩展,可以抵抗 缺点: 没有全文搜索, 新的价格调整, 需要熟悉新的 SQL方式, Python2.5, 不能使用C扩展
    • 使用DjangoThe App Engine Python environment includes theseversions of Django: 1.2, 1.1, 1.0, and 0.96Tornadohttps://github.com/facebook/tornado/tree/master/demos/appenginehttp://www.tornadoweb.org/documentation/wsgi.html?highlight=appengine
    • 用于AppEngine的Python库BeautifulSoupPython-TwitterPython-Readability... ...什么样的Python扩展可以用于AppEngine? ● 没有用到 C-Extensions的,  ● 没有用到关系型数据库,  ● 不需要访问本地资源的,Search http://pypi.python.org/pypi
    • Lua in AppengineWith Javas helphttp://code.google.com/p/aelua/http://code.google.com/p/jillcode/http://code.google.com/p/kahlua/https://github.com/krka/kahlua2http://sourceforge.net/projects/luaj/
    • from google.appengine.ext import webappfrom google.appengine.ext.webapp.util import run_wsgi_appapplication = webapp.WSGIApplication([(/, MainPage),                                      (/newentry, NewEntry),                                      (/editentry, EditEntry),                                      (/deleteentry, DeleteEntry),                                     ],                                     debug=True)def main():    run_wsgi_app(application)if __name__ == __main__:    main()
    • def administrator(method): class HomeHandler(BaseHandler):     def get(self):         entries = db.Query(Entry).order(-published).fetch(limit=5)         if not entries:             if not self.current_user:                 self.redirect("/compose")                 return         self.render("home.html", entries=entries) ... ... ... ...  application = tornado.wsgi.WSGIApplication([     (r"/", HomeHandler),     (r"/archive", ArchiveHandler),import re     (r"/feed", FeedHandler),import tornado.web ], **settings)import tornado.wsgiimport wsgiref.handlers def main():from google.appengine.api import users     wsgiref.handlers.CGIHandler().run(application)from google.appengine.ext import db if __name__ == "__main__":class Entry(db.Model):     main()    author = db.UserProperty()    title = db.StringProperty(required=True)    html = db.TextProperty(required=True)    published = db.DateTimeProperty(auto_now_add=True)    updated = db.DateTimeProperty(auto_now=True) https://raw.github.com/facebook/tornado/master/demos/appengine/blog. py
    • Using AppEngine in Enterprise Dev? ● 现在还不合适,推荐Amazon EC2 ● 作为前端,可以很容易扩展 ● 作为练习平台 ● 使用于特定的部分的任务http://code.google.com/appengine/business/App Engine for Business is no more, but dont worry. Almost all the features youwanted in App Engine for Business will now be available to all App Enginedevelopers in an upcoming release. This includes: ● SSL for custom domains ● Support ● Hosted SQL ● Service-level Agreement
    • http://www.google.com/events/io/2011/sandbox.html    Wiki, CMS, MicroBlogging, GameServer, AppServer,Wedding, Ask-Answer, EBook, SNS Server, OnlineShop, Workflowcan NOT    Video, Audio, big files hosting, High computing, High CPU usage,image hosting
    • Google AppEngine 价格和用量继续微调 http://www.guao.hk/posts/google-app- engine-price-changes.html
    • 延后调价时间到11月1日,让开发者有更多时间针对新价格体系调整自己应用;  增加免费实例时间,从24小时增加到28小时,即便应用有一些突发请求,也有可能在免费区间里Livid: 可以有更多时间优化或是为搬走写新代码。个人对Python 的喜欢和深入研究的决心没有动摇。动摇的是对GAE的信心,这次决定是完全违背常识的。如打算学 Python webdevelopment,可从Flask,webapp2或Tornado上手。keakon: 如果只是学习,GAE免费配额还能维持一个1000PV以下站点。等超过1000时,该学的也都学会了。
    •   ● 尽量多使用memcache ● Appengine(免费)+ VPS(每月5美金左右) ● 数据库访问通过webservice访问VPS上DB,对数据进行cache ● 搜索功能使用google或者VPS自建 ● 使用VPS上的Nginx建立AppEngine反向代理,访问Appengine  find VPS seller, coupon             http://www.lowendbox.com/   how to install Nginx in VPS             http://www.howtoforge.com/ 
    • Useful linkshttp://code.google.com/appengine/http://googleappengine.blogspot.com/http://www.v2ex.com/go/gaehttp://www.neopythonic.blogspot.com/http://blog.notdot.net/http://www.billkatz.com/http://www.franciscosouza.com/tag/google-app-engine/http://code.google.com/hosting/search?q=appengine&btn=Search+projectshttps://github.com/search?q=AppEnginehttp://en.wikipedia.org/wiki/Google_App_Enginehttp://highscalability.com/google-architecturehttps://groups.google.com/forum/#!forum/google-appenginehttp://www.reddit.com/r/AppEngine/
    • Interesting projectshttp://code.google.com/p/googleappengine/http://code.google.com/p/appscale/ (Setup your private GAE)http://code.google.com/p/app-engine-site-creator/http://code.google.com/p/google-app-engine-samples/http://code.google.com/p/fantasm/https://github.com/metachris/feedmailerhttps://github.com/crabasa/Twitter2Mailhttp://code.google.com/p/jaikuengine/http://code.google.com/p/appengine-mapreduce/http://code.google.com/p/gae-bbs/http://code.google.com/p/rietveld/http://code.google.com/p/tipfy/http://code.google.com/p/kay-framework/https://github.com/xuming/micologhttps://github.com/livid/pickyhttps://github.com/livid/v2exhttps://github.com/seven1m/sinatra-appengine-examplemirrorrr-plus
    • Cloud Computing Joke
    • Q & A ??