Google App Engine
|Initial release||April 7, 2008|
|Stable release||1.9.0 / 11 February 2014|
|Written in||Python, Java, Go, PHP|
Google App Engine (often referred to as GAE or simply App Engine) is a platform as a service (PaaS) cloud computing platform for developing and hosting web applications in Google-managed data centers. Applications are sandboxed and run across multiple servers. App Engine offers automatic scaling for web applications—as the number of requests increases for an application, App Engine automatically allocates more resources for the web application to handle the additional demand.
Google App Engine is free up to a certain level of consumed resources. Fees are charged for additional storage, bandwidth, or instance hours required by the application. It was first released as a preview version in April 2008 and came out of preview in September 2011.
- 1 Supported features/restrictions
- 2 Major differences
- 3 Portability concerns
- 4 Backends
- 5 Google Cloud SQL
- 6 Usage quotas
- 7 See also
- 8 References
- 9 Bibliography
- 10 External links
Runtimes and framework
Currently, the supported programming languages are Python, Java (and, by extension, other JVM languages such as Groovy, JRuby, Scala, Clojure), Go, and PHP. Go and PHP are in experimental status. Google has said that it plans to support more languages in the future, and that the Google App Engine has been written to be language independent.
Python web frameworks that run on Google App Engine include Django, CherryPy, Pyramid, Flask, web2py and webapp2, as well as a custom Google-written webapp framework and several others designed specifically for the platform that emerged since the release. Any Python framework that supports the WSGI using the CGI adapter can be used to create an application; the framework can be uploaded with the developed application. Third-party libraries written in pure Python may also be uploaded.
Google App Engine supports many Java standards and frameworks. Core to this is the servlet 2.5 technology using the open-source Jetty Web Server, along with accompanying technologies such as JSP. JavaServer Faces operates with some workarounds. Though the datastore used may be unfamiliar to programmers, it is easily accessed and supported with JPA. JDO and other methods of reading and writing data are also provided. The Spring Framework works with GAE, however the Spring Security module (if used) requires workarounds. Apache Struts 1 is supported, and Struts 2 runs with workarounds.
The Django web framework and applications running on it can be used on App Engine with modification. Django-nonrel aims to allow Django to work with non-relational databases and the project includes support for App Engine.
Applications developed for the Grails web application framework was meant to be modified and deployed to Google App Engine with very little effort using the App Engine Plugin, but is no more because grails GAE plugin project is not operational anymore.
Reliability and Support
App Engine is designed in such a way that it can sustain multiple datacenter outages without any downtime. This resilience to downtime is shown by the statistic that the High Replication Datastore saw 0% downtime over a period of a year.
Paid support from Google engineers is offered as part of Premier Accounts. Free support is offered in the App Engine Groups and Stack Overflow, however assistance by a Google staff member is not guaranteed.
SDK version 1.2.2 adds support for bulk downloads of data using Python. The open source Python projects gaebar, approcket, and gawsh also allow users to download and backup App Engine data. No method for bulk downloading data from GAE using Java currently exists.
- Developers have read-only access to the filesystem on App Engine. Applications can use only virtual filesystems, like gae-filestore.
- App Engine can only execute code called from an HTTP request (scheduled background tasks allow for self calling HTTP requests).
- Users may upload arbitrary Python modules, but only if they are pure-Python; C and Pyrex modules are not supported.
- Java applications may only use a subset (The JRE Class White List) of the classes from the JRE standard edition.
- Does not support 'naked' domains (without www) like http://example.com. The required alias to ghs.google.com is implemented with a DNS CNAME record in order for changes in Google server IP addresses not to impact the service. This record cannot be used with other DNS records (RFC 1034 section 3.6.2, RFC 1912 section 2.4), including the required Start of Authority for the example.com DNS zone. Suggested workaround is to use the domain registrar HTTP redirection to a subdomain, e.g. "www.example.com".
- Datastore cannot use inequality filters on more than one entity property per query.
- A process started on the server to answer a request can't last more than 60 seconds (with the 1.4.0 release, this restriction does not apply to background jobs anymore).
- Does not support sticky sessions (a.k.a. session affinity), only replicated sessions are supported including limitation of the amount of data being serialized and time for session serialization.
Differences with other application hosting
Compared to other scalable hosting services such as Amazon EC2, App Engine provides more infrastructure to make it easy to write scalable applications, but can only run a limited range of applications designed for that infrastructure.
App Engine's infrastructure removes many of the system administration and development challenges of building applications to scale to hundreds of requests per second and beyond. Google handles deploying code to a cluster, monitoring, failover, and launching application instances as necessary.
While other services let users install and configure nearly any *NIX compatible software, App Engine requires developers to use only its supported languages, APIs, and frameworks. Current APIs allow storing and retrieving data from a BigTable non-relational database; making HTTP requests; sending e-mail; manipulating images; and caching. Existing web applications that require a relational database will not run on App Engine datastore without modification. Google Cloud SQL can be used for App Engine applications requiring a relational MySQL compatible database backend.
Per-day and per-minute quotas restrict bandwidth and CPU use, number of requests served, number of concurrent requests, and calls to the various APIs, and individual requests are terminated if they take more than 60 seconds or return more than 32MB of data.
Differences between SQL and GQL
Google App Engine's datastore has a SQL-like syntax called "GQL". GQL intentionally does not support the Join statement, because it seems to be inefficient when queries span more than one machine. Instead, one-to-many and many-to-many relationships can be accomplished using ReferenceProperty(). This shared-nothing approach allows disks to fail without the system failing. Switching from a relational database to the Datastore requires a paradigm shift for developers when modelling their data.
Unlike a relational database the Datastore API is not relational in the SQL sense.
The Java version supports asynchronous non-blocking queries using the Twig Object Datastore interface. This offers an alternative to using threads for parallel data processing.
Developers worry that the applications will not be portable from App Engine and fear being locked into the technology. In response, there are a number of projects to create open-source back-ends for the various proprietary/closed APIs of app engine, especially the datastore. AppScale and TyphoonAE are two of the open source efforts.
AppScale automatically deploys and scales unmodified Google App Engine applications over popular public and private cloud systems and on-premises clusters. AppScale can run Python, Java, PHP, and Go applications on EC2, Google Compute Engine, Softlayer, Azure and other cloud vendors.
TyphoonAE can run Python App Engine applications on any cloud that support linux machines.
Google Cloud SQL
In Oct 2011, Google previewed a zero maintenance SQL database, which supports JDBC and DB-API. This service allows to create, configure, and use relational databases with App Engine applications. The database engine is MySQL Version 5.1.59 and the database size must be no larger than 10GB.
Google App Engine requires a Google account to get started, and an account may allow the developer to register up to 25 applications. This limit can be increased by Google staff.
Google App Engine defines usage quotas for free applications. Extensions to these quotas can be requested, and application authors can pay for additional resources. Below are limit and quotas defined per application:
|Time per request||60 sec per normal request, 10 minutes for tasks, unlimited for backends|
|HTTP response size||32 MB|
|Datastore item size||1 MB|
Application creators who enable billing pay only for instance hours, bandwidth, storage, and API usage in excess of the free quotas. Free quotas were reduced on May 25, 2009, reduced again on June 22, 2009. but then revised in May 2011 to allow for more infrastructure and pricing changes.
|Quota||Limit (per day)|
|Emails||100 (5000 admin emails)|
|Bandwidth out||1 GB|
|Blob Storage||5 GB|
|XMPP API||10k stanzas|
|Channel API||100 channels opened|
|URLFetch API calls per day||657,000|
- Amazon Web Services
- AWS Elastic Beanstalk
- Engine Yard
- Rackspace Cloud
- Windows Azure
- "Python Runtime Environment - Google App Engine - Google Code". Code.google.com. 1999-02-22. Retrieved 2012-02-14.
- Sanderson, Dan (2009). Programming Google App Engine: Build and Run Scalable Web Apps on Google's Infrastructure. O'Reilly Media. ISBN 978-0-596-52272-8.
- "Quotas - Google App Engine - Google Code". Code.google.com. 1999-02-22. Retrieved 2012-02-14.
- "App Engine Developer Profiles - Google App Engine - Google Code". Code.google.com. 1999-02-22. Retrieved 2012-02-14.
- Sanderson, Dan (2010). Programming Google App Engine: Build and Run Scalable Web Apps on Google's Infrastructure. O'Reilly Media. ISBN 978-0-596-52272-8.
- "Welcome to webapp2! — webapp2 v2.5.1 documentation". Webapp-improved.appspot.com. Retrieved 2012-02-14.
- "AppEngineFrameworks - tipfy - The almighty little framework for Google App Engine - Google Project Hosting". Code.google.com. Retrieved 2012-02-14.
- "What Is Google App Engine? - Google App Engine - Google Code". Code.google.com. 1999-02-22. Retrieved 2012-02-14.
- "webapp Overview - Google App Engine - Google Code". Code.google.com. 1999-02-22. Retrieved 2012-02-14.
- "Google Chose Jetty for App Engine". Infoq.com. 2012-07-13. Retrieved 2012-07-17.
- "WillItPlayInJava - googleappengine - Lists the level of compatibility of various Java technologies and App Engine - Google App Engine - Google Project Hosting". Code.google.com. Retrieved 2012-02-14.
- "Django-nonrel - NoSQL support for Django". All Buttons Pressed. 2010-02-04. Retrieved 2012-07-17.
- "djangoappengine - Django App Engine backends (DB, email, etc.)". All Buttons Pressed. Retrieved 2012-07-17.
- "Plugin - Grails AppEngine plugin". Grails. 2009-07-27. Retrieved 2012-07-17.
- "App Engine Service Level Agreement - Google App Engine - Google Code". Code.google.com. 1999-02-22. Retrieved 2012-02-14.
- "Google App Engine Blog: Happy Birthday High Replication Datastore: 1 year, 100,000 apps, 0% downtime". Googleappengine.blogspot.com. 2012-01-05. Retrieved 2012-02-14.
- "Premier Accounts - Google App Engine - Google Code". Code.google.com. 1999-02-22. Retrieved 2012-02-14.
- "Uploading and Downloading Data - Google App Engine - Google Code". Code.google.com. 1999-02-22. Retrieved 2012-02-14.
- aral. "aral/gaebar". GitHub. Retrieved 2012-02-14.
- "approcket - Live synchronization between AppEngine and MySQL - Google Project Hosting". Code.google.com. Retrieved 2012-02-14.
- "gawsh - Google Apps Web Service Helpers - Google Project Hosting". Code.google.com. Retrieved 2012-02-14.
- "gae-filestore - Simple Virtual File System on Google App Engine DataStore - Google Project Hosting". Code.google.com. Retrieved 2012-02-14.
- "The JRE Class White List - Google App Engine - Google Developers". Developers.google.com. 1999-02-22. Retrieved 2013-06-14.
- "Issue 777 - googleappengine - Officially Support Naked Domains for GAE Apps - Google App Engine - Google Project Hosting". Code.google.com. 2008-10-08. Retrieved 2012-02-14.
- "Google App Engine Datastore Gotchas « aleatory". Aleatory.clientsideweb.net. 2009-11-28. Retrieved 2012-02-14.
- "Python Runtime Environment - Google App Engine". 2009-11-10. Retrieved 2009-11-10.
- Introducing Google App Engine part 3
- "Modeling Entity Relationships - Google App Engine — Google Developers". Code.google.com. 2012-06-26. Retrieved 2012-07-17.
- Saturday (2008-11-22). "Google Architecture". High Scalability. Retrieved 2012-07-17.
- "twig-persist - Object Datastore for Google App Engine - Google Project Hosting". Code.google.com. Retrieved 2012-07-17.
- Gallagher, Sean (2008-04-09). "Analysis: Google App Engine alluring, will be hard to escape". Ars Technica. Retrieved 2012-07-17.
- "typhoonae - Typhoon App Engine - Google Project Hosting". Code.google.com. Retrieved 2012-07-17.
- AppScale Launches As An Open-Source Backup Equivalent To Google App Engine. TechCrunch (2013-06-24). Retrieved on 2013-09-18.
- [dead link]
- Google I/O 2011: App Engine Backends on YouTube
- Backends Python API Overview
- Google Cloud SQL: your database in the cloud
- Google Cloud SQL: Sample Application
- "Understanding Application Quotas with Google App Engine". Retrieved 2010-04-16.
- "Quotas - Google App Engine — Google Developers". Code.google.com. 2012-06-30. Retrieved 2012-07-17.
- "Google App Engine Blog: The Year Ahead for Google App Engine!". Google App Engine blog. Retrieved 11 May 2011.
- "Google App Engine - Pricing and Features". Google. Retrieved 16 Nov 2012.
- Sanderson, Dan (October 26, 2012), Programming Google App Engine (2nd ed.), O'Reilly Media, p. 536, ISBN 978-1449398262
- de Jonge, Adriaan (October 31, 2011), Essential App Engine: Building High-Performance Java Apps with Google App Engine (1st ed.), Addison-Wesley Professional, p. 304, ISBN 0-321-74263-X
- Guermeur, Daniel; Unruh, Amy (November 24, 2010), Google App Engine Java and GWT Application Development (1st ed.), Packt Publishing, p. 480, ISBN 1-84969-044-8
- Roche, Kyle; Douglas, Jeff (December 31, 2009), Beginning Java Google App Engine (1st ed.), Apress, p. 375, ISBN 1-4302-2553-X
- Sanderson, Dan (November 23, 2009), Programming Google App Engine (1st ed.), O'Reilly Media, p. 400, ISBN 0-596-52272-X
- Severance, Charles (May 22, 2009), Using Google App Engine (1st ed.), O'Reilly Media, p. 262, ISBN 0-596-80069-X
- Ciurana, Eugene (February 2, 2009), Developing with Google App Engine (1st ed.), Apress, p. 164, ISBN 1-4302-1831-2
- Official website
- Release notes
- Google App Engine - Run your web applications on Google's infrastructure - a technical talk by Google engineer Guido van Rossum at Stanford University. (online video archive)
- Java Frameworks and libraries supported
- Web2py book -- online documentation -- Google App Engine deployment recipe
- Google Cloud SQL Sample Projects