SlideShare a Scribd company logo
1 of 37
Introduction to Google App Engine Andrea Spadaccini - @lupino3 May 22nd, 2010 -  Catania – Italy [email_address]
Agenda Overview Developing applications with Google App Engine Toy example Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine
Overview
What is GAE? Google App Engine (GAE) is a service, offered by Google, that allows developers to build applications that can run on Google's infrastructure. It is a form of Cloud Computing. Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine
Cloud computing Abstraction  of details like hardware configuration, physical location of data, operating system. Internet-based computing. Cloud : metaphor inspired by the drawing used to represent the Internet (and, earlier, the PSTN) in network diagrams Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine
Cloud computing Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine Traditional client/server paradigm Client N Client 1 Server Internet
Cloud computing Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine Cloud Computing Client N Client 1 Internet Server Server Server
Cloud layers Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine Software as a Service Platform as a Service Infrastructure as a Service HW / Net IaaS Paas SaaS
Cloud layers Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine Software as a Service Platform as a Service Infrastructure as a Service HW / Net IaaS Paas SaaS
GAE Features Run dynamic web applications (request / response) Serve static files Data storage (BigTable) Google infrastructure ->  scalability, efficiency Additional features (mail, XMPP, Google Accounts, cron, WebServices, memcache, image manip.) Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine
App Engine datastore The  App Engine Datastore  is a distributed efficient storage designed for web applications. Entity : data object to be stored. Contains  attributes  and is identified by a  key . Queries must be run against  indexes . It's not a relational DB. There are  no joins  (or aggregate queries like count(*)). The schema is enforced by the application, not by the database. Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine
Developing applications with Google App Engine
Getting started ,[object Object],Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine …  which SDK?
Which language? Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine Frame taken from  Matrix  (1999)
Which language? Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine
Which language? Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine
Hello world! # helloworld.py print  “Content-Type: text/html” print print  “Hello world” # app.yaml application : gtugct-helloworld version : 1 runtime : python api-version : 1 handlers : -  uri : /.* script : helloworld.py Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine Taken from  App Engine Intro  – see References
The GAE dev cycle 10  Develop -  <your favourite tools here>   (hint: ViM) 20   Test -  dev_appserver.py 30   Deploy -  appcfg.py 40   Repeat -  GOTO 10 Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine With the Python SDK
Paradigm and features Request / response (max 30 seconds!) URL ↔ script mapping Web Frameworks: GAE comes with  webapp , a Web Framework developed by Google. You can use Django (but not its ORM!). Web-based administration console Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine
Toy Example
Answr It! Answr.it by Vanni Rizzo, Pierluigi D'Antrassi, Andrea Spadaccini - http://www.answr.it Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine
Data modeling (I) #  models.py from  google.appengine.ext  import  db class  Answr(db.Model): text = db.StringProperty() rand = db.FloatProperty() def  to_json(self):   return  '{&quot;text&quot; : &quot;%s&quot;}' % self.text @staticmethod def  get_random(): def  add_answr(answr_text, rand = None): Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine
Data modeling (II) #  models.py (continued) class  ApplicationData(db.Model): name = db.StringProperty() value = db.IntegerProperty() @staticmethod def  getAnswrCounter(): def  incrementAnswrCounter(): ... Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine
Main page code from  google.appengine.ext  import  webapp from  google.appengine.ext.webapp.util  import  run_wsgi_app from  models  import  Answr class  AnswrApp(webapp.RequestHandler): def  get(self): self.response.headers['Content-Type'] = 'application/json' random_answr = Answr.get_random() self.response.out.write(random_answr.to_json()) application = webapp.WSGIApplication([('/answr', AnswrApp)], debug = True) if   __name__  == '__main__': run_wsgi_app(application) Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine
app.yaml application: answr-it version: 10 runtime: python api_version: 1 handlers: - url: /answr script: main.py - url: / static_files: static/index.html upload: static/index.html - url: /css  (same for /img e /js) static_dir: static/css Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine
Users API from  models  import  Answr from  google.appengine.api  import  users [.. omissis ..] class  PopulatePage(webapp.RequestHandler): def  get(self): user = users.get_current_user() if   not  user: print  &quot;<a href = '%s'>Log in with your Google Account</a>&quot; % users.create_login_url(self.request.path) elif  users.is_current_user_admin(): print  &quot;Populating the DB...&quot; answrs = [ .. omissis .. ]  for  answr_text  in  answrs: Answr.add_answr(answr_text) Answr.add_answr(&quot;Something strange is going on..&quot;, 1.0) else : logging.warning('Unauthorized access to /populate') Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine
Live demo http://answr-it.appspot.com .. or .. http://www.answr.it Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine
Twitter bot (cron + WS) # twitterbot.py import  tweepy from  models  import  ApplicationData, Answr # 1. Login auth = tweepy.BasicAuthHandler(&quot;answrit&quot;, &quot;the_password&quot;) api = tweepy.API(auth) logging.info('Login done!') # 2. Follow back who follows me followers = api.followers() friends = api.friends() to_follow = [x  for  x  in  followers  if  x  not   in  friends] for  user  in  to_follow: try : user.follow() except  tweepy.TweepError, e: logging.warning(e) Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine
Twitter bot (cron + WS) # twitterbot.py  (cont.) # 3. Read last mentions last_id = ApplicationData.getLastAnswredTweetId() if   not  last_id: mentions = api.mentions(count = 200) else : mentions = api.mentions(count = 200, since_id = last_id) # 4. Random answr for  status  in  mentions: answr = Answr.get_random() api.update_status(&quot;@%s %s&quot; % (status.author.screen_name, answr.text), status.id) if  status.id > last_id: last_id = status.id # 5. Save the last ID if  last_id: ApplicationData.setLastAnswredTweetId(last_id) Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine
Twitter bot (cron + WS) # cron.yaml cron:  - description: answr to people url: /twitterbot schedule: every 1 mins # (part of) app.yaml - url: /twitterbot login: admin script: twitterbot.py Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine DEMO! (if Murphy allows it..) Tweet something to @answrit  (like: @answrit: are you ok?)
Chat bot (XMPP) # (part of) xmpp.py from  google.appengine.api  import  xmpp from  google.appengine.ext  import  webapp from  google.appengine.ext.webapp.util  import  run_wsgi_app from  models  import  Answr class  XMPPHandler(webapp.RequestHandler): def  post(self): message = xmpp.Message(self.request.POST) message.reply(Answr.get_random().text) application  = webapp.WSGIApplication([('/_ah/xmpp/message/chat/', XMPPHandler)], debug=True) Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine
Chat bot (XMPP) # (significant part of) app.yaml - url: /_ah/xmpp/message/chat/ script: xmpp.py inbound_services: - xmpp_message Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine DEMO! Add to your XMPP buddy list  [email_address]  (GTalk is fine), and ask him questions!
References http://en.wikipedia.org  - Articles on Cloud Computing, Affero GPL and others  Google Inc – aa.vv. -  “Bigtable: a distributed storage system for structured data”  - OSDI 2006 Dan Sanderson -  “Programming Google App Engine”  - O' Reilly / Google Press – 2009 Google App Engine home page -  http://www.appspot.com Simon Willison -  “I've (probably) been using Google App Engine for a week longer than you have”  - Slides from Barcamp London 4 – 2008” (referred in this document as  App Engine Intro ) Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine
More stuff
No vendor lock-in! Open source implementation of GAE:  AppScale http://appscale.cs.ucsb.edu/ Runs on: ,[object Object]
XEN (?)
KVM Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine Andrea Spadaccini -  @lupino3  – Introduzione a Google App Engine

More Related Content

What's hot

I've (probably) been using Google App Engine for a week longer than you have
I've (probably) been using Google App Engine for a week longer than you haveI've (probably) been using Google App Engine for a week longer than you have
I've (probably) been using Google App Engine for a week longer than you haveSimon Willison
 
Gentle App Engine Intro
Gentle App Engine IntroGentle App Engine Intro
Gentle App Engine Introrobinb123
 
Google app engine
Google app engineGoogle app engine
Google app engineSuraj Mehta
 
Google app engine - Overview
Google app engine - OverviewGoogle app engine - Overview
Google app engine - OverviewNathan Quach
 
Google App Engine
Google App EngineGoogle App Engine
Google App EngineCsaba Toth
 
Google App Engine's Latest Features
Google App Engine's Latest FeaturesGoogle App Engine's Latest Features
Google App Engine's Latest FeaturesChris Schalk
 
App Engine Overview @ Google Hackathon SXSW 2010
App Engine Overview @ Google Hackathon SXSW 2010App Engine Overview @ Google Hackathon SXSW 2010
App Engine Overview @ Google Hackathon SXSW 2010Chris Schalk
 
Google app engine introduction
Google app engine introductionGoogle app engine introduction
Google app engine introductionrajsandhu1989
 
Google App Engine (Introduction)
Google App Engine (Introduction)Google App Engine (Introduction)
Google App Engine (Introduction)Praveen Hanchinal
 
Google app engine
Google app engineGoogle app engine
Google app engineRenjith318
 
Introduction to Google App Engine - Naga Rohit S [ IIT Guwahati ] - Google De...
Introduction to Google App Engine - Naga Rohit S [ IIT Guwahati ] - Google De...Introduction to Google App Engine - Naga Rohit S [ IIT Guwahati ] - Google De...
Introduction to Google App Engine - Naga Rohit S [ IIT Guwahati ] - Google De...Naga Rohit
 
Google App Engine - Overview #3
Google App Engine - Overview #3Google App Engine - Overview #3
Google App Engine - Overview #3Kay Kim
 
Introduction to Google App Engine with Python
Introduction to Google App Engine with PythonIntroduction to Google App Engine with Python
Introduction to Google App Engine with PythonBrian Lyttle
 
Google Application Engine
Google Application EngineGoogle Application Engine
Google Application Engineguestd77e8ae
 
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...e-Legion
 
App engine cloud_comp_expo_nyc
App engine cloud_comp_expo_nycApp engine cloud_comp_expo_nyc
App engine cloud_comp_expo_nycChris Schalk
 

What's hot (20)

Google App Engine
Google App EngineGoogle App Engine
Google App Engine
 
I've (probably) been using Google App Engine for a week longer than you have
I've (probably) been using Google App Engine for a week longer than you haveI've (probably) been using Google App Engine for a week longer than you have
I've (probably) been using Google App Engine for a week longer than you have
 
Google App Engine
Google App EngineGoogle App Engine
Google App Engine
 
Gentle App Engine Intro
Gentle App Engine IntroGentle App Engine Intro
Gentle App Engine Intro
 
Google app engine
Google app engineGoogle app engine
Google app engine
 
Google app engine - Overview
Google app engine - OverviewGoogle app engine - Overview
Google app engine - Overview
 
Google App Engine
Google App EngineGoogle App Engine
Google App Engine
 
Google App Engine's Latest Features
Google App Engine's Latest FeaturesGoogle App Engine's Latest Features
Google App Engine's Latest Features
 
App Engine Overview @ Google Hackathon SXSW 2010
App Engine Overview @ Google Hackathon SXSW 2010App Engine Overview @ Google Hackathon SXSW 2010
App Engine Overview @ Google Hackathon SXSW 2010
 
Google app engine introduction
Google app engine introductionGoogle app engine introduction
Google app engine introduction
 
Google App Engine (Introduction)
Google App Engine (Introduction)Google App Engine (Introduction)
Google App Engine (Introduction)
 
Google app engine
Google app engineGoogle app engine
Google app engine
 
Google app engine
Google app engineGoogle app engine
Google app engine
 
Introduction to Google App Engine - Naga Rohit S [ IIT Guwahati ] - Google De...
Introduction to Google App Engine - Naga Rohit S [ IIT Guwahati ] - Google De...Introduction to Google App Engine - Naga Rohit S [ IIT Guwahati ] - Google De...
Introduction to Google App Engine - Naga Rohit S [ IIT Guwahati ] - Google De...
 
Google App engine
Google App engineGoogle App engine
Google App engine
 
Google App Engine - Overview #3
Google App Engine - Overview #3Google App Engine - Overview #3
Google App Engine - Overview #3
 
Introduction to Google App Engine with Python
Introduction to Google App Engine with PythonIntroduction to Google App Engine with Python
Introduction to Google App Engine with Python
 
Google Application Engine
Google Application EngineGoogle Application Engine
Google Application Engine
 
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
 
App engine cloud_comp_expo_nyc
App engine cloud_comp_expo_nycApp engine cloud_comp_expo_nyc
App engine cloud_comp_expo_nyc
 

Viewers also liked

Google App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGoogle App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGuillaume Laforge
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App Enginerajdeep
 
App Engine Presentation @ SFJUG Sep 2010
App Engine Presentation @ SFJUG Sep 2010App Engine Presentation @ SFJUG Sep 2010
App Engine Presentation @ SFJUG Sep 2010Chris Schalk
 
Zope 3 at Google App Engine
Zope 3 at Google App EngineZope 3 at Google App Engine
Zope 3 at Google App EngineQuintagroup
 
Cloud Computing by Fatma Ghacham
Cloud Computing  by  Fatma GhachamCloud Computing  by  Fatma Ghacham
Cloud Computing by Fatma GhachamFatma Ghachem
 
Using Google App Engine Python
Using Google App Engine PythonUsing Google App Engine Python
Using Google App Engine PythonAkshay Mathur
 
SISO Presentation: Cloud Ontology
SISO Presentation: Cloud OntologySISO Presentation: Cloud Ontology
SISO Presentation: Cloud OntologyGovCloud Network
 
Jitterbit Harmony Spring’15 cloud integration platform
Jitterbit Harmony Spring’15 cloud integration platformJitterbit Harmony Spring’15 cloud integration platform
Jitterbit Harmony Spring’15 cloud integration platformSuyati Technologies
 
Accounting for non functional and project requirements - cosmic and ifpug dev...
Accounting for non functional and project requirements - cosmic and ifpug dev...Accounting for non functional and project requirements - cosmic and ifpug dev...
Accounting for non functional and project requirements - cosmic and ifpug dev...IWSM Mensura
 
AS400 webservices - the adapter create cloud apps in a couple of days
AS400 webservices - the adapter create cloud apps in a couple of daysAS400 webservices - the adapter create cloud apps in a couple of days
AS400 webservices - the adapter create cloud apps in a couple of days112Motion
 
Harmony concepts and design guide
Harmony concepts and design guideHarmony concepts and design guide
Harmony concepts and design guide112Motion
 
Validating Non Functional Requirements
Validating Non Functional RequirementsValidating Non Functional Requirements
Validating Non Functional RequirementsReuben Korngold
 
Non functional requirements - checklist
Non functional requirements - checklistNon functional requirements - checklist
Non functional requirements - checklistVu Hung Nguyen
 
Play Framework on Google App Engine
Play Framework on Google App EnginePlay Framework on Google App Engine
Play Framework on Google App EngineFred Lin
 
What is a service level agreement week7
What is a service level agreement week7What is a service level agreement week7
What is a service level agreement week7hapy
 
Software Requirements
 Software Requirements Software Requirements
Software RequirementsZaman Khan
 

Viewers also liked (20)

Google App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGoogle App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and Gaelyk
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App Engine
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App Engine
 
App Engine Presentation @ SFJUG Sep 2010
App Engine Presentation @ SFJUG Sep 2010App Engine Presentation @ SFJUG Sep 2010
App Engine Presentation @ SFJUG Sep 2010
 
Zope 3 at Google App Engine
Zope 3 at Google App EngineZope 3 at Google App Engine
Zope 3 at Google App Engine
 
Cloud Computing by Fatma Ghacham
Cloud Computing  by  Fatma GhachamCloud Computing  by  Fatma Ghacham
Cloud Computing by Fatma Ghacham
 
Using Google App Engine Python
Using Google App Engine PythonUsing Google App Engine Python
Using Google App Engine Python
 
SISO Presentation: Cloud Ontology
SISO Presentation: Cloud OntologySISO Presentation: Cloud Ontology
SISO Presentation: Cloud Ontology
 
Cloud Computing
Cloud  ComputingCloud  Computing
Cloud Computing
 
Cloud computing
Cloud computingCloud computing
Cloud computing
 
Jitterbit Harmony Spring’15 cloud integration platform
Jitterbit Harmony Spring’15 cloud integration platformJitterbit Harmony Spring’15 cloud integration platform
Jitterbit Harmony Spring’15 cloud integration platform
 
Accounting for non functional and project requirements - cosmic and ifpug dev...
Accounting for non functional and project requirements - cosmic and ifpug dev...Accounting for non functional and project requirements - cosmic and ifpug dev...
Accounting for non functional and project requirements - cosmic and ifpug dev...
 
AS400 webservices - the adapter create cloud apps in a couple of days
AS400 webservices - the adapter create cloud apps in a couple of daysAS400 webservices - the adapter create cloud apps in a couple of days
AS400 webservices - the adapter create cloud apps in a couple of days
 
Harmony concepts and design guide
Harmony concepts and design guideHarmony concepts and design guide
Harmony concepts and design guide
 
Validating Non Functional Requirements
Validating Non Functional RequirementsValidating Non Functional Requirements
Validating Non Functional Requirements
 
Non functional requirements - checklist
Non functional requirements - checklistNon functional requirements - checklist
Non functional requirements - checklist
 
Play Framework on Google App Engine
Play Framework on Google App EnginePlay Framework on Google App Engine
Play Framework on Google App Engine
 
Sla Agreement
Sla AgreementSla Agreement
Sla Agreement
 
What is a service level agreement week7
What is a service level agreement week7What is a service level agreement week7
What is a service level agreement week7
 
Software Requirements
 Software Requirements Software Requirements
Software Requirements
 

Similar to Introduction to Google App Engine

Get up and running with google app engine in 60 minutes or less
Get up and running with google app engine in 60 minutes or lessGet up and running with google app engine in 60 minutes or less
Get up and running with google app engine in 60 minutes or lesszrok
 
Life After Mobilegeddon: App Deep Linking Strategies - Pubcon October 2015
Life After Mobilegeddon: App Deep Linking Strategies - Pubcon October 2015Life After Mobilegeddon: App Deep Linking Strategies - Pubcon October 2015
Life After Mobilegeddon: App Deep Linking Strategies - Pubcon October 2015MobileMoxie
 
Life After Mobilegeddon: App Deep Linking Strategies - Pubcon October 2015
Life After Mobilegeddon: App Deep Linking Strategies - Pubcon October 2015Life After Mobilegeddon: App Deep Linking Strategies - Pubcon October 2015
Life After Mobilegeddon: App Deep Linking Strategies - Pubcon October 2015Suzzicks
 
BP204 - Take a REST and put your data to work with APIs!
BP204 - Take a REST and put your data to work with APIs!BP204 - Take a REST and put your data to work with APIs!
BP204 - Take a REST and put your data to work with APIs!Craig Schumann
 
Automation in seo. Tools and tricks
Automation in seo. Tools and tricksAutomation in seo. Tools and tricks
Automation in seo. Tools and tricksNetpeakBG
 
Automation in seo. Tools and tricks
Automation in seo. Tools and tricksAutomation in seo. Tools and tricks
Automation in seo. Tools and tricksNetpeak
 
Software Project Management
Software Project ManagementSoftware Project Management
Software Project ManagementWidoyo PH
 
App engine devfest_mexico_10
App engine devfest_mexico_10App engine devfest_mexico_10
App engine devfest_mexico_10Chris Schalk
 
Google App Engine for Python - Unit01: Basic
Google App Engine for Python - Unit01: BasicGoogle App Engine for Python - Unit01: Basic
Google App Engine for Python - Unit01: BasicWei-Tsung Su
 
Google cloud platform
Google cloud platformGoogle cloud platform
Google cloud platformrajdeep
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for JavaLars Vogel
 
Easy Web Project Development & Management with Django & Mercurial
Easy Web Project Development & Management with Django & MercurialEasy Web Project Development & Management with Django & Mercurial
Easy Web Project Development & Management with Django & MercurialWidoyo PH
 
How to build virtual assistant like Jarvis (in Ironman) with Google Assistant...
How to build virtual assistant like Jarvis (in Ironman) with Google Assistant...How to build virtual assistant like Jarvis (in Ironman) with Google Assistant...
How to build virtual assistant like Jarvis (in Ironman) with Google Assistant...Tu Le Dinh
 
Passo a Passo para criar uma aplicação Móvel Híbrida
Passo a Passo para criar uma aplicação Móvel HíbridaPasso a Passo para criar uma aplicação Móvel Híbrida
Passo a Passo para criar uma aplicação Móvel HíbridaJuliano Martins
 
Python Ireland Nov 2009 Talk - Appengine
Python Ireland Nov 2009 Talk - AppenginePython Ireland Nov 2009 Talk - Appengine
Python Ireland Nov 2009 Talk - AppenginePython Ireland
 
Hands on App Engine
Hands on App EngineHands on App Engine
Hands on App EngineSimon Su
 
Modern Web Applications with Sightly
Modern Web Applications with SightlyModern Web Applications with Sightly
Modern Web Applications with SightlyRadu Cotescu
 
Android Quiz App – Test Your IQ.pdf
Android Quiz App – Test Your IQ.pdfAndroid Quiz App – Test Your IQ.pdf
Android Quiz App – Test Your IQ.pdfSudhanshiBakre1
 
Обход проверки безопасности в магазинах мобильных приложений при помощи платф...
Обход проверки безопасности в магазинах мобильных приложений при помощи платф...Обход проверки безопасности в магазинах мобильных приложений при помощи платф...
Обход проверки безопасности в магазинах мобильных приложений при помощи платф...Positive Hack Days
 

Similar to Introduction to Google App Engine (20)

Get up and running with google app engine in 60 minutes or less
Get up and running with google app engine in 60 minutes or lessGet up and running with google app engine in 60 minutes or less
Get up and running with google app engine in 60 minutes or less
 
Life After Mobilegeddon: App Deep Linking Strategies - Pubcon October 2015
Life After Mobilegeddon: App Deep Linking Strategies - Pubcon October 2015Life After Mobilegeddon: App Deep Linking Strategies - Pubcon October 2015
Life After Mobilegeddon: App Deep Linking Strategies - Pubcon October 2015
 
Life After Mobilegeddon: App Deep Linking Strategies - Pubcon October 2015
Life After Mobilegeddon: App Deep Linking Strategies - Pubcon October 2015Life After Mobilegeddon: App Deep Linking Strategies - Pubcon October 2015
Life After Mobilegeddon: App Deep Linking Strategies - Pubcon October 2015
 
BP204 - Take a REST and put your data to work with APIs!
BP204 - Take a REST and put your data to work with APIs!BP204 - Take a REST and put your data to work with APIs!
BP204 - Take a REST and put your data to work with APIs!
 
Automation in seo. Tools and tricks
Automation in seo. Tools and tricksAutomation in seo. Tools and tricks
Automation in seo. Tools and tricks
 
Automation in seo. Tools and tricks
Automation in seo. Tools and tricksAutomation in seo. Tools and tricks
Automation in seo. Tools and tricks
 
Software Project Management
Software Project ManagementSoftware Project Management
Software Project Management
 
App engine devfest_mexico_10
App engine devfest_mexico_10App engine devfest_mexico_10
App engine devfest_mexico_10
 
Google App Engine for Python - Unit01: Basic
Google App Engine for Python - Unit01: BasicGoogle App Engine for Python - Unit01: Basic
Google App Engine for Python - Unit01: Basic
 
Google cloud platform
Google cloud platformGoogle cloud platform
Google cloud platform
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for Java
 
Easy Web Project Development & Management with Django & Mercurial
Easy Web Project Development & Management with Django & MercurialEasy Web Project Development & Management with Django & Mercurial
Easy Web Project Development & Management with Django & Mercurial
 
How to build virtual assistant like Jarvis (in Ironman) with Google Assistant...
How to build virtual assistant like Jarvis (in Ironman) with Google Assistant...How to build virtual assistant like Jarvis (in Ironman) with Google Assistant...
How to build virtual assistant like Jarvis (in Ironman) with Google Assistant...
 
Passo a Passo para criar uma aplicação Móvel Híbrida
Passo a Passo para criar uma aplicação Móvel HíbridaPasso a Passo para criar uma aplicação Móvel Híbrida
Passo a Passo para criar uma aplicação Móvel Híbrida
 
Sst hackathon express
Sst hackathon expressSst hackathon express
Sst hackathon express
 
Python Ireland Nov 2009 Talk - Appengine
Python Ireland Nov 2009 Talk - AppenginePython Ireland Nov 2009 Talk - Appengine
Python Ireland Nov 2009 Talk - Appengine
 
Hands on App Engine
Hands on App EngineHands on App Engine
Hands on App Engine
 
Modern Web Applications with Sightly
Modern Web Applications with SightlyModern Web Applications with Sightly
Modern Web Applications with Sightly
 
Android Quiz App – Test Your IQ.pdf
Android Quiz App – Test Your IQ.pdfAndroid Quiz App – Test Your IQ.pdf
Android Quiz App – Test Your IQ.pdf
 
Обход проверки безопасности в магазинах мобильных приложений при помощи платф...
Обход проверки безопасности в магазинах мобильных приложений при помощи платф...Обход проверки безопасности в магазинах мобильных приложений при помощи платф...
Обход проверки безопасности в магазинах мобильных приложений при помощи платф...
 

Recently uploaded

Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 

Recently uploaded (20)

Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 

Introduction to Google App Engine

  • 1. Introduction to Google App Engine Andrea Spadaccini - @lupino3 May 22nd, 2010 - Catania – Italy [email_address]
  • 2. Agenda Overview Developing applications with Google App Engine Toy example Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine
  • 4. What is GAE? Google App Engine (GAE) is a service, offered by Google, that allows developers to build applications that can run on Google's infrastructure. It is a form of Cloud Computing. Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine
  • 5. Cloud computing Abstraction of details like hardware configuration, physical location of data, operating system. Internet-based computing. Cloud : metaphor inspired by the drawing used to represent the Internet (and, earlier, the PSTN) in network diagrams Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine
  • 6. Cloud computing Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine Traditional client/server paradigm Client N Client 1 Server Internet
  • 7. Cloud computing Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine Cloud Computing Client N Client 1 Internet Server Server Server
  • 8. Cloud layers Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine Software as a Service Platform as a Service Infrastructure as a Service HW / Net IaaS Paas SaaS
  • 9. Cloud layers Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine Software as a Service Platform as a Service Infrastructure as a Service HW / Net IaaS Paas SaaS
  • 10. GAE Features Run dynamic web applications (request / response) Serve static files Data storage (BigTable) Google infrastructure -> scalability, efficiency Additional features (mail, XMPP, Google Accounts, cron, WebServices, memcache, image manip.) Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine
  • 11. App Engine datastore The App Engine Datastore is a distributed efficient storage designed for web applications. Entity : data object to be stored. Contains attributes and is identified by a key . Queries must be run against indexes . It's not a relational DB. There are no joins (or aggregate queries like count(*)). The schema is enforced by the application, not by the database. Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine
  • 12. Developing applications with Google App Engine
  • 13.
  • 14. Which language? Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine Frame taken from Matrix (1999)
  • 15. Which language? Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine
  • 16. Which language? Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine
  • 17. Hello world! # helloworld.py print “Content-Type: text/html” print print “Hello world” # app.yaml application : gtugct-helloworld version : 1 runtime : python api-version : 1 handlers : - uri : /.* script : helloworld.py Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine Taken from App Engine Intro – see References
  • 18. The GAE dev cycle 10 Develop - <your favourite tools here> (hint: ViM) 20 Test - dev_appserver.py 30 Deploy - appcfg.py 40 Repeat - GOTO 10 Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine With the Python SDK
  • 19. Paradigm and features Request / response (max 30 seconds!) URL ↔ script mapping Web Frameworks: GAE comes with webapp , a Web Framework developed by Google. You can use Django (but not its ORM!). Web-based administration console Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine
  • 21. Answr It! Answr.it by Vanni Rizzo, Pierluigi D'Antrassi, Andrea Spadaccini - http://www.answr.it Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine
  • 22. Data modeling (I) # models.py from google.appengine.ext import db class Answr(db.Model): text = db.StringProperty() rand = db.FloatProperty() def to_json(self): return '{&quot;text&quot; : &quot;%s&quot;}' % self.text @staticmethod def get_random(): def add_answr(answr_text, rand = None): Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine
  • 23. Data modeling (II) # models.py (continued) class ApplicationData(db.Model): name = db.StringProperty() value = db.IntegerProperty() @staticmethod def getAnswrCounter(): def incrementAnswrCounter(): ... Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine
  • 24. Main page code from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app from models import Answr class AnswrApp(webapp.RequestHandler): def get(self): self.response.headers['Content-Type'] = 'application/json' random_answr = Answr.get_random() self.response.out.write(random_answr.to_json()) application = webapp.WSGIApplication([('/answr', AnswrApp)], debug = True) if __name__ == '__main__': run_wsgi_app(application) Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine
  • 25. app.yaml application: answr-it version: 10 runtime: python api_version: 1 handlers: - url: /answr script: main.py - url: / static_files: static/index.html upload: static/index.html - url: /css (same for /img e /js) static_dir: static/css Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine
  • 26. Users API from models import Answr from google.appengine.api import users [.. omissis ..] class PopulatePage(webapp.RequestHandler): def get(self): user = users.get_current_user() if not user: print &quot;<a href = '%s'>Log in with your Google Account</a>&quot; % users.create_login_url(self.request.path) elif users.is_current_user_admin(): print &quot;Populating the DB...&quot; answrs = [ .. omissis .. ] for answr_text in answrs: Answr.add_answr(answr_text) Answr.add_answr(&quot;Something strange is going on..&quot;, 1.0) else : logging.warning('Unauthorized access to /populate') Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine
  • 27. Live demo http://answr-it.appspot.com .. or .. http://www.answr.it Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine
  • 28. Twitter bot (cron + WS) # twitterbot.py import tweepy from models import ApplicationData, Answr # 1. Login auth = tweepy.BasicAuthHandler(&quot;answrit&quot;, &quot;the_password&quot;) api = tweepy.API(auth) logging.info('Login done!') # 2. Follow back who follows me followers = api.followers() friends = api.friends() to_follow = [x for x in followers if x not in friends] for user in to_follow: try : user.follow() except tweepy.TweepError, e: logging.warning(e) Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine
  • 29. Twitter bot (cron + WS) # twitterbot.py (cont.) # 3. Read last mentions last_id = ApplicationData.getLastAnswredTweetId() if not last_id: mentions = api.mentions(count = 200) else : mentions = api.mentions(count = 200, since_id = last_id) # 4. Random answr for status in mentions: answr = Answr.get_random() api.update_status(&quot;@%s %s&quot; % (status.author.screen_name, answr.text), status.id) if status.id > last_id: last_id = status.id # 5. Save the last ID if last_id: ApplicationData.setLastAnswredTweetId(last_id) Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine
  • 30. Twitter bot (cron + WS) # cron.yaml cron: - description: answr to people url: /twitterbot schedule: every 1 mins # (part of) app.yaml - url: /twitterbot login: admin script: twitterbot.py Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine DEMO! (if Murphy allows it..) Tweet something to @answrit (like: @answrit: are you ok?)
  • 31. Chat bot (XMPP) # (part of) xmpp.py from google.appengine.api import xmpp from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app from models import Answr class XMPPHandler(webapp.RequestHandler): def post(self): message = xmpp.Message(self.request.POST) message.reply(Answr.get_random().text) application = webapp.WSGIApplication([('/_ah/xmpp/message/chat/', XMPPHandler)], debug=True) Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine
  • 32. Chat bot (XMPP) # (significant part of) app.yaml - url: /_ah/xmpp/message/chat/ script: xmpp.py inbound_services: - xmpp_message Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine DEMO! Add to your XMPP buddy list [email_address] (GTalk is fine), and ask him questions!
  • 33. References http://en.wikipedia.org - Articles on Cloud Computing, Affero GPL and others Google Inc – aa.vv. - “Bigtable: a distributed storage system for structured data” - OSDI 2006 Dan Sanderson - “Programming Google App Engine” - O' Reilly / Google Press – 2009 Google App Engine home page - http://www.appspot.com Simon Willison - “I've (probably) been using Google App Engine for a week longer than you have” - Slides from Barcamp London 4 – 2008” (referred in this document as App Engine Intro ) Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine
  • 35.
  • 37. KVM Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine
  • 38. Cloud Freedom - AGPL Software licenses like the General Public License state rights of those who get the program, not of those who use the program via a network The GNU Affero General Public License (AGPL) require the availability of source code when the licensed code is deployed as a network service. http://www.gnu.org/licenses/agpl-3.0.html Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine
  • 39. Python vs. Java Image taken from stacktrace.it: http://stacktrace.it/2009/05/google-app-engine/ Andrea Spadaccini - @lupino3 – Introduzione a Google App Engine