I . What is Google App Engine ???

Google App Engine is basically a system that exposes various pieces of Google's scalable infrastructure so that you can write server-side applications on top of them. Google App Engine (often referred to as GAE or simply App Engine, and also used by the acronym GAE/J) is a platform as a service (PAAS) cloud computing platform for developing and hosting web applications in Googlemanaged data centres. It virtualizes applications 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. It lets you run your web applications on Google's infrastructure. App Engine applications are easy to build, easy to maintain, and easy to scale as your traffic and data storage needs grow. With App Engine, there are no servers to maintain: You just upload your application, and it's ready to serve your users. You can serve your app from your own domain name (such

as http://www.example.com/) using Google Apps. Or, you can serve your app using a free name on the appspot.com domain. You can share your application with the world, or limit access to members of your organization. It was first released as a beta version in April 2008, and out of beta recently in Sept 2011.


II. Why did Google develop the App Engine ???
They built App Engine because they want more web apps to get created. What they noticed is that, today, it's pretty hard to create one: there are significant upfront challenges to deploying even the simplest of web applications. You've got a lot of tasks to do. First, you have to write the code for your app, of course. But then, you also have to write your Apache web server configs and startup scripts, set up your SQL database, create all of its tables and hook up the passwords, set up monitoring so you can tell what's going on with your traffic and logs, decide how you'll push new versions of your code, and on, and on. That's the technical setup challenge that we noticed. And then, once you've done all that sysadmin work, you have another challenge: you have to actually go find machines you can use somewhere, physically or from a virtual provider, to run your app somewhere. Right now, that costs money: even for the smallest app, which you use a few times a week, you have to pay a pretty big upfront fee to run that app with a traditional hosting provider. So that's the financial or physical challenge. And then, once you've got the whole thing set up and working, and found and paid for a place to test it out, you've got another challenge: you've got to maintain it all as your app grows. Your machines crash, your configs have errors, your hard disks break, your traffic starts to grow, you have to rebuild your databases, set up more machines and on. Keeping everything going as your app grows is a hassle. Google is trying to abstract away all these with the App Engine.


Each environment provides standard protocols and common technologies for web application development. The applications can be developed in three different environments JAVA. or CPU cycles required by the application. Fees are charged for additional storage.e. Google App Engine is free to a certain amount of resources. bandwidth. Python and GO. Google App Engine SDKs contain methods to locally test the web applications before deploying them to the online servers. i. 3 . Why use Google App Engine ???  Scalability  Lower Cost of Ownership  Rich Set of APIs  Fully featured SDK for local development  Ease of Development  Web Administration Console and diagnostic utilities Scalable hosting is the ability to quickly and easily add resources to an existing network.III. More RAM or more servers.

4 . Testing the developed code locally. The GAE Application Life Cycle Google App Engine has a fairly simple life cycle compared to other scalable hosting services. It provides more infrastructure to write scalable applications but can only run a limited number of applications. The life cycle follows a very simple procedure. Deploying the code to a google hosted server linked to a google account. Building the actual code first.IV. Managing the server via a given admin console and upgrading the code and resources as required.

Datastore is not a relational database although it has a query language and a number of concepts that are familiar from database territory.V. The memory based cache is shared by instances of an application. images. The GAE Architecture At top your request comes in and eventually you send your response back.e. It is not guaranteed to be fast but is faster than the Datastore. It is not guaranteed to store your data forever but it usually does. 5 . mail. urlfetch. The stateful API's do not just process on data and then deliver the result. On the left and the bottom are the API's to other services that Google provides i. but holds on to the data if you need it later. Then there is the Python Virtual Machine which is managed by a bunch of C++ codes that keeps it from doing other things. The file system contains two different parts : One has the Python System Library and the other part has the source-code of your program.

memcache or other services for all data that persists between requests. or a scheduled task. but only files uploaded with the application code. An app can read files.  Application code only runs in response to a web request. reliable environment that is independent of the hardware.  An application cannot write to the file system. operating system and physical location of the web server. Other computers can only connect to the application by making HTTP (or HTTPS) requests on the standard ports. The sandbox isolates your application in its own secure. The Sandbox Applications run in a secure environment that provides limited access to the underlying operating system. Examples of the limitations of the secure sandbox environment include:  An application can only access other computers on the Internet through the provided URL fetch and email services. a queued task. A request handler cannot spawn a sub-process or execute code after the response has been sent.VI. and must return response data within 30 seconds in any case. These limitations allow App Engine to distribute web requests for the application across multiple servers. 6 . and start and stop servers to meet traffic demands. The app must use the App Engine datastore.

the distributed datastore grows with your data. The datastore is strongly consistent and uses optimistic concurrency control. The GAE Datastore App Engine provides a distributed data storage service that features a query engine and transactions. The App Engine datastore is not like a traditional relational database. The datastore has a SQL-like syntax called "GQL". 7 . You have the choice between two different data storage options differentiated by their availability and consistency guarantees. Your application can execute multiple datastore operations in a single transaction which either all succeed or all fail. Just as the distributed web server grows with your traffic. Queries can retrieve entities of a given kind filtered and sorted by the values of the properties. Property values can be of any of the supported property value types. ensuring the integrity of your data. because it seems to be inefficient when queries span more than one machine. Many projects at Google Store data in Bigtable." have a kind and a set of properties. or "entities. including web indexing. and Google Finance. Google Earth. An update of a entity occurs in a transaction that is retried a fixed number of times if other processes are trying to update the same entity simultaneously. Data objects.VII. GQL intentionally does not support the Join statement. Bigtable is a distributed storage system for managing structured data that is designed to scale to a very large size: petabytes of data across thousands of commodity servers.

because they require a relational database. App Engine requires developers to use only its supported languages. Google handles deploying code to a cluster. multihomed. fault tolerant system that can transparently survive whole data-center crashes.VIII. 8 . making HTTP requests. But with the new pricing format . Most existing Web applications can't run on App Engine without modification. Current APIs allow storing and retrieving data from a BigTable non-relational database. Diff. While other services let users install and configure nearly any *NIX compatible software. between GAE and other hosting Services Compared to other scalable hosting services such as Amazon EC2. GAE provides a redundant. APIs. and caching. failover. and launching application instances as necessary. App Engine provides more infrastructure to make it easy to write scalable applications. and frameworks. monitoring. 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. GAE is likely to be more expensive to users than other hosting services like AWS etc. manipulating images. but can only run a limited range of applications designed for that infrastructure. One positive thing is that with the high-replication datastore. sending e-mail.

9 .

such as temporary data or data copied from the datastore to the cache for high speed access. crop. IMAGE MANIPULATION The Image service lets your application manipulate images.IX. rotate and flip images in JPEG and PNG formats. Memcache is useful for data that does not need the persistence and transactional features of the datastore. such as web services or other data. you can resize. 10 . Services provided by GAE App Engine provides a variety of services that enable you to perform common operations when managing your application. using App Engine's URL fetch service. MAIL Applications can send email messages using App Engine's mail service. The URL fetch service retrieves web resources using the same high-speed Google infrastructure that retrieves web pages for many other Google products. The following APIs are provided to access these services: URL FETCH Applications can access resources on the Internet. MEMCACHE The Memcache service provides your application with a high performance inmemory key-value cache that is accessible by multiple instances of your application. With this API. The mail service uses Google infrastructure to send email messages.

The GAE Application Environment Google App Engine makes it easy to build an application that runs reliably. It is relatively quite simple and easy to comprehend. even under heavy load and with large amounts of data. App Engine includes the following features:      dynamic web serving. and Python environment. the Java environment.X. They are explained individually in the following pages. with full support for common web technologies persistent storage with queries. Although for an example we will be using the Python SDK for developing a web application for local development. 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 your computer   task queues for performing work outside of the scope of a web request scheduled tasks for triggering events at specified times and regular intervals Your application can run in one of three runtime environments: the Go environment. Each environment provides standard protocols and common technologies for web application development. 11 .

not all the standard library's functionality is available inside the sandbox.XI. The SDK includes an automated build service to compile your app. as long as they are implemented in pure Go. The Go environment provides idiomatic Go APIs for most of the App Engine services. What exactly Go programming language is : It is an experimental programming language that has been introduced by Google and is on the path to becoming an important programming language under the influence of Google. so you'll never need to invoke the compiler yourself. This keeps you productive by making the edit-compile-run cycle refreshingly short. The SDK includes the Go compiler and standard library. The mascot of Go 12 . Go combines the performance and safety of a compiled language like C+ + but with the speed and dynamism of Python. so it has no additional dependencies. The Go Runtime Environment App Engine's Go runtime environment provides a convenient way to implement and deploy web applications written in the Go Programming Language. As with the Java and Python environments. And—as with the Python SDK— your app will be automatically re-built whenever you change the source. You can upload other third-party libraries with your application.

or Scala. as long as it does not exceed the sandbox restrictions. The java. Your app can use the JavaMail API to send email messages with the App Engine Mail service. Your app accesses most App Engine services using Java standard APIs. you can also use other languages to develop web applications. The App Engine Java SDK supports developing apps using either Java 5 or 6. 13 .XII. The restrictions of the sandbox environment are implemented in the JVM. such as JavaScript. For the App Engine datastore. or to use directly from the application. Ruby. An app can use any JVM bytecode or library feature. App Engine also includes low-level APIs for its services to implement additional adapters. The environment includes the Java SE Runtime Environment (JRE) 6 platform and libraries. The Java Runtime Environment You can develop your application for the Java runtime environment using common Java web development tools and API standards. the Java SDK includes implementations of the Java Data Objects (JDO) and Java Persistence API (JPA) interfaces. and can use common web application technologies such as JavaServer Pages (JSPs). Java developers use the Java programming language and APIs to implement web applications for the JVM. With the use of JVM-compatible compilers or interpreters.net HTTP APIs access the App Engine URL fetch service. Your app interacts with the environment using the Java Servlet standard.

several modules in the standard library whose core features are not supported by the runtime environment have been disabled.XIII. and email services. and tools for managing and accessing your app's data. not all of the library's features can run in the sandbox environment. App Engine also provides a simple Python web application framework called webapp to make it easy to start building applications. For convenience. 14 . such as Django. Of course. including a feature rich data modeling API. The Python environment provides rich Python APIs for the datastore. you can implement your app using the Python programming language. and code that imports them will raise an error. App Engine includes rich APIs and tools for Python web application development. an easy-to-use web application framework. You can upload other third-party libraries with your application. Google Accounts. The Python Runtime Environment With App Engine's Python runtime environment. The Python environment includes the Python standard library. URL fetch. as long as they are implemented in pure Python and do not require any unsupported standard library modules. You can also take advantage of a wide variety of mature libraries and frameworks for Python web application development. and run it on an optimized Python interpreter.

Developing a basic Web Application The main purpose of going through a detailed synopsis of any hosting service is to create an application and test it on your own. Using the Datastore and other advanced features of GAE are explained at the following link : www.org/download Next you need the Google App Engine SDK that is available on the following / link. http://code.html 15 .google.code. so visit the following link and download whatever version that matches your system specifications : http://python.com/intl/en/appengine/downloads. but the successful deployment of an Application via Google App Engine. The Python SDK includes a web server application that simulates the App Engine environment. The program that is explained here is fairly simple but the basic purpose is not to teach Python Coding.com/intl/en/appengine/docs/python/gettingstarted Firstly you need the Python framework on your computer. and the ability to fetch URLs and send email directly from your computer using the App Engine APIs. Enclosed with this report you will find a CD-ROM that contains a video of how to develop a basic web application using the programming language PYTHON and the Google App Engine SDK based on Python. Google Accounts.XIV. including a local version of the datastore.google. We will just be concentrating on developing a Webapplication framework for any general application.

The process should look something like this:  After this is done install the SDK that you downloaded from the Google Code website.Step 1 : Installing the Python Framework on your computer  Install python from the file that you just downloaded from the website. The process should look somewhat like this: 16 .

a blank line.txt to . For instance let us take it as "C:/Helloworld" Step 3 : Creating a simple request handler Now in the above directory create a new text document and write the following code in python inside it.Step 2 : Creating the file directory Create a directory named "Helloworld" anywhere you wish. and the message "Hello. 17 . print 'Content-Type: text/plain' print '' print 'Hello.py This Python script responds to a request with an HTTP header that describes the content. world!". world!' Name the file as helloworld. changing the extension from .py.

yaml".* (all URLs) should be handled by the helloworld.  This code runs in the python runtime environment. When you register your application with App Engine in the final step. version "1". Among other things. Inside the helloworld directory. If you adjust this before uploading new versions of your application software.py script.yaml" with the following contents: application: helloworld version: 1 runtime: python api_version: 1 handlers: .  This is version number 1 of this application's code. App Engine will retain previous versions. and let you roll back to a previous version using the administrative console. you will select a unique identifier.* script: helloworld. Additional runtime environments and languages may be supported in the future. this file describes which handler scripts should be used for which URLs.Step 4: Creating the configuration file An App Engine application has a configuration file called "app. create a file named "app. and update this value.py  The application identifier is "helloworld". This value can be anything during development.url: /.  Every request to a URL whose path matches the regular expression /. 18 .

A message is displayed on the screen on the first start-up like this : 19 .Step 5 : Testing the Application With a handler script and configuration file mapping every URL to the handler. After you have installed the Google App Engine SDK. You can now test it with the web server included with the App Engine SDK. Go to the Desktop of your computer and search for a shortcut named "Google App Engine Launcher". Click on this and the launcher starts for the first time. the application is complete.

Select the application in the app list and then press "RUN" to start the application.Then you have to click "OK" and go to Edit and the last tab "Preferences" and then enter the path of Python.exe that you had installed in the space provided. Click on File -> Add an existing application and then choose the directory "Helloworld". 20 . Now click on "OK" to start the process of deploying a local test server.

21 .Then after the server has started go to your browser and then type the following address in your address bar to check if the application has been deployed properly. listening for requests on port 8080. http://localhost:8080 The web server is now running.

Step 6: Uploading the Application You create and manage applications in App Engine using the Administration Console. a name unique to this application. click the "Create an Application" button.com domain name. To create a new application. Once you have registered an application ID for your application.com/ Sign in to App Engine using your Google account. you can upload your application by clicking the Deploy button. then change the value of the application: setting from "helloworld" to your registered application ID.yaml" file. the full URL for the application will be "http://application-id.google. If you elect to use the free appspot. Registering the Application You create and manage App Engine web applications from the App Engine Administration Console. Edit the "app. 22 . If you do not have a Google account. you can create a Google account with an email address and password.appspot. Follow the instructions to register an application ID. or use one that you have already registered. at the following URL: https://appengine.com/". You can also purchase a top-level domain name for your app.

appspot. the URL for your website begins with your application ID: https://app-id.Uploading the application Click "Deploy" on the Google App Engine Launcher to upload your finished application.com/ Finally we have our own web application hosted by GAE! 23 . If you set up a free appspot. You can now see your application running on App Engine.com domain name. Enter your Google username and password at the prompts.

Time will tell. 24 . it has gone from being a low-end hosting solution to a high-end hosting solution. Previously. The good news is that Google says that higher prices will allow them to increase their commitment to App Engine and devote more resources to its development. paying more might be worth it. there is a 15-minute charge ($0. To the extent that more money means more features sooner. Recent Changes in GAE Google is changing the way it charges for App Engine. Compared to building your own Hardware.02) every time* an instance starts and $9 per application per month (as a minimum spend) if you enable billing. you were charged for three things:  Bandwidth in/out  Data stored in the datastore  “CPU time” of all your programs The new billing model charges you for:  Bandwidth in/out  Data stored in the datastore  Wall-clock time spent running application server instances  Number (and type) of requests to the datastore In addition. As App Engine has matured.XV. App Engine is still comically cheap. The most significant change to the pricing model is that instead of billing you for CPU time consumed by your frontend web application. you will now be charged for every minute of wall-clock time that each instance runs. irrespective of how much CPU it consumes.

Conclusion Google App Engine is an excellent hosting service that has been provided by Google for enterprises to host their web applications online at a minimal price. and frameworks. App Engine is an excellent cloud computing platform as a service and has a great future ahead. but may not be used by developers who only do it as a hobby. making HTTP requests. scalability. Current APIs allow storing and retrieving data from a BigTable non-relational database. 25 . etc. sending e-mail. It would probably be used only by people who are in business. APIs. manipulating images. All in all. and caching. Features like more infrastructure. App Engine requires developers to use only its supported languages. In the hosting market it has several competitors but most of them lack the number of features that it has to offer.XVI.

com  http://arstechnica.edu 26 .com  http://stanford.google.net  http://googleappengine.blogspot. References  http://en.com/intl/en/appengine/  http://slideshare.XVII.wikipedia.org/wiki/Google_App_Engine  http://code.com  Campfire One Videos on Google App Engine http://youtube.

Sign up to vote on this title
UsefulNot useful