SlideShare una empresa de Scribd logo
1 de 22
Descargar para leer sin conexión
Google App engine

Senthilkumar M
Copyright@share2create License

1
What is Google App Engine?
• Google App Engine is a complete development
stack that uses familiar technologies to build
and host applications on the
same infrastructure used at Google.

Copyright@share2create License

2
Four runtime environments

PHP

Python

Java

GO
Copyright@share2create License

3
Your code runs in a sandbox
• Secure environment that provides limited
access to the underlying operating system.
• The sandbox allows App Engine to
• distribute web requests across multiple servers
• start and stop servers to meet traffic demands
• isolate apps in a secure, reliable environment
• abstract hardware, operating system and
physical location of the web server
Copyright@share2create License

4
Sandbox limitations
• outbound connections: only through the provided URL
fetch and email services or the experimental Socket API.
• inbound connections: only HTTP(s) on ports 80/443.
• File system access: writing files is not allowed. An
application can read only files uploaded with the
application code.
• no native code: libraries that depend on native code
are generally not available.
• time limits: app code must terminate within given time
limits. (60s for web requests, 10m for tasks but
unlimited time for backend jobs)
Copyright@share2create License

5
Storing data
• Three options for data storage

App Engine Data store
NoSQL schemeless data
storage built in GAE

Google Cloud SQL
relational SQL database
service based on MySQL

Copyright@share2create License

Google Cloud Storage
file based storage

6
What special in host on GAE
• No fixed cost pay only on what you use
• FREE!!!!
• Your APP running on the platform which
powers Google service.
• App can be scalable to any extend.

Copyright@share2create License

7
Lets Run your First App
• Download the SDK
• Go
to https://developers.google.com/appengine/
downloads and grab the Python installer.
• Download Python 2.7 installer.
• Go to
http://www.python.org/download/releases/2.7/
Copyright@share2create License

8
Startup the Launcher

Copyright@share2create License

9
Create a Sample Application

Copyright@share2create License

10
Lets write your first code
• App.yaml => It is configuration file for your application

Copyright@share2create License

11
Main.py
#!/usr/bin/env python
import webapp2
class MainHandler(webapp2.RequestHandler):
def get(self):
self.response.write('Hello world!')
app = webapp2.WSGIApplication([
('/', MainHandler)], debug=True)

Copyright@share2create License

12
Datastore(s)
• There are two implementations of datastore
• The original one is implemented
in google.appengine.ext.db
• The new one is called NDB and it is
implemented in google.appengine.ext.ndb
• They are very similar but not identical
• We will cover NDB
Copyright@share2create License

13
Creating Data store Entity
from google.appengine.ext import ndb
class Contact(ndb.Model):
name = ndb.StringProperty()
email = ndb.StringProperty()
birth_date = ndb.DateProperty()

Copyright@share2create License

14
Querying the Data store
from google.appengine.ext import ndb
def StoresByCity(city, limit):
query = Store.query(Store.city == city).order(Store.name)
return query.fetch(limit, projection=[Store.name, Store.address])

•
•
•
•

The Data store API is Object Oriented.
Queries are objects
Filters and projections are specified by calling methods
Make sure you know the limits!

Copyright@share2create License

15
Querying the Data store with GQL
from google.appengine.ext import ndb
def query_info():
qry = ndb.gql("SELECT * FROM Account WHERE balance < :1", 100)
return qry

• You can write queries with GQL, a SQL-like language.
• GQL is translated to NDB's native query API. (This is the
opposite of what traditional ORM libraries do!)

Copyright@share2create License

16
View templates
<html>
<body>
{% for contact in contacts %}
{% if contact.name %}
<b>{{ contact.name }}</b>
{% else %}
Unnamed contact
{% endif %}
<{{ contact.email }}>
{% endfor %}
<a href="{{ url }}">{{ url_linktext }}</a>
</body>
</html>

If you use webapp2, Django Templates are supported
by default.
Copyright@share2create License

17
Dispatch to view templates
Here is how to render a template in with webapp2

def render_template(self, view_filename, params=None)
if not params:
params = {}
path = os.path.join(os.path.dirname(__file__), 'views', view_filename)
self.response.out.write(template.render(path, params)):

Copyright@share2create License

18
Memcache
• Memcache is a high-performance, distributed
memory object caching system.
• Can be used to minimize hits to the Datastore
or to save transient state information.
from google.appengine.api import memcache
def get_data():
data = memcache.get('key')
if data is not None:
return data
else:
data = self.query_for_data()
memcache.add('key', data, 60)
return data
Copyright@share2create License

19
My sample host apps
•
•
•
•

Check out this links
http://senonscreen.appspot.com/
http://me2mentor.appspot.com/
http://sentengo.appspot.com/

Copyright@share2create License

20
Questions?

Copyright@share2create License

21
Copyright@share2create License

22

Más contenido relacionado

La actualidad más candente

Monitoring OSGi Applications with the Web Console - Carsten Ziegeler
Monitoring OSGi Applications with the Web Console - Carsten ZiegelerMonitoring OSGi Applications with the Web Console - Carsten Ziegeler
Monitoring OSGi Applications with the Web Console - Carsten Ziegelermfrancis
 
K8s security best practices
K8s security best practicesK8s security best practices
K8s security best practicesSharon Vendrov
 
Lecture 10 Networking on Mobile Devices
Lecture 10 Networking on Mobile DevicesLecture 10 Networking on Mobile Devices
Lecture 10 Networking on Mobile DevicesMaksym Davydov
 
From ZERO to REST in an hour
From ZERO to REST in an hour From ZERO to REST in an hour
From ZERO to REST in an hour Cisco DevNet
 
S2GX 2012 - Spring Projects Infrastructure
S2GX 2012 - Spring Projects InfrastructureS2GX 2012 - Spring Projects Infrastructure
S2GX 2012 - Spring Projects InfrastructureGunnar Hillert
 
[1D1]신개념 N스크린 웹 앱 프레임워크 PARS
[1D1]신개념 N스크린 웹 앱 프레임워크 PARS[1D1]신개념 N스크린 웹 앱 프레임워크 PARS
[1D1]신개념 N스크린 웹 앱 프레임워크 PARSNAVER D2
 
Leveraging the strength of OSGi to deliver a convergent IoT Ecosystem - O Log...
Leveraging the strength of OSGi to deliver a convergent IoT Ecosystem - O Log...Leveraging the strength of OSGi to deliver a convergent IoT Ecosystem - O Log...
Leveraging the strength of OSGi to deliver a convergent IoT Ecosystem - O Log...mfrancis
 
Java REST API Framework Comparison - UberConf 2021
Java REST API Framework Comparison - UberConf 2021Java REST API Framework Comparison - UberConf 2021
Java REST API Framework Comparison - UberConf 2021Matt Raible
 

La actualidad más candente (11)

Monitoring OSGi Applications with the Web Console - Carsten Ziegeler
Monitoring OSGi Applications with the Web Console - Carsten ZiegelerMonitoring OSGi Applications with the Web Console - Carsten Ziegeler
Monitoring OSGi Applications with the Web Console - Carsten Ziegeler
 
K8s security best practices
K8s security best practicesK8s security best practices
K8s security best practices
 
Lecture 10 Networking on Mobile Devices
Lecture 10 Networking on Mobile DevicesLecture 10 Networking on Mobile Devices
Lecture 10 Networking on Mobile Devices
 
From ZERO to REST in an hour
From ZERO to REST in an hour From ZERO to REST in an hour
From ZERO to REST in an hour
 
The Spring Update
The Spring UpdateThe Spring Update
The Spring Update
 
S2GX 2012 - Spring Projects Infrastructure
S2GX 2012 - Spring Projects InfrastructureS2GX 2012 - Spring Projects Infrastructure
S2GX 2012 - Spring Projects Infrastructure
 
AppIT
AppITAppIT
AppIT
 
Wayin devops-2013
Wayin devops-2013Wayin devops-2013
Wayin devops-2013
 
[1D1]신개념 N스크린 웹 앱 프레임워크 PARS
[1D1]신개념 N스크린 웹 앱 프레임워크 PARS[1D1]신개념 N스크린 웹 앱 프레임워크 PARS
[1D1]신개념 N스크린 웹 앱 프레임워크 PARS
 
Leveraging the strength of OSGi to deliver a convergent IoT Ecosystem - O Log...
Leveraging the strength of OSGi to deliver a convergent IoT Ecosystem - O Log...Leveraging the strength of OSGi to deliver a convergent IoT Ecosystem - O Log...
Leveraging the strength of OSGi to deliver a convergent IoT Ecosystem - O Log...
 
Java REST API Framework Comparison - UberConf 2021
Java REST API Framework Comparison - UberConf 2021Java REST API Framework Comparison - UberConf 2021
Java REST API Framework Comparison - UberConf 2021
 

Destacado

Google App Engine e PHP
Google App Engine e PHPGoogle App Engine e PHP
Google App Engine e PHPLuiz Messias
 
Webinar: Comenzando con los servicios de AWS
Webinar: Comenzando con los servicios de AWSWebinar: Comenzando con los servicios de AWS
Webinar: Comenzando con los servicios de AWSAmazon Web Services LATAM
 
Webinar: Ask the Architect - Servicios de Storage de AWS
Webinar: Ask the Architect - Servicios de Storage de AWSWebinar: Ask the Architect - Servicios de Storage de AWS
Webinar: Ask the Architect - Servicios de Storage de AWSAmazon Web Services LATAM
 
Arquitectura Orientada a Servicios
Arquitectura Orientada a ServiciosArquitectura Orientada a Servicios
Arquitectura Orientada a ServiciosDamián Rotta
 
Google App Engine Introduction
Google App Engine IntroductionGoogle App Engine Introduction
Google App Engine IntroductionSimon Su
 
Android Cloud to Device Messaging with the Google App Engine
Android Cloud to Device Messaging with the Google App EngineAndroid Cloud to Device Messaging with the Google App Engine
Android Cloud to Device Messaging with the Google App EngineLars Vogel
 
Comenzando con aplicaciones serverless en AWS
Comenzando con aplicaciones serverless en AWSComenzando con aplicaciones serverless en AWS
Comenzando con aplicaciones serverless en AWSAmazon Web Services LATAM
 
Cloud is such stuff as dreams are made on
Cloud is such stuff as dreams are made onCloud is such stuff as dreams are made on
Cloud is such stuff as dreams are made onPatrick Chanezon
 
Gianfranco Gugliandolo Service Oriented Architecture Overview
Gianfranco Gugliandolo Service Oriented Architecture OverviewGianfranco Gugliandolo Service Oriented Architecture Overview
Gianfranco Gugliandolo Service Oriented Architecture OverviewOrlando Huaranga Negrete
 
AWS Black Belt Online Seminar 2017 AWS OpsWorks
AWS Black Belt Online Seminar 2017 AWS OpsWorksAWS Black Belt Online Seminar 2017 AWS OpsWorks
AWS Black Belt Online Seminar 2017 AWS OpsWorksAmazon Web Services Japan
 
Ask the Trainer - Treinamentos e Certificações da AWS
Ask the Trainer - Treinamentos e Certificações da AWSAsk the Trainer - Treinamentos e Certificações da AWS
Ask the Trainer - Treinamentos e Certificações da AWSAmazon Web Services LATAM
 

Destacado (17)

Google App Engine e PHP
Google App Engine e PHPGoogle App Engine e PHP
Google App Engine e PHP
 
04 servicios de_google[1]
04 servicios de_google[1]04 servicios de_google[1]
04 servicios de_google[1]
 
Cloud Computing VS SOA
Cloud Computing VS SOACloud Computing VS SOA
Cloud Computing VS SOA
 
Presentacion
PresentacionPresentacion
Presentacion
 
Webinar: Comenzando con los servicios de AWS
Webinar: Comenzando con los servicios de AWSWebinar: Comenzando con los servicios de AWS
Webinar: Comenzando con los servicios de AWS
 
Webinar: Ask the Architect - Servicios de Storage de AWS
Webinar: Ask the Architect - Servicios de Storage de AWSWebinar: Ask the Architect - Servicios de Storage de AWS
Webinar: Ask the Architect - Servicios de Storage de AWS
 
Arquitectura Orientada a Servicios
Arquitectura Orientada a ServiciosArquitectura Orientada a Servicios
Arquitectura Orientada a Servicios
 
Google App Engine Introduction
Google App Engine IntroductionGoogle App Engine Introduction
Google App Engine Introduction
 
Android Cloud to Device Messaging with the Google App Engine
Android Cloud to Device Messaging with the Google App EngineAndroid Cloud to Device Messaging with the Google App Engine
Android Cloud to Device Messaging with the Google App Engine
 
DevOps en AWS
DevOps en AWS DevOps en AWS
DevOps en AWS
 
Comenzando con aplicaciones serverless en AWS
Comenzando con aplicaciones serverless en AWSComenzando con aplicaciones serverless en AWS
Comenzando con aplicaciones serverless en AWS
 
Cloud is such stuff as dreams are made on
Cloud is such stuff as dreams are made onCloud is such stuff as dreams are made on
Cloud is such stuff as dreams are made on
 
Gianfranco Gugliandolo Service Oriented Architecture Overview
Gianfranco Gugliandolo Service Oriented Architecture OverviewGianfranco Gugliandolo Service Oriented Architecture Overview
Gianfranco Gugliandolo Service Oriented Architecture Overview
 
AWS Black Belt Online Seminar 2017 AWS OpsWorks
AWS Black Belt Online Seminar 2017 AWS OpsWorksAWS Black Belt Online Seminar 2017 AWS OpsWorks
AWS Black Belt Online Seminar 2017 AWS OpsWorks
 
Bases de datos en la nube con AWS
Bases de datos en la nube con AWSBases de datos en la nube con AWS
Bases de datos en la nube con AWS
 
Almacenamiento en la nube con AWS
Almacenamiento en la nube con AWSAlmacenamiento en la nube con AWS
Almacenamiento en la nube con AWS
 
Ask the Trainer - Treinamentos e Certificações da AWS
Ask the Trainer - Treinamentos e Certificações da AWSAsk the Trainer - Treinamentos e Certificações da AWS
Ask the Trainer - Treinamentos e Certificações da AWS
 

Similar a Google app engine

Cloud Platforms for Java
Cloud Platforms for JavaCloud Platforms for Java
Cloud Platforms for Java3Pillar Global
 
Google app-engine-with-python
Google app-engine-with-pythonGoogle app-engine-with-python
Google app-engine-with-pythonDeepak Garg
 
Building and managing applications fast for IBM i
Building and managing applications fast for IBM iBuilding and managing applications fast for IBM i
Building and managing applications fast for IBM iZend by Rogue Wave Software
 
Android Study Jam 2021 Session 4 slides
Android Study Jam 2021 Session 4 slidesAndroid Study Jam 2021 Session 4 slides
Android Study Jam 2021 Session 4 slidesBoston Android
 
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
 
App_Engine_PPT..........................
App_Engine_PPT..........................App_Engine_PPT..........................
App_Engine_PPT..........................HassamShahid2
 
Googleappengineintro 110410190620-phpapp01
Googleappengineintro 110410190620-phpapp01Googleappengineintro 110410190620-phpapp01
Googleappengineintro 110410190620-phpapp01Tony Frame
 
Google appenginejava.ppt
Google appenginejava.pptGoogle appenginejava.ppt
Google appenginejava.pptYoung Alista
 
Google App Engine - Overview #1
Google App Engine - Overview #1Google App Engine - Overview #1
Google App Engine - Overview #1Kay Kim
 
Custom Runtimes for the Cloud
Custom Runtimes for the CloudCustom Runtimes for the Cloud
Custom Runtimes for the CloudCloudBees
 
Boot camp 2010_app_engine_101
Boot camp 2010_app_engine_101Boot camp 2010_app_engine_101
Boot camp 2010_app_engine_101ikailan
 
Cannibalising The Google App Engine
Cannibalising The  Google  App  EngineCannibalising The  Google  App  Engine
Cannibalising The Google App Enginecatherinewall
 
API Services: Building State-of-the-Art APIs
API Services: Building State-of-the-Art APIsAPI Services: Building State-of-the-Art APIs
API Services: Building State-of-the-Art APIsApigee | Google Cloud
 

Similar a Google app engine (20)

Cloud Platforms for Java
Cloud Platforms for JavaCloud Platforms for Java
Cloud Platforms for Java
 
Google app-engine-with-python
Google app-engine-with-pythonGoogle app-engine-with-python
Google app-engine-with-python
 
Building and managing applications fast for IBM i
Building and managing applications fast for IBM iBuilding and managing applications fast for IBM i
Building and managing applications fast for IBM i
 
Mobile web development
Mobile web developmentMobile web development
Mobile web development
 
Android Study Jam 2021 Session 4 slides
Android Study Jam 2021 Session 4 slidesAndroid Study Jam 2021 Session 4 slides
Android Study Jam 2021 Session 4 slides
 
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
 
App_Engine_PPT.ppt
App_Engine_PPT.pptApp_Engine_PPT.ppt
App_Engine_PPT.ppt
 
App_Engine_PPT..........................
App_Engine_PPT..........................App_Engine_PPT..........................
App_Engine_PPT..........................
 
App_Engine_PPT.ppt
App_Engine_PPT.pptApp_Engine_PPT.ppt
App_Engine_PPT.ppt
 
App_Engine_PPT.ppt
App_Engine_PPT.pptApp_Engine_PPT.ppt
App_Engine_PPT.ppt
 
Googleappengineintro 110410190620-phpapp01
Googleappengineintro 110410190620-phpapp01Googleappengineintro 110410190620-phpapp01
Googleappengineintro 110410190620-phpapp01
 
Google appenginejava.ppt
Google appenginejava.pptGoogle appenginejava.ppt
Google appenginejava.ppt
 
Google App Engine
Google App EngineGoogle App Engine
Google App Engine
 
Rahul_Resume
Rahul_ResumeRahul_Resume
Rahul_Resume
 
Google App Engine - Overview #1
Google App Engine - Overview #1Google App Engine - Overview #1
Google App Engine - Overview #1
 
Custom Runtimes for the Cloud
Custom Runtimes for the CloudCustom Runtimes for the Cloud
Custom Runtimes for the Cloud
 
Boot camp 2010_app_engine_101
Boot camp 2010_app_engine_101Boot camp 2010_app_engine_101
Boot camp 2010_app_engine_101
 
Session-1.pptx
Session-1.pptxSession-1.pptx
Session-1.pptx
 
Cannibalising The Google App Engine
Cannibalising The  Google  App  EngineCannibalising The  Google  App  Engine
Cannibalising The Google App Engine
 
API Services: Building State-of-the-Art APIs
API Services: Building State-of-the-Art APIsAPI Services: Building State-of-the-Art APIs
API Services: Building State-of-the-Art APIs
 

Más de Senthilkumar Murugesan (8)

Io t in industrial application
Io t in industrial applicationIo t in industrial application
Io t in industrial application
 
IoT in cloud storage
IoT in cloud storageIoT in cloud storage
IoT in cloud storage
 
SaveMom Pitch
SaveMom PitchSaveMom Pitch
SaveMom Pitch
 
Savemom talk
Savemom talkSavemom talk
Savemom talk
 
Real timechat firebase
Real timechat firebaseReal timechat firebase
Real timechat firebase
 
Startup engineering summer_course
Startup engineering summer_courseStartup engineering summer_course
Startup engineering summer_course
 
Internet of things
Internet of thingsInternet of things
Internet of things
 
How create google forms for survey
How create google forms for surveyHow create google forms for survey
How create google forms for survey
 

Último

Blockchain_TezosDeveloperCommunitySNSCE.pdf
Blockchain_TezosDeveloperCommunitySNSCE.pdfBlockchain_TezosDeveloperCommunitySNSCE.pdf
Blockchain_TezosDeveloperCommunitySNSCE.pdfVISHNURAJSSNSCEAD
 
ASDFSDFASDFASDFASDFOUIASHDFOIASUD FOIJSADO;IFJOISADJF
ASDFSDFASDFASDFASDFOUIASHDFOIASUD FOIJSADO;IFJOISADJFASDFSDFASDFASDFASDFOUIASHDFOIASUD FOIJSADO;IFJOISADJF
ASDFSDFASDFASDFASDFOUIASHDFOIASUD FOIJSADO;IFJOISADJFJulia Kaye
 
127. Reviewer Certificate in BP International
127. Reviewer Certificate in BP International127. Reviewer Certificate in BP International
127. Reviewer Certificate in BP InternationalManu Mitra
 
wealth_spend_bharatpeVerse_Analysis .pptx
wealth_spend_bharatpeVerse_Analysis .pptxwealth_spend_bharatpeVerse_Analysis .pptx
wealth_spend_bharatpeVerse_Analysis .pptxAnuragBhakuni4
 
reStartEvents March 28th TS/SCI & Above Employer Directory.pdf
reStartEvents March 28th TS/SCI & Above Employer Directory.pdfreStartEvents March 28th TS/SCI & Above Employer Directory.pdf
reStartEvents March 28th TS/SCI & Above Employer Directory.pdfKen Fuller
 
kids gpaddfghtggvgghhhuuuuuhhhgggggy.pptx
kids gpaddfghtggvgghhhuuuuuhhhgggggy.pptxkids gpaddfghtggvgghhhuuuuuhhhgggggy.pptx
kids gpaddfghtggvgghhhuuuuuhhhgggggy.pptxJagrutiSononee
 
Chapter-1 IATA, UFTAA, ICAO, FAA, CAA, ATAB, Conventions
Chapter-1 IATA, UFTAA, ICAO, FAA, CAA, ATAB, ConventionsChapter-1 IATA, UFTAA, ICAO, FAA, CAA, ATAB, Conventions
Chapter-1 IATA, UFTAA, ICAO, FAA, CAA, ATAB, ConventionsMd Shaifullar Rabbi
 
Fireman Resume Strikuingly Text............................
Fireman Resume Strikuingly Text............................Fireman Resume Strikuingly Text............................
Fireman Resume Strikuingly Text............................calvinjamesmappala
 
10 Things That Will Shape the Future of Education.pdf
10 Things That Will Shape the Future of Education.pdf10 Things That Will Shape the Future of Education.pdf
10 Things That Will Shape the Future of Education.pdfEducationView
 
Audhina Nur Afifah Resume & Portofolio_2024.pdf
Audhina Nur Afifah Resume & Portofolio_2024.pdfAudhina Nur Afifah Resume & Portofolio_2024.pdf
Audhina Nur Afifah Resume & Portofolio_2024.pdfaudhinafh1
 
FAHAD HASSAN NOOR || UCP Business School Data Analytics Head Recommended | MB...
FAHAD HASSAN NOOR || UCP Business School Data Analytics Head Recommended | MB...FAHAD HASSAN NOOR || UCP Business School Data Analytics Head Recommended | MB...
FAHAD HASSAN NOOR || UCP Business School Data Analytics Head Recommended | MB...FaHaD .H. NooR
 
Nashon Holloway - Media/Press Kit - Priv
Nashon Holloway - Media/Press Kit - PrivNashon Holloway - Media/Press Kit - Priv
Nashon Holloway - Media/Press Kit - PrivNashonHolloway
 
Moaaz Hassan El-Shayeb - Projects Portfolio
Moaaz Hassan El-Shayeb - Projects PortfolioMoaaz Hassan El-Shayeb - Projects Portfolio
Moaaz Hassan El-Shayeb - Projects Portfoliomoaaz el-shayeb
 
How to Host a Successful Webinar for Success?
How to Host a Successful Webinar for Success?How to Host a Successful Webinar for Success?
How to Host a Successful Webinar for Success?StrengthsTheatre
 
STORY OF SUSAN & JUDY - CEREBRAL PALSY.pptx
STORY OF SUSAN & JUDY - CEREBRAL PALSY.pptxSTORY OF SUSAN & JUDY - CEREBRAL PALSY.pptx
STORY OF SUSAN & JUDY - CEREBRAL PALSY.pptxsheenam bansal
 
asdfasdiofujasloidfoia nslkflsdkaf jljffs
asdfasdiofujasloidfoia nslkflsdkaf jljffsasdfasdiofujasloidfoia nslkflsdkaf jljffs
asdfasdiofujasloidfoia nslkflsdkaf jljffsJulia Kaye
 
Chapter-4 Introduction to Global Distributions System and Computerized Reserv...
Chapter-4 Introduction to Global Distributions System and Computerized Reserv...Chapter-4 Introduction to Global Distributions System and Computerized Reserv...
Chapter-4 Introduction to Global Distributions System and Computerized Reserv...Md Shaifullar Rabbi
 

Último (17)

Blockchain_TezosDeveloperCommunitySNSCE.pdf
Blockchain_TezosDeveloperCommunitySNSCE.pdfBlockchain_TezosDeveloperCommunitySNSCE.pdf
Blockchain_TezosDeveloperCommunitySNSCE.pdf
 
ASDFSDFASDFASDFASDFOUIASHDFOIASUD FOIJSADO;IFJOISADJF
ASDFSDFASDFASDFASDFOUIASHDFOIASUD FOIJSADO;IFJOISADJFASDFSDFASDFASDFASDFOUIASHDFOIASUD FOIJSADO;IFJOISADJF
ASDFSDFASDFASDFASDFOUIASHDFOIASUD FOIJSADO;IFJOISADJF
 
127. Reviewer Certificate in BP International
127. Reviewer Certificate in BP International127. Reviewer Certificate in BP International
127. Reviewer Certificate in BP International
 
wealth_spend_bharatpeVerse_Analysis .pptx
wealth_spend_bharatpeVerse_Analysis .pptxwealth_spend_bharatpeVerse_Analysis .pptx
wealth_spend_bharatpeVerse_Analysis .pptx
 
reStartEvents March 28th TS/SCI & Above Employer Directory.pdf
reStartEvents March 28th TS/SCI & Above Employer Directory.pdfreStartEvents March 28th TS/SCI & Above Employer Directory.pdf
reStartEvents March 28th TS/SCI & Above Employer Directory.pdf
 
kids gpaddfghtggvgghhhuuuuuhhhgggggy.pptx
kids gpaddfghtggvgghhhuuuuuhhhgggggy.pptxkids gpaddfghtggvgghhhuuuuuhhhgggggy.pptx
kids gpaddfghtggvgghhhuuuuuhhhgggggy.pptx
 
Chapter-1 IATA, UFTAA, ICAO, FAA, CAA, ATAB, Conventions
Chapter-1 IATA, UFTAA, ICAO, FAA, CAA, ATAB, ConventionsChapter-1 IATA, UFTAA, ICAO, FAA, CAA, ATAB, Conventions
Chapter-1 IATA, UFTAA, ICAO, FAA, CAA, ATAB, Conventions
 
Fireman Resume Strikuingly Text............................
Fireman Resume Strikuingly Text............................Fireman Resume Strikuingly Text............................
Fireman Resume Strikuingly Text............................
 
10 Things That Will Shape the Future of Education.pdf
10 Things That Will Shape the Future of Education.pdf10 Things That Will Shape the Future of Education.pdf
10 Things That Will Shape the Future of Education.pdf
 
Audhina Nur Afifah Resume & Portofolio_2024.pdf
Audhina Nur Afifah Resume & Portofolio_2024.pdfAudhina Nur Afifah Resume & Portofolio_2024.pdf
Audhina Nur Afifah Resume & Portofolio_2024.pdf
 
FAHAD HASSAN NOOR || UCP Business School Data Analytics Head Recommended | MB...
FAHAD HASSAN NOOR || UCP Business School Data Analytics Head Recommended | MB...FAHAD HASSAN NOOR || UCP Business School Data Analytics Head Recommended | MB...
FAHAD HASSAN NOOR || UCP Business School Data Analytics Head Recommended | MB...
 
Nashon Holloway - Media/Press Kit - Priv
Nashon Holloway - Media/Press Kit - PrivNashon Holloway - Media/Press Kit - Priv
Nashon Holloway - Media/Press Kit - Priv
 
Moaaz Hassan El-Shayeb - Projects Portfolio
Moaaz Hassan El-Shayeb - Projects PortfolioMoaaz Hassan El-Shayeb - Projects Portfolio
Moaaz Hassan El-Shayeb - Projects Portfolio
 
How to Host a Successful Webinar for Success?
How to Host a Successful Webinar for Success?How to Host a Successful Webinar for Success?
How to Host a Successful Webinar for Success?
 
STORY OF SUSAN & JUDY - CEREBRAL PALSY.pptx
STORY OF SUSAN & JUDY - CEREBRAL PALSY.pptxSTORY OF SUSAN & JUDY - CEREBRAL PALSY.pptx
STORY OF SUSAN & JUDY - CEREBRAL PALSY.pptx
 
asdfasdiofujasloidfoia nslkflsdkaf jljffs
asdfasdiofujasloidfoia nslkflsdkaf jljffsasdfasdiofujasloidfoia nslkflsdkaf jljffs
asdfasdiofujasloidfoia nslkflsdkaf jljffs
 
Chapter-4 Introduction to Global Distributions System and Computerized Reserv...
Chapter-4 Introduction to Global Distributions System and Computerized Reserv...Chapter-4 Introduction to Global Distributions System and Computerized Reserv...
Chapter-4 Introduction to Global Distributions System and Computerized Reserv...
 

Google app engine

  • 1. Google App engine Senthilkumar M Copyright@share2create License 1
  • 2. What is Google App Engine? • Google App Engine is a complete development stack that uses familiar technologies to build and host applications on the same infrastructure used at Google. Copyright@share2create License 2
  • 4. Your code runs in a sandbox • Secure environment that provides limited access to the underlying operating system. • The sandbox allows App Engine to • distribute web requests across multiple servers • start and stop servers to meet traffic demands • isolate apps in a secure, reliable environment • abstract hardware, operating system and physical location of the web server Copyright@share2create License 4
  • 5. Sandbox limitations • outbound connections: only through the provided URL fetch and email services or the experimental Socket API. • inbound connections: only HTTP(s) on ports 80/443. • File system access: writing files is not allowed. An application can read only files uploaded with the application code. • no native code: libraries that depend on native code are generally not available. • time limits: app code must terminate within given time limits. (60s for web requests, 10m for tasks but unlimited time for backend jobs) Copyright@share2create License 5
  • 6. Storing data • Three options for data storage App Engine Data store NoSQL schemeless data storage built in GAE Google Cloud SQL relational SQL database service based on MySQL Copyright@share2create License Google Cloud Storage file based storage 6
  • 7. What special in host on GAE • No fixed cost pay only on what you use • FREE!!!! • Your APP running on the platform which powers Google service. • App can be scalable to any extend. Copyright@share2create License 7
  • 8. Lets Run your First App • Download the SDK • Go to https://developers.google.com/appengine/ downloads and grab the Python installer. • Download Python 2.7 installer. • Go to http://www.python.org/download/releases/2.7/ Copyright@share2create License 8
  • 10. Create a Sample Application Copyright@share2create License 10
  • 11. Lets write your first code • App.yaml => It is configuration file for your application Copyright@share2create License 11
  • 12. Main.py #!/usr/bin/env python import webapp2 class MainHandler(webapp2.RequestHandler): def get(self): self.response.write('Hello world!') app = webapp2.WSGIApplication([ ('/', MainHandler)], debug=True) Copyright@share2create License 12
  • 13. Datastore(s) • There are two implementations of datastore • The original one is implemented in google.appengine.ext.db • The new one is called NDB and it is implemented in google.appengine.ext.ndb • They are very similar but not identical • We will cover NDB Copyright@share2create License 13
  • 14. Creating Data store Entity from google.appengine.ext import ndb class Contact(ndb.Model): name = ndb.StringProperty() email = ndb.StringProperty() birth_date = ndb.DateProperty() Copyright@share2create License 14
  • 15. Querying the Data store from google.appengine.ext import ndb def StoresByCity(city, limit): query = Store.query(Store.city == city).order(Store.name) return query.fetch(limit, projection=[Store.name, Store.address]) • • • • The Data store API is Object Oriented. Queries are objects Filters and projections are specified by calling methods Make sure you know the limits! Copyright@share2create License 15
  • 16. Querying the Data store with GQL from google.appengine.ext import ndb def query_info(): qry = ndb.gql("SELECT * FROM Account WHERE balance < :1", 100) return qry • You can write queries with GQL, a SQL-like language. • GQL is translated to NDB's native query API. (This is the opposite of what traditional ORM libraries do!) Copyright@share2create License 16
  • 17. View templates <html> <body> {% for contact in contacts %} {% if contact.name %} <b>{{ contact.name }}</b> {% else %} Unnamed contact {% endif %} <{{ contact.email }}> {% endfor %} <a href="{{ url }}">{{ url_linktext }}</a> </body> </html> If you use webapp2, Django Templates are supported by default. Copyright@share2create License 17
  • 18. Dispatch to view templates Here is how to render a template in with webapp2 def render_template(self, view_filename, params=None) if not params: params = {} path = os.path.join(os.path.dirname(__file__), 'views', view_filename) self.response.out.write(template.render(path, params)): Copyright@share2create License 18
  • 19. Memcache • Memcache is a high-performance, distributed memory object caching system. • Can be used to minimize hits to the Datastore or to save transient state information. from google.appengine.api import memcache def get_data(): data = memcache.get('key') if data is not None: return data else: data = self.query_for_data() memcache.add('key', data, 60) return data Copyright@share2create License 19
  • 20. My sample host apps • • • • Check out this links http://senonscreen.appspot.com/ http://me2mentor.appspot.com/ http://sentengo.appspot.com/ Copyright@share2create License 20