SlideShare a Scribd company logo
使用 GoogleAppEngine
 建立个人信息中心


              weibo.com/sagasw
                       2011-11
Agenda

  1 )云计算那些事儿
   
  2 ) Google AppEngine
   
  3 ) GAE 个人信息中心

  4 ) Resources
调查

1 ) Python 语言?
 
2 ) Google AppEngine ?
 
3 )云计算平台?
1 )云计算那些事儿

     
• IaaS (Infrastructure as a Service)  
   o  Amazon EC2 , Microsoft Azure

• PaaS (Platform as a Service) 
   o  GoogleAppEngine ,新浪 AppEngine , HeroKu

• SaaS (Software as a Service)
   o Zoho , Google Apps ,易度 
云平台比较




http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-28.pdf
调查 - 虚拟化软件
调查 - 公有云计算平台
 

     新浪微博 @_ 浪潮之巅 _ :

     中国很多大公司 ( 主要是央企 ) ,对云计算理解就是 IDC
    和设备。
     美国的 case 都是应用。美国这点认识比较一致:
    IDC 和最基础的东西让 Google , Facebook 和 Amazon 去
    做。 



    http://weibo.com/2142166543/xtKu40qgP
使用GoogleAppEngine建立个人信息中心
http://addons.heroku.com/
2 ) Google AppEngine

          
Google AppEngine
Go language, Python, Java (JRuby, Lua, Rails
etc.)
 
优点:
   o     UrlFetch,Memcache,TaskSchedule
   o     XMPP,Mail,Cron
   o     MapReduce,Channel
   o     支持 OAuth 认证或 Google 账号
   o     Image 处理
   o     域名绑定
   o     易使用,易管理
   o     免费限额大方
 缺点 : 
   o     无全文搜索
   o     调整后的付费方案
   o     需要熟悉新 SQL 操作方式
适用于:
Wiki,CMS, 博客 , 微博 , 手机游戏后台 ,
应用服务器 , 问答网站 , 电子书发
布 ,SNS, 网店 , 工作流

不适合:
音频视频服务 , 大文件 , 密集计算
Web Framework

  Django
  WebApp2
  Tornado
   
   


https://github.com/facebook/tornado/tree/master/demos/appengine
Python library

 BeautifulSoup, PythonTwitter, Readability
 PIL, PyCrypto, lxml 等等


 可直接用于 AppEngine?

  • 不依赖 C 扩展
  • 不使用数据库
  • 不访问本地资源
 http://pypi.python.org/pypi
Java on AppEngine

Play! Framework

    http://www.slideshare.net/gasolin/play-framework-on-google-app-engine
    https://github.com/guillaumebort/play-gae

Scala Lift Framework

    http://lift-example.appspot.com/
    http://www.scala-lang.org/node/1826

JavaScript

    http://www.appenginejs.org/
JRuby on 
Google App Engine

code.google.com/p/appengine-jruby/
github.com/jruby/jruby-rack



                    
Lua in Appengine




http://code.google.com/p/aelua/
http://code.google.com/p/jillcode/
http://code.google.com/p/kahlua/
https://github.com/krka/kahlua2
http://sourceforge.net/projects/luaj/
企业使用 ?

 • 比较容易扩展
 • 管理方便
 • 用于特定任务 
 • 更推荐 EC2
 
    http://code.google.com/appengine/business/
    http://code.google.com/appengine/docs/premier/index.html
 
  
使用GoogleAppEngine建立个人信息中心
GAE SDK 1.5.5

 • Python2.7
 • 支持多线程,可使用 threading
 • 支持并发请求
 • 可以访问 bytecode
 • 支持更多 Python lib ( PIL v1.1.7 )。
 • 前台请求的时间 30 秒增加到 60 秒, URLFetch 请求时
   间从 10 秒增加到 60 秒。
 • URLFetches 的 POST 参数大小从 1MB 增加到 5MB 。
From Keakon's blog
GAE 编程心得
•   尽量使用 memcache
•   组合 Appengine & VPS
•   通过 service 访问 VPS 数据库, GAE 进行缓存
•   使用 google 或 VPS 搜索
•   Nginx 反向代理 AppEngine (必须的)

  VPS seller and coupon
         http://www.lowendbox.com/ 
  Install Debian, Nginx in VPS
         http://www.howtoforge.com/ 
使用GoogleAppEngine建立个人信息中心
3 )使用 GAE 建立个人信息中心


         
个人常用的信息服务
 • TwitterWeb 客户端,可以同步到新浪腾讯网
   易搜狐
 • RSS 聚合阅读
 • 获取网页 (urlfetch) ,解析短网址
 • Cron Jobs
 • 在线个人笔记,在线个人博客
 • 网络小说阅读
 • 推送文章到 Kindle
 • 发送天气短信给自己
 • 生日提醒(邮件,聊天工具,短信等多种手段
   )
 • 监控 iphone 购买网页的变化
 • 相册
 • proxy
使用GoogleAppEngine建立个人信息中心
个人信息平台已经实现的功能

1 )选择现成代码进行修改( V2EX,Micolog,
GaeBBS )
2 )同步发推 , 新浪微博功能 ,t.co 扩展
3 )定期采集 RSS 功能
4 )支持 Google Reader share
5 ) HN 文章全文阅读, RSS Feed 输出
6 )网页内容变化,通过短信提醒
7 )支持 XMPP 协议( gtalk )客户端自动聊天
新浪微博 腾讯微博
    import mechanize
    br = mechanize.Browser()
    br.open("http://abcd.com/openqqsdk/qqweibopost.php")
    br.select_form(nr=0)
    strform = status.encode('utf-8')
    br.form['text'] = str
    br.submit()

    VPS 上搭建微博 PHP SDK 作中转


 
BeautifulSoap 使用

from BeautifulSoup import BeautifulSoup
VALID_TAGS = ['strong', 'em', 'p', 'ul', 'li',
'br', 'img', 'ol', 'blockquote']

def sanitize_html(value):
    soup = BeautifulSoup(value)
    for tag in soup.findAll(True):
        if tag.name not in VALID_TAGS:
            tag.hidden = True

    return soup.renderContents()
 




    https://gist.github.com/1298152
使用GoogleAppEngine建立个人信息中心
使用GoogleAppEngine建立个人信息中心
使用GoogleAppEngine建立个人信息中心
使用GoogleAppEngine建立个人信息中心
使用GoogleAppEngine建立个人信息中心
使用GoogleAppEngine建立个人信息中心
https://gist.github.com/1312657
使用GoogleAppEngine建立个人信息中心
资源使用情况(优化前)
资源使用情况(优化后)
Mobile01 洁净版
阅读功能设计全过程

 • 分析网页内容
 • 设计抓取方式
 • HTML readability
   – viewtext.org, www.instapaper.com/m?u=

 • 下载图片
 • 添加文章
使用GoogleAppEngine建立个人信息中心
使用GoogleAppEngine建立个人信息中心
使用GoogleAppEngine建立个人信息中心
使用GoogleAppEngine建立个人信息中心
使用GoogleAppEngine建立个人信息中心
使用GoogleAppEngine建立个人信息中心
4 ) Resources
其它云平台
Amazon EC2
Heroku (免费 + 付费)
Microsoft Azure
Sina AppEngine
Node AppEngine (内测中)
Yo2Lua Lua AppEngine (内测中)
Useful links
http://googleappengine.blogspot.com/
http://www.v2ex.com/go/gae
http://www.neopythonic.blogspot.com/
http://blog.notdot.net/
http://www.billkatz.com/
http://www.franciscosouza.com/tag/google-app-engine/
http://highscalability.com/google-architecture
https://groups.google.com/forum/#!forum/google-appengine
http://www.reddit.com/r/AppEngine/
可用于微创新的项目
http://code.google.com/p/appscale/
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/feedmailer
http://code.google.com/p/jaikuengine/
http://code.google.com/p/appengine-mapreduce/
http://code.google.com/p/rietveld/
https://github.com/xuming/micolog
https://github.com/livid/v2ex
http://code.google.com/p/gae-bbs/
 
    Kindlereader
      一个定时将 Google reader 发送至 kindle 的工具
    master 分支为单用户版 ( 基于 python), 运行于 Linux, Mac OSX,
    Windows
    gae 分支为运行于 Google app engine 的多用户版 , demo:
    http://reader.dogear.mobi
     

    https://github.com/jiedan/kindlereader/tree/gae
Q & A

   

More Related Content

PPT
Using google appengine_final2
PDF
IDF2013大会分享——《使用新浪移动云开发全平台应用》
PPTX
如何,高效利用搜索引擎+构建网络工具箱
PDF
MBaaS
PPTX
大鱼架构演进
PPTX
Riedy finalpres
PPTX
Tv news archive cni
DOCX
การจัดอาหารให้ลูกก่อนวัยเรียน
Using google appengine_final2
IDF2013大会分享——《使用新浪移动云开发全平台应用》
如何,高效利用搜索引擎+构建网络工具箱
MBaaS
大鱼架构演进
Riedy finalpres
Tv news archive cni
การจัดอาหารให้ลูกก่อนวัยเรียน

Viewers also liked (20)

PDF
淘宝移动端Web开发最佳实践
PDF
Driegeleding
PPT
Chapter1
PPT
Basic stat review
PPTX
The super scientist
DOCX
การจัดอาหารให้ลูกก่อนวัยเรียน
PPTX
Comm 201 Presentation
PPT
Smartech
PPTX
My favorite tv show is
PPT
UN VIAJE EN EL TIEMPO
PPTX
Obesity powerpoint
PPT
ท้องถิ่นไทย
PPTX
UCLA OR12
PPTX
Finalpowerpoint
PDF
20141229 majalah detik_161
PDF
Langdurig problematische gezinssituaties
PDF
Viergeleding
PPTX
Broadcast news archive OR12
PPTX
The Historical Development of Country Music
PDF
ระบบเครือข่ายคอมพิวเตอร์
淘宝移动端Web开发最佳实践
Driegeleding
Chapter1
Basic stat review
The super scientist
การจัดอาหารให้ลูกก่อนวัยเรียน
Comm 201 Presentation
Smartech
My favorite tv show is
UN VIAJE EN EL TIEMPO
Obesity powerpoint
ท้องถิ่นไทย
UCLA OR12
Finalpowerpoint
20141229 majalah detik_161
Langdurig problematische gezinssituaties
Viergeleding
Broadcast news archive OR12
The Historical Development of Country Music
ระบบเครือข่ายคอมพิวเตอร์
Ad

Similar to 使用GoogleAppEngine建立个人信息中心 (20)

PPT
Using google appengine (2)
PPT
Using google appengine_1027
PPT
Using google appengine_final
PPT
轻量级Flash服务器开发框架(刘恒)
PPT
新浪云计算公开课第一期:Let’s run @ sae(丛磊)
PDF
Douban qcon2009 beijing
PPT
S(P)Aas081008
PPT
[Flash开发者交流][2010.05.30]轻量级flash服务器开发框架 刘恒
PDF
美丽说的架构发展与变迁 New
PDF
Mysql HandleSocket技术在SNS Feed存储中的应用
PDF
开源社区生生不息的创新土壤
PPTX
開放原始碼 Ch2.2 app - oss - google client api & app engine(ver 1.0)
PDF
豆瓣网技术架构变迁
PDF
Python 于 webgame 的应用
PPT
2012,我的技术之选
PPT
Django敏捷开发 刘天斯
PDF
合久必分,分久必合
PPTX
分布式索引系统调研
PPT
java title
PPT
构建可扩展的微博系统
Using google appengine (2)
Using google appengine_1027
Using google appengine_final
轻量级Flash服务器开发框架(刘恒)
新浪云计算公开课第一期:Let’s run @ sae(丛磊)
Douban qcon2009 beijing
S(P)Aas081008
[Flash开发者交流][2010.05.30]轻量级flash服务器开发框架 刘恒
美丽说的架构发展与变迁 New
Mysql HandleSocket技术在SNS Feed存储中的应用
开源社区生生不息的创新土壤
開放原始碼 Ch2.2 app - oss - google client api & app engine(ver 1.0)
豆瓣网技术架构变迁
Python 于 webgame 的应用
2012,我的技术之选
Django敏捷开发 刘天斯
合久必分,分久必合
分布式索引系统调研
java title
构建可扩展的微博系统
Ad

使用GoogleAppEngine建立个人信息中心