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

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 

Recently uploaded (20)

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 

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