SlideShare a Scribd company logo
1 of 66
Download to read offline
Google App Engine
                            Kosei Moriyama (cou929)
                                  Nov, 23, 2009




Wednesday, May 5, 2010
Agenda

                   • Google App Engine
                   • Getting Started
                   •


Wednesday, May 5, 2010
Google App Engine




Wednesday, May 5, 2010
Web



Wednesday, May 5, 2010
•
                         •
                         •
                   •
                         •
                         •
                   •

                   •         …




Wednesday, May 5, 2010
App Engine
                   •
                         •
                         •
                   •
                         •
                         •
                   •
                   •                      …




Wednesday, May 5, 2010
•     Python

                   •     Java

                           •      JVM



                           •      e.g., JRuby
                   •
                   •
                   •     App Engine

                           •      Google        , URL Fetch, Mail, memcache,

                   •     Cron



Wednesday, May 5, 2010
•     App Engine SDK

                          •   web

                          •   app engine



                          •   Python SDK / Java SDK
                   •     google


Wednesday, May 5, 2010
Getting Started



Wednesday, May 5, 2010
•
                         •   http://code.google.com/intl/ja/appengine/docs/python/gettingstarted/




Wednesday, May 5, 2010
•
                   •     Hello World!
                   •     Webapp

                   •     Google

                   •
                   •
                   •
                   •
                   •

Wednesday, May 5, 2010
•
                   •     Hello World!
                   •     Webapp

                   •     Google

                   •
                   •
                   •
                   •
                   •

Wednesday, May 5, 2010
•     Python

                          •     http://www.python.org/download/
                          •     2.5

                          •     3.x

                   •     Python SDK

                          •     http://code.google.com/intl/ja/appengine/
                                downloads.html
                   •     Path



Wednesday, May 5, 2010
• dev_appserver.py
                      •
                   • appcfg.py
                      • app engine


Wednesday, May 5, 2010
•
                   •     Hello World!
                   •     Webapp

                   •     Google

                   •
                   •
                   •
                   •
                   •

Wednesday, May 5, 2010
Hello World!

                   •
                         •          app.yaml

                         • python       main.py




Wednesday, May 5, 2010
app.yaml

                   •
                         • id, version, runtime ...
                   •
                         • url

Wednesday, May 5, 2010
main.py


                   • print



Wednesday, May 5, 2010
App Engine web


                   •



Wednesday, May 5, 2010
App Engine web

                   • app engine             web
                         CGI

                               request                       CGI
                                                                              app.yaml

                                          app engine                routing
                    client
                                          web server
                               response                CGI
                                                                   foo.py      bar.py    baz.py




Wednesday, May 5, 2010
•
                   •     Hello World!
                   •     Webapp

                   •     Google

                   •
                   •
                   •
                   •
                   •

Wednesday, May 5, 2010
Webapp
                   • CGI
                      ‣                     ,

                   • Python                     CGI



                         • Django, Cherry.py, Pylons, web.py
Wednesday, May 5, 2010
Webapp

                   •
                   •
                   • app engine


Wednesday, May 5, 2010
3
                   •     RequestHandler    (   )

                          •                ,

                   •     WSGIApplication

                          •                        URL



                   •     main

                          •     CGI                WSGIApplication



Wednesday, May 5, 2010
main.py
                   •     webapp, run_wsgi_app

                   •     MainPage

                           •    webapp.RequestHandler

                   •     def get(self)
                           •    GET

                   •     response.headers()
                   •     response.out.write()
                   •     webapp.WSGIApplication()
                   •     run_wsgi_app()



Wednesday, May 5, 2010
•
                   •     Hello World!
                   •     Webapp

                   •     Google

                   •
                   •
                   •
                   •
                   •

Wednesday, May 5, 2010
Google

                   •     users     import

                   •     user.get_current_user()
                           •                        user

                           •                       none

                   •     self.redirect(dest_uri)
                           •     dest_uri

                   •     users.create_login_url(dest_uri)
                           •
                           •                               , dest_uri



Wednesday, May 5, 2010
•
                   •     Hello World!
                   •     Webapp

                   •     Google

                   •
                   •
                   •
                   •
                   •

Wednesday, May 5, 2010
• def post(self)
                      • POST
                   • request.get(‘name’)
                      • “name”

Wednesday, May 5, 2010
•
                   •     Hello World!
                   •     Webapp

                   •     Google

                   •
                   •
                   •
                   •
                   •

Wednesday, May 5, 2010
•
                   •
                   •
                   • not RDBMS

Wednesday, May 5, 2010
Entity
                                          put()


                         application                    Data Store




                                       List of Entity
                                           GQL


Wednesday, May 5, 2010
Entity
                   •     Entity
                         •   db.Model

                         •          Property key

                   •     Property
                         •   db.fooProperty()

                   •     Key
                         •     entity

                         •   Data store



Wednesday, May 5, 2010
class Pet(db.Model):
                           name = db.StringProperty(required=True)
                           type = db.StringProperty(required=True, choices=set(["cat", "dog", "bird"]))
                           birthdate = db.DateProperty()
                           weight_in_pounds = db.IntegerProperty()
                           spayed_or_neutered = db.BooleanProperty()
                           owner = db.UserProperty(required=True)




Wednesday, May 5, 2010
•                                                , put()



               •
                         greeting = Greeting(author = users.get_current_user(), content =
                         self.request.get('content'))

                         greeting.put()




Wednesday, May 5, 2010
GQL
                   •     db.GqlQuery("SELECT * FROM Greeting ORDER BY date DESC LIMIT 10")

                   •     greetings Greeting

                           •            for greeting in greetings:

                   •
                           •   db.GqlQuery("SELECT * FROM Greeting ORDER BY date DESC
                               LIMIT 10")

                           •   Greeting.gql("ORDER BY date DESC LIMIT 10")

                               •   "SELECT * FROM Greeting"          (                       )




Wednesday, May 5, 2010
• Greeting.all()
                         greetings.filter("author =",
                         users.get_current_user())
                         greetings.order("-date")
               •
               •         Greeting.all().filter("author =", users.get_current_user()).order("-date")




Wednesday, May 5, 2010
•
                   •     Hello World!
                   •     Webapp

                   •     Google

                   •
                   •
                   •
                   •
                   •

Wednesday, May 5, 2010
• EZT, Cheetah, ClearSilver, Quixote, Django
                   • Django


Wednesday, May 5, 2010
• template html
                   • template import
                   • template Dictionary
                   • template.render(path, values)

Wednesday, May 5, 2010
Django template
                   •           {{ variable }}

                   •             {% foo %}

                         • {% for * %}
                         • {% if * %}
                         • {% include * %}

Wednesday, May 5, 2010
template

                   • Django template
                    • class template
                   • {% extends foo.html %}
                   • {% block bar %}

Wednesday, May 5, 2010
•
                   •     Hello World!
                   •     Webapp

                   •     Google

                   •
                   •
                   •
                   •
                   •

Wednesday, May 5, 2010
•     index.html   ,



                          •                                      ok

                   •

                          •       , css, JavaScript,   , Flash


Wednesday, May 5, 2010
app.yaml
                         - url: /stylesheets
                          static_dir: stylesheets


               •                                        /stylesheets/*
                                                , stylesheets




Wednesday, May 5, 2010
•
                   •     Hello World!
                   •     Webapp

                   •     Google

                   •
                   •
                   •
                   •
                   •

Wednesday, May 5, 2010
•
                           •   http://appengine.google.com/
                   •     app.yaml

                           •   application:                        ID

                   •
                           •   appcfg.py update helloworld/
                           •
                           •   http://application-id.appspot.com



Wednesday, May 5, 2010
Wednesday, May 5, 2010
• memcache
                   • URL Fetch
                   • Mail
                   •
                   • Cron (      )

                   •
Wednesday, May 5, 2010
• memcache
                   • URL Fetch
                   • Mail
                   •
                   • Cron (      )

                   •
Wednesday, May 5, 2010
memcach

                   •
                   • memchached
                   • key-value store


Wednesday, May 5, 2010
• memcache
                   • URL Fetch
                   • Mail
                   •
                   • Cron (      )

                   •
Wednesday, May 5, 2010
URL Fetch

                   • HTTP/HTTPS       ,


                                  /

                   • Google               ,




Wednesday, May 5, 2010
• urllib, urllib2, httplib
                      •            google

                   • app engine api


Wednesday, May 5, 2010
• memcache
                   • URL Fetch
                   • Mail
                   •
                   • Cron (      )

                   •
Wednesday, May 5, 2010
Mail


                   •



Wednesday, May 5, 2010
• memcache
                   • URL Fetch
                   • Mail
                   •
                   • Cron (      )

                   •
Wednesday, May 5, 2010
•
                         •
                         •       1

                         •
                         •
                         •   (       )




Wednesday, May 5, 2010
• memcache
                   • URL Fetch
                   • Mail
                   •
                   • Cron (      )

                   •
Wednesday, May 5, 2010
Cron


                   •
                   • cron.yaml


Wednesday, May 5, 2010
cron.yaml
                         cron:
                         - description: daily summary job
                          url: /tasks/summary
                          schedule: every 24 hours
                         - description: monday morning mailout
                          url: /mail/weekly
                          schedule: every monday of month 09:00
                          timezone: Australia/NSW


Wednesday, May 5, 2010
• every 5 minutes
                   • every 12 hours
                   • 2nd,third mon,wed,thu of march 17:00
                   • every monday of month 09:00
                   • 1st monday of sep,oct,nov 17:00

Wednesday, May 5, 2010
app.yaml



                         handlers:
                         - url: /report/weekly
                          script: reports.py
                          login: admin




Wednesday, May 5, 2010
• memcache
                   • URL Fetch
                   • Mail
                   •
                   • Cron (      )

                   •
Wednesday, May 5, 2010
•     pure python          ok

                           •
                   •
                           •   Antlr 3
                           •   Django 0.9.6
                           •   PyCrypto
                           •   WebOb
                           •   YAML
                           •   zipimport



Wednesday, May 5, 2010
Wednesday, May 5, 2010

More Related Content

Similar to Introduction To Google App Engine

Phone gap nikolaionken-08-06
Phone gap nikolaionken-08-06Phone gap nikolaionken-08-06
Phone gap nikolaionken-08-06Skills Matter
 
Debugging your JavaScript
Debugging your JavaScriptDebugging your JavaScript
Debugging your JavaScriptDiogo Antunes
 
Html5 apps nikolaionken-08-06
Html5 apps nikolaionken-08-06Html5 apps nikolaionken-08-06
Html5 apps nikolaionken-08-06Skills Matter
 
Red Dirt Ruby Conference
Red Dirt Ruby ConferenceRed Dirt Ruby Conference
Red Dirt Ruby ConferenceJohn Woodell
 
URIplay for Media Futures Conference (2009)
URIplay for Media Futures Conference (2009)URIplay for Media Futures Conference (2009)
URIplay for Media Futures Conference (2009)Chris Jackson
 
2011 june-kuala-lumpur-gtug-hackathon
2011 june-kuala-lumpur-gtug-hackathon2011 june-kuala-lumpur-gtug-hackathon
2011 june-kuala-lumpur-gtug-hackathonikailan
 
"How Mozilla Uses Selenium"
"How Mozilla Uses Selenium""How Mozilla Uses Selenium"
"How Mozilla Uses Selenium"Stephen Donner
 
夜宴24期《这段时间》
夜宴24期《这段时间》夜宴24期《这段时间》
夜宴24期《这段时间》Koubei Banquet
 
BRAINREPUBLIC - Powered by no-SQL
BRAINREPUBLIC - Powered by no-SQLBRAINREPUBLIC - Powered by no-SQL
BRAINREPUBLIC - Powered by no-SQLAndreas Jung
 
普通のwebエンジニアでも出来る、ド素人からの機械学習のはじめ方
普通のwebエンジニアでも出来る、ド素人からの機械学習のはじめ方普通のwebエンジニアでも出来る、ド素人からの機械学習のはじめ方
普通のwebエンジニアでも出来る、ド素人からの機械学習のはじめ方Atsushi Harada
 
Billions of hits: Scaling Twitter (Web 2.0 Expo, SF)
Billions of hits: Scaling Twitter (Web 2.0 Expo, SF)Billions of hits: Scaling Twitter (Web 2.0 Expo, SF)
Billions of hits: Scaling Twitter (Web 2.0 Expo, SF)John Adams
 
手機自動化測試和持續整合
手機自動化測試和持續整合手機自動化測試和持續整合
手機自動化測試和持續整合Carl Su
 
Social Network Technologies and Usages
Social Network Technologies and UsagesSocial Network Technologies and Usages
Social Network Technologies and UsagesPatrick Chanezon
 
การค้นหาข้อมูลจากอินเทอร์เน็ต
การค้นหาข้อมูลจากอินเทอร์เน็ตการค้นหาข้อมูลจากอินเทอร์เน็ต
การค้นหาข้อมูลจากอินเทอร์เน็ตwandee8167
 
URIplay for Open Video Conference (2009)
URIplay for Open Video Conference (2009)URIplay for Open Video Conference (2009)
URIplay for Open Video Conference (2009)Chris Jackson
 
Pythonistaで始めるiOSプロトタイプ開発
Pythonistaで始めるiOSプロトタイプ開発Pythonistaで始めるiOSプロトタイプ開発
Pythonistaで始めるiOSプロトタイプ開発Yusuke Muraoka
 
Building mobile apps with JavaScript and PHP
Building mobile apps with JavaScript and PHPBuilding mobile apps with JavaScript and PHP
Building mobile apps with JavaScript and PHPfunkatron
 

Similar to Introduction To Google App Engine (20)

Phone gap nikolaionken-08-06
Phone gap nikolaionken-08-06Phone gap nikolaionken-08-06
Phone gap nikolaionken-08-06
 
Debugging your JavaScript
Debugging your JavaScriptDebugging your JavaScript
Debugging your JavaScript
 
Html5 apps nikolaionken-08-06
Html5 apps nikolaionken-08-06Html5 apps nikolaionken-08-06
Html5 apps nikolaionken-08-06
 
Red Dirt Ruby Conference
Red Dirt Ruby ConferenceRed Dirt Ruby Conference
Red Dirt Ruby Conference
 
URIplay for Media Futures Conference (2009)
URIplay for Media Futures Conference (2009)URIplay for Media Futures Conference (2009)
URIplay for Media Futures Conference (2009)
 
2011 june-kuala-lumpur-gtug-hackathon
2011 june-kuala-lumpur-gtug-hackathon2011 june-kuala-lumpur-gtug-hackathon
2011 june-kuala-lumpur-gtug-hackathon
 
"How Mozilla Uses Selenium"
"How Mozilla Uses Selenium""How Mozilla Uses Selenium"
"How Mozilla Uses Selenium"
 
夜宴24期《这段时间》
夜宴24期《这段时间》夜宴24期《这段时间》
夜宴24期《这段时间》
 
Oscon 2010
Oscon 2010Oscon 2010
Oscon 2010
 
Kotti 紹介
Kotti 紹介Kotti 紹介
Kotti 紹介
 
BRAINREPUBLIC - Powered by no-SQL
BRAINREPUBLIC - Powered by no-SQLBRAINREPUBLIC - Powered by no-SQL
BRAINREPUBLIC - Powered by no-SQL
 
普通のwebエンジニアでも出来る、ド素人からの機械学習のはじめ方
普通のwebエンジニアでも出来る、ド素人からの機械学習のはじめ方普通のwebエンジニアでも出来る、ド素人からの機械学習のはじめ方
普通のwebエンジニアでも出来る、ド素人からの機械学習のはじめ方
 
Billions of hits: Scaling Twitter (Web 2.0 Expo, SF)
Billions of hits: Scaling Twitter (Web 2.0 Expo, SF)Billions of hits: Scaling Twitter (Web 2.0 Expo, SF)
Billions of hits: Scaling Twitter (Web 2.0 Expo, SF)
 
手機自動化測試和持續整合
手機自動化測試和持續整合手機自動化測試和持續整合
手機自動化測試和持續整合
 
Social Network Technologies and Usages
Social Network Technologies and UsagesSocial Network Technologies and Usages
Social Network Technologies and Usages
 
Railsconf 2010
Railsconf 2010Railsconf 2010
Railsconf 2010
 
การค้นหาข้อมูลจากอินเทอร์เน็ต
การค้นหาข้อมูลจากอินเทอร์เน็ตการค้นหาข้อมูลจากอินเทอร์เน็ต
การค้นหาข้อมูลจากอินเทอร์เน็ต
 
URIplay for Open Video Conference (2009)
URIplay for Open Video Conference (2009)URIplay for Open Video Conference (2009)
URIplay for Open Video Conference (2009)
 
Pythonistaで始めるiOSプロトタイプ開発
Pythonistaで始めるiOSプロトタイプ開発Pythonistaで始めるiOSプロトタイプ開発
Pythonistaで始めるiOSプロトタイプ開発
 
Building mobile apps with JavaScript and PHP
Building mobile apps with JavaScript and PHPBuilding mobile apps with JavaScript and PHP
Building mobile apps with JavaScript and PHP
 

Recently uploaded

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 

Recently uploaded (20)

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 

Introduction To Google App Engine

  • 1. Google App Engine Kosei Moriyama (cou929) Nov, 23, 2009 Wednesday, May 5, 2010
  • 2. Agenda • Google App Engine • Getting Started • Wednesday, May 5, 2010
  • 5. • • • • • • • … Wednesday, May 5, 2010
  • 6. App Engine • • • • • • • • … Wednesday, May 5, 2010
  • 7. Python • Java • JVM • e.g., JRuby • • • App Engine • Google , URL Fetch, Mail, memcache, • Cron Wednesday, May 5, 2010
  • 8. App Engine SDK • web • app engine • Python SDK / Java SDK • google Wednesday, May 5, 2010
  • 10. • http://code.google.com/intl/ja/appengine/docs/python/gettingstarted/ Wednesday, May 5, 2010
  • 11. • Hello World! • Webapp • Google • • • • • Wednesday, May 5, 2010
  • 12. • Hello World! • Webapp • Google • • • • • Wednesday, May 5, 2010
  • 13. Python • http://www.python.org/download/ • 2.5 • 3.x • Python SDK • http://code.google.com/intl/ja/appengine/ downloads.html • Path Wednesday, May 5, 2010
  • 14. • dev_appserver.py • • appcfg.py • app engine Wednesday, May 5, 2010
  • 15. • Hello World! • Webapp • Google • • • • • Wednesday, May 5, 2010
  • 16. Hello World! • • app.yaml • python main.py Wednesday, May 5, 2010
  • 17. app.yaml • • id, version, runtime ... • • url Wednesday, May 5, 2010
  • 18. main.py • print Wednesday, May 5, 2010
  • 19. App Engine web • Wednesday, May 5, 2010
  • 20. App Engine web • app engine web CGI request CGI app.yaml app engine routing client web server response CGI foo.py bar.py baz.py Wednesday, May 5, 2010
  • 21. • Hello World! • Webapp • Google • • • • • Wednesday, May 5, 2010
  • 22. Webapp • CGI ‣ , • Python CGI • Django, Cherry.py, Pylons, web.py Wednesday, May 5, 2010
  • 23. Webapp • • • app engine Wednesday, May 5, 2010
  • 24. 3 • RequestHandler ( ) • , • WSGIApplication • URL • main • CGI WSGIApplication Wednesday, May 5, 2010
  • 25. main.py • webapp, run_wsgi_app • MainPage • webapp.RequestHandler • def get(self) • GET • response.headers() • response.out.write() • webapp.WSGIApplication() • run_wsgi_app() Wednesday, May 5, 2010
  • 26. • Hello World! • Webapp • Google • • • • • Wednesday, May 5, 2010
  • 27. Google • users import • user.get_current_user() • user • none • self.redirect(dest_uri) • dest_uri • users.create_login_url(dest_uri) • • , dest_uri Wednesday, May 5, 2010
  • 28. • Hello World! • Webapp • Google • • • • • Wednesday, May 5, 2010
  • 29. • def post(self) • POST • request.get(‘name’) • “name” Wednesday, May 5, 2010
  • 30. • Hello World! • Webapp • Google • • • • • Wednesday, May 5, 2010
  • 31. • • • not RDBMS Wednesday, May 5, 2010
  • 32. Entity put() application Data Store List of Entity GQL Wednesday, May 5, 2010
  • 33. Entity • Entity • db.Model • Property key • Property • db.fooProperty() • Key • entity • Data store Wednesday, May 5, 2010
  • 34. class Pet(db.Model): name = db.StringProperty(required=True) type = db.StringProperty(required=True, choices=set(["cat", "dog", "bird"])) birthdate = db.DateProperty() weight_in_pounds = db.IntegerProperty() spayed_or_neutered = db.BooleanProperty() owner = db.UserProperty(required=True) Wednesday, May 5, 2010
  • 35. , put() • greeting = Greeting(author = users.get_current_user(), content = self.request.get('content')) greeting.put() Wednesday, May 5, 2010
  • 36. GQL • db.GqlQuery("SELECT * FROM Greeting ORDER BY date DESC LIMIT 10") • greetings Greeting • for greeting in greetings: • • db.GqlQuery("SELECT * FROM Greeting ORDER BY date DESC LIMIT 10") • Greeting.gql("ORDER BY date DESC LIMIT 10") • "SELECT * FROM Greeting" ( ) Wednesday, May 5, 2010
  • 37. • Greeting.all() greetings.filter("author =", users.get_current_user()) greetings.order("-date") • • Greeting.all().filter("author =", users.get_current_user()).order("-date") Wednesday, May 5, 2010
  • 38. • Hello World! • Webapp • Google • • • • • Wednesday, May 5, 2010
  • 39. • EZT, Cheetah, ClearSilver, Quixote, Django • Django Wednesday, May 5, 2010
  • 40. • template html • template import • template Dictionary • template.render(path, values) Wednesday, May 5, 2010
  • 41. Django template • {{ variable }} • {% foo %} • {% for * %} • {% if * %} • {% include * %} Wednesday, May 5, 2010
  • 42. template • Django template • class template • {% extends foo.html %} • {% block bar %} Wednesday, May 5, 2010
  • 43. • Hello World! • Webapp • Google • • • • • Wednesday, May 5, 2010
  • 44. index.html , • ok • • , css, JavaScript, , Flash Wednesday, May 5, 2010
  • 45. app.yaml - url: /stylesheets static_dir: stylesheets • /stylesheets/* , stylesheets Wednesday, May 5, 2010
  • 46. • Hello World! • Webapp • Google • • • • • Wednesday, May 5, 2010
  • 47. • http://appengine.google.com/ • app.yaml • application: ID • • appcfg.py update helloworld/ • • http://application-id.appspot.com Wednesday, May 5, 2010
  • 49. • memcache • URL Fetch • Mail • • Cron ( ) • Wednesday, May 5, 2010
  • 50. • memcache • URL Fetch • Mail • • Cron ( ) • Wednesday, May 5, 2010
  • 51. memcach • • memchached • key-value store Wednesday, May 5, 2010
  • 52. • memcache • URL Fetch • Mail • • Cron ( ) • Wednesday, May 5, 2010
  • 53. URL Fetch • HTTP/HTTPS , / • Google , Wednesday, May 5, 2010
  • 54. • urllib, urllib2, httplib • google • app engine api Wednesday, May 5, 2010
  • 55. • memcache • URL Fetch • Mail • • Cron ( ) • Wednesday, May 5, 2010
  • 56. Mail • Wednesday, May 5, 2010
  • 57. • memcache • URL Fetch • Mail • • Cron ( ) • Wednesday, May 5, 2010
  • 58. • • 1 • • • ( ) Wednesday, May 5, 2010
  • 59. • memcache • URL Fetch • Mail • • Cron ( ) • Wednesday, May 5, 2010
  • 60. Cron • • cron.yaml Wednesday, May 5, 2010
  • 61. cron.yaml cron: - description: daily summary job url: /tasks/summary schedule: every 24 hours - description: monday morning mailout url: /mail/weekly schedule: every monday of month 09:00 timezone: Australia/NSW Wednesday, May 5, 2010
  • 62. • every 5 minutes • every 12 hours • 2nd,third mon,wed,thu of march 17:00 • every monday of month 09:00 • 1st monday of sep,oct,nov 17:00 Wednesday, May 5, 2010
  • 63. app.yaml handlers: - url: /report/weekly script: reports.py login: admin Wednesday, May 5, 2010
  • 64. • memcache • URL Fetch • Mail • • Cron ( ) • Wednesday, May 5, 2010
  • 65. pure python ok • • • Antlr 3 • Django 0.9.6 • PyCrypto • WebOb • YAML • zipimport Wednesday, May 5, 2010