Google App Engine
Alexander Zahariev
Helsinki University of Technology
a.zahariev@abv.bg
Abstract
Cloud computing becomes more popular day by day. The
“dream” of users to “to get rid” of administrators, huge in-
vestments on expensive hardware and human resources be-
comes true. The goal of this paper is to present a general
overview of the new coming service offered by Google com-
pany - Google App Engine. “What is it for?”, “What can I do with
the system?” and “How does it work?” are some of the
questions on which this paper will try to give an answer. In
addition, brief overview and description of “cloud com-puting”
and comparison of Google App Engine with other similar
products will be provided to the reader as well.
KEYWORDS: Internet, Web Based Application, Web De-
velopment, Cloud Computing
1 Introduction
shows what can be done with the system. Sec.5
Before we start, lets give a brief explanation of what is presents brief comparison between the three leading
“Cloud Computing?” Computing model in which different products in this area - Google App Engine, Amazon Web
tasks are assigned using combination of connection, Services and Mi-crosoft Azure Service Platform. And
software and services accessed over a network is called finally in Sec.6 some discussions, conclusions and
“Cloud Com-puting”. And this combination of connections summarize of this paper will be provided to the reader.
and servers is known as “the cloud”(Fig.1). With simple
words us-ing this technology, users are able to access
supercomputer-level power using thin connection or other 2 What is it for?
access point like iPhone, BlackBerry or laptop whenever
they need them. Be-cause of this “Cloud Computing” is also So what is Google App Engine? According Kevin Gibbs which is
described as “On-Demand Computing”[8]. App Engine Tech Lead, Google App Engine is “a system that
One of the major advantages is that users don’t need to exposes various pieces of Google’s scalable in-frastructure so
have any pervious understanding, knowledge, proficiency that you can write server-side applications on top of them” [3].
how to control technology infrastructure or “the cloud”, Simply this is a platform which allows users to run and host
which supports them. This concept join together several their web applications on Google’s in-frastructure. These
technology trends associated to internet which main goal is applications are easy to build, easy to maintain and easy to
satisfying the computing needs of the customers. These scale whenever traffic and data storage needed. By using
tech-nology trends are Infrastructure as a Service (IaaS), Google’s App Engine, there are no servers to maintain and no
Platform as a Service (PaaS), and Software as a Service administrators needed. The idea is user just to upload his
(Saas). We are going to focus on Saas technology and two application and it is ready to serve its own customers. User has
major exam-ples of Saas vendors are Salesforce.com and a choice either his product to be served by the free domain
Google Apps. Both of them provide universal commerce appspot.com or to allow Google Apps to serve it from domain
solutions online that are accessed from a web browser, and chosen by the customer. Google also provide the user with the
at the same time software and data are stored on the option to limit the access of the ap-plication within the members
company’s servers. The name “cloud” is used as a symbol of his own organization or to share it with the rest of the world.
for the Internet, based on how the Internet is visualized in The starting packet is free of charge and additional obligation.
computer network diagrams [10]. All the user have to do is to sign up for a free account, and then
This paper is divided into 6 sections. Sec.2 explains ac- to develop and pub-lish his own application. The starting
tually what is Google Application Engine. Sec.3 Reveals package includes up to 500MB of storage and enough CPU
how the system works and the requirements for it. Sec.4 power and bandwidth to
TKK T-110.5190 Seminar on Internetworking
serve 5 million page views per month [1]. † Application code only runs in response to a web re-
quest, and must return response data within 30 seconds.
A request handler cannot spawn a sub-process or exe-
3 How does it work? cute code after the response has been sent.
This section provides more detailed information about
how the system actually works, and what kind of
requirements it has to create an application.
3.1 The Application Environment
With this new service provided by Google it is really easy
to create reliably applications which runs under heavy
load and which use large amounts of data. Several key
features are included in the environment[1]:
† dynamic web serving, with full support for
common web technologies
† persistent storage with queries, sorting and
transactions
† automatic scaling and load balancing
† APIs for authenticating users and sending
email using Google Accounts
† a fully featured local development environment
that simulates Google App Engine on user’s
computer
Implementation of Google App Engine applications is done
under Python programming language. Full Python lan-guage
support along with most of the Python standard library comes
with standard runtime environment. Currently Python is the only
supported language by Google App Engine, but improvements
to support other languages are in progress[1].
3.2 The Sandbox
All user applications operate in a secure environment. This
environment has a limited access to the underlying operating
system. Because of these limitations, App Engine is able to
distribute application’s web requests across various servers,
which allows starting and stopping the servers to meet traffic
demand. The sandbox separates the application in its own
protected and reliable environment which is independent of the
operating system, hardware or the physical location of the web
server. Here are some of the restrictions which are included in
the sandbox environment[1]:
† An application can only access other computers
on the Internet through the provided URL fetch and
email ser-vices and APIs. Other computers can only
connect to the application by making HTTP (or
HTTPS) requests on the standard ports.
† An application cannot write to the file system and
can read files, but only files uploaded with the
application code. The application must use the App
Engine datas-tore for all data that persists between
requests.
3.3 The Python Runtime Environment
3.3.1 The Datastore
The Runtime environment provided by App Engine uses Python
programming language, but other languages as well are taken A powerful distributed data storage service is present by
into account to be supported in the near future. The current App Engine. A query engine and transactional storing
supported version of the Python runtime environment is 2.5.2 accessible through a simple API, both running on
[1], which includes the standard Python library. All methods, Google’s scalable in-frastructure is provided with the App
except those ones which violates the sandbox re-striction, like Engine datastore. This Python interface includes a data
attempting to open a socket or write into a file, are included in modeling API and similar to Structured Query Language
the library. The modules which features are not supported by (SQL) called GQL. Using these features developing data
the standard are disabled, and the part of code which imports dependent applications should not be more difficult than
them will raise an error. All applications code must be written creating it using normal web hosting service [12].
entirely only in Python language and code with extensions Similar like distributed web servers which grow with
written in C is not supported. the amount of traffic, the distributed datastore grows as
Rich APIs for the Google Accounts, URL fetch, Data-store well when the amount of data raise. Unlike other
and email servers are provided by the Python en-vironment. traditional data-store, the App Engine datastore supports
Simple web application framework called “webapp”[1] which set of properties in data objects also known as “entities”
makes easy to start building applications is provided as well [1]. Like any other data filters, data can be extracted
by App Engine. In addition Django Web application from tables using queries filtered by property values.
framework, version 0.96.1 [1] is also included in App Data modeling interface which can define structure for
Engine, but it should be take into account that App Engine datastore entities is included in the Python API for the data-
datastore is not a relational database, which is re-quired by store. This data model specifies if property value must be
some Django components. The option to be in-cluded other within a given preset range or will assign a default value to it
third-party libraries is also supported. As long as they are if not given. User application supports as much as needed
implemented in Python programming language and if they little structure of data. The Integrity of data is very well guar-
not require any unsupported library modules, it should not anteed. Each application can execute multiple datastore op-
be a problem to be used [1]. erations in a single transaction which either succeed or fail.
Now brief description of all APIs for the following ser- Concurrency control is very well ensured as well. Update to
vices in Python Runtime Environment will be provided. the any single data record occurs if another process is
trying to access the same data record in the same time [12].
TKK T-110.5190 Seminar on Internetworking
software development Kit (SDK). All of the APIs and the
3.3.2 Google Accounts
libraries available in App Engine are included in it. Simu-
A service API which integrates with Google Accounts is lations of the secure sandbox environment, which includes
in-cluded in App Engine as well, and it provides better
user con-trol. Customer’s applications can allow users to
sign in their product by using Google accounts instead of
implementing their own user account system. User can
also distinguish whether the signed person is a simple
user or a registered administrator for the application.
Benefits of this are faster deployment of the product and
faster and easier access to it [1]
3.3.3 URL Fetch
Resources on the internet, like web service or other data
for example, can be accessed by any user application
thanks to App Engine’s URL fetch service. This service is
fast as other Google services and can retrieve other web
sources by using high-speed Google infrastructure [1]. It
allows App Engine applications to exchange data with
other hosts using HTTP requests [14].
3.3.4 Mail
Every user application can send message using App
Engine’s mail service, which also uses Google’s
company infrastruc-ture [15]. This is very useful way
for applications to com-municate with users and notify
other users for any activity or updates [15].
3.3.5 Memcache
Distributed in-memory data cache in front of or in place of
reliable constant storage is often use by high performance
scalable web applications for some tasks. Because of this
reason Google App Engine supports memory cache service
[13]. The Memcache service assures user
applications with a high performance in-memory
key-value cache that is avail-able by numerous
instances of the applications.
Data that does not need the persistence and transactional
features of the datastore, like for example a temporary data or
data copied from the datastore to the cache for high speed
access, which makes most of the Memcache service usage
[1].
3.3.6 Image Manipulation
Google provide as well and Image service which
supports manipulating image functions, like resize, crop,
rotate and flip images both in JPEG and PNG formats
[1]. This is very useful service for customer’s applications
which are dealing with photographs or just provide users
with a service to pre-pare their avatars.
3.4 Development Workflow
A web application which emulates all of the App Engine ser-
vices on the local computer is included in the App Engine
Figure 2: Admin Console view
check for imports of disabled modules or attempt to ac-cess
not allowed system resources, are supported by the web
server. Implementation of the Python SDK is done in pure
Python programming language and it is operate on any
oper-ating system, including Windows, Mac OS and Linux
which supports Python 2.5 release [2]. The Python software
pack-age is available on Python web page. The Google App
En-gine SDK can be obtained from the Google App Engine
homepage, as a ZIP file, or as an installer available for Win-
dows and Mac OS X. Tool for uploading the applications to
App Engine infrastructure is included in the SDK. Each ap-
plication consist two types of files, static files and configu-
ration files. Once these files are ready, they can be
uploaded by the tool, which also prompts the user about his
Google account e-mail and password.
Very useful feature is that Google App Engine
supports version of the applications. If customer
develops new major release of his product, he can
upload the new release as a new version, while the old
version is still in use. Final tests of the newer release can
be done in same time, before it can be switched on.
Management of the applications running on App Engine
is done through an administration console (Fig.2). This a
web-based interface which allows the customer to create
new applications, configure domain names, change which
version of the application is in use, examine access and
error logs, and browse an application’s datastore.
3.5 Quotas and Limits
Creating an App Engine application is not only easy but it is
also free. The only thing user should do is to create an account
and publish his application, all of this at no charge and without
any obligations. Free accounts can support up to 10
applications, maximum of 500MB of storage for all of them and
maximum 5 million page views per month again for all of them.
If user decides to use more computing power, he can enable
billing function, set a maximum daily budget, and assign this
budget only to recourses he needs. Appli-cations cannot use
recourses from another account, and also according company’s
policy, operating applications on mul-tiple free accounts that
work in tandem is not allowed as well.
One good feature is that limitations, or “quotas”, are con-
TKK T-110.5190 Seminar on Internetworking
According Phanfare’s company blog, Google App Engine
tinuously refreshing. At the beginning of each calendar
day, a time-based quota will be refreshed if application provides customers with vertically integrated development
reaches it. But fixed quotas for example like storage use
are only reassured when user decreases usage.
There are other limitations which are not related to the
quotas but which assures the stability of the system. As
an example if the application requires serving a web
request, it needs to bring back a respond within 30
seconds, other-wise the process will be terminated and it
will raise an error code. If an application continuously
reaches limitations of the timeouts, the time for timeouts
will be reduced, to help keep system resources.
Another example of a service limit concerns the data
store. Single query can return maximum 1000 data
records as a result. If there is a possibility that the query
will return more than 1000 records, it will return the first
1000 as a result. But it is very possible that such query
will affect the 30 seconds timeout limitations which will
raise an error. All of these limitations are done in respect
to conserve resources on the datastore.
4 What can I do with the system?
In practice there are no limitations what can be done using
the system. User can choose either to build a simple ap-
plication or to create a powerful commercial product. On
Google App Engine home page there is section which name
is “App Gallery”, in which many applications built with App
Engine can be found. The visitors can search for applica-
tions in many sub categories like, Tools, Communications,
Games, News, Finance, Sports, Lifestyle, Technology and
Enterprise. There is also editor’s choice section in which
best ranked applications can be selected.
A good example of what can be done with this rising
new technology is shown in the article: “How to: Create a
Face-book App with Google App Engine and Best Buy
Remix” by Omar Abdelwahed. Briefly, Best Buy’s Remix
API and iLike’s Music API are combined to search for
music prod-ucts that users of this application can listen
to and then pur-chase. A detailed tutorial how to create
such application us-ing Google App Engine and then
how to uploaded in Face-book, can be found in the link
provided in the reference sec-tion [11].
5 Comparison between Cloud
Ser-vices
In this chapter brief comparison between Google App
En-gine and the other two major companies which
offers similar services will be provided to the reader.
One of the biggest competitors in “The Cloud” of
Google App Engine is Amazon’s Web Service (AWS), so
it is log-ical to compare it with it. But this next step in
application development pushes also Microsoft with their
Azure Service Platform to compete direct against Google
and Amazon in the software as a service model.
environment to create a web application in Python and it has
pros and cons comparative to the Amazon Web Services ap-
proach which offers to the customer more industry standard
6 Conclusion
pieces like Linux instances (EC2), key-value stores (Sim- It is too early to make general conclusions and
pleDB) and web-service-based filesystems (S3)[16]. Ama-zon statements about Google App Engine technology.
offer is a lower level offer, which is closer to the hard-ware, and This cloud comput-ing solution is still too young, and
it will take more time to build system with it, but the resulting recently appears on the market.
system will be more extensible. In the other hand, if the It looks like that the current situation with creating and de-
customer wants to create new web application it will be faster veloping even simple web applications is really challenging
and will bring him faster to the market[16]. and demanding. Except writing the code there are a lot of
Michael J. Miller, vice president at Ziff Brothers other tasks to be done. First user need to write configuration
Invest-ments compares the three major players in this file and startup scripts of the web server he want to use.
field with their pros and cons. He concludes that all of Then he needs to set up the SQL database along with
them have their own strengths: creating ta-bles, lookups, user privileges, updating new
“So looking at these three players, you see each of them versions and so on and so on. To find a proper physical
playing to their strengths. Amazon was early in the market, machine, on which the product should be hosted, is not an
and has leveraged Internet standards and open source plat- easy thing as well. Even for the smallest applications which
forms to create a very flexible platform. Google is leverag- are used few times per week, needs to be paid significant
ing the work it has done with big databases and its internal amount of money for them, when traditional hosting
development methods to create a powerful but more restric- services are in use. And after all when all things are set up,
tive environment. And Microsoft is leveraging its traditional somebody needs to maintain the application. Sometimes
strength with developers and the breadth of its tools to machines crash, configuration files have errors, hard disks
create perhaps the largest array of services”[17]. break, traffic starts to grow and etc. So to keep everything
Another opinion of Jessica Hodgson from Dow Jones going on properly, takes money, time and efforts.
Newswires shows that Microsoft’s move is more strategi- All of those problems were tried to be solved with App
cally then truly to develop something new. Her opinion is: Engine. Several components while using App Engine makes
“What I think Microsoft is trying to do is to freeze the this possible. First thing which should be take into account is
mar-ket. They want people who may have been thinking the massive Google’s company infrastructure. Second is the
about experimenting with on-demand products to hold off provided Python language runtime and support of more
and wait to see what their products are like”[17]. languages will appear in the near future. Third is the SDK
TKK T-110.5190 Seminar on Internetworking
which completely emulates Google’s server environment. [11] Google.com. Google App Engine Articles.
This is useful because customers can create their http://code.google.com/appengine/articles/shelftalkers.ht
applications locally, in real time, without uploading them. ml, Accessed on 9 Feb, 2009.
Then it comes the web based admin interface. This
[12] Code.Google.com. Python Service APIs -
interface contains all the necessary tools to manage and
Datastore.
debug user applications. And finally, the Datastore API,
which is the Google’s scal-able persistence layer. All it http://code.google.com/appengine/docs/python/datastore/.
needs to be done is to define URL which user wants to Accessed on 14 March, 2009.
use, writing the code and to up-load the application. [13] Code.Google.com. Python Service APIs -
Everything else will be done by Google [3].
Memcache.
According Kevin Gibbs which is App Engine Tech http://code.google.com/appengine/docs/python/datastore/.
Lead, the design goals of Google are[3]:
Accessed on 14 March, 2009.
† Make the system easy to use [14] Code.Google.com. Python Service APIs -
† make it easy to scale Urlfetch.
http://code.google.com/appengine/docs/python/datastore/.
† make it free to get started Accessed on 14 March, 2009.
It looks so far that Google team achieved them. [15] Code.Google.com. Python Service APIs -
Mail.
http://code.google.com/appengine/docs/python/datastore/.
References Accessed on 14 March, 2009.
[1] Google.com. Developer’s [16] Blog.Phanfare.com. App Engine vs.
Guide. Amazon Web Services.
http://code.google.com/appengine/docs/ http://blog.phanfare.com/2008/04/google-app-
engine-vs-amazon-web-services/. Accessed on
whatis- 14 March, 2009.
googleappengine.html, Accessed on 9 Feb,
2009. [17] Infoq.com. Comparing Amazon’s
EC2, Google’s App Engine and Microsoft’s
[2] Google.com. Google App Engine General Azure.
Questions. http://www.infoq.com/news/2008/11/Comparin
http://code.google.com/appengine/kb/general.html, g-EC2-App-Engine-Azure. Accessed on 14
Accessed on 9 Feb, 2009. March, 2009.
[3] Google.com. Google App Engine Campfire One
Tran-script.
http://code.google.com/appengine/articles/cf1-
text.html, Accessed on 9 Feb, 2009.
[4] Google.com. Google App Engine
Blog.
http://googleappengine.blogspot.com/,
on 9 Feb, 2009.
[5] Wikipedia.com.
http://en.wikipedia.org/wiki/Google-App-Engine,
Accessed on 9 Feb, 2009.
[6] TechDirt
izes It
http://techdirt.com/articles/20080407/225749782.sht
ml, Accessed on 9 Feb, 2009.
[7] InfoWorld Blog. Cloud versus cloud: Amazon EC2,
Google App Engine, GoGrid, and AppNexus.
http://weblog.infoworld.com/tcdaily/archives/2008/07/video-
tours-of.html?source=fssr, Accessed on 9 Feb, 2009.
[8] SearchEnterpriseDesktop.com. Definitions.
http://searchenterprisedesktop.techtarget.com/sDefinition,
Accessed on 9 Feb, 2009.
[9] Wikipedia.com. Cloud Computing.
http://en.wikipedia.org/wiki/Cloud-computing, Ac-
cessed on 14 March, 2009.
[10] The industry standard. The Internet Cloud.
http://www.thestandard.com/article/0,1902,5466,00.html,
Accessed on 14 March, 2009.