I - What Is G G App Engine ???
I - What Is G G 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.
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. Building the actual code first, Testing the developed code locally, Deploying the code to a google hosted server linked to a google account, Managing the server via a given admin console and upgrading the code and resources as required.
At top your request comes in and eventually you send your response back. The file system contains two different parts : One has the Python System Library and the other part has the source-code of your program. Then there is the Python Virtual Machine which is managed by a bunch of C++ codes that keeps it from doing other things. On the left and the bottom are the API's to other services that Google provides i.e. urlfetch, mail, images. The stateful API's do not just process on data and then deliver the result, but holds on to the data if you need it later. The memory based cache is shared by instances of an application. It is not guaranteed to store your data forever but it usually does. It is not guaranteed to be fast but is faster than the Datastore. Datastore is not a relational database although it has a query language and a number of concepts that are familiar from database territory.
An application can only access other computers on the Internet through the provided URL fetch and email services. 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. An app can read files, but only files uploaded with the application code. The app must use the App Engine datastore, memcache or other services for all data that persists between requests.
Application code only runs in response to a web request, a queued task, or a scheduled task, and must return response data within 30 seconds in any case. A request handler cannot spawn a sub-process or execute code after the response has been sent.
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. Most existing Web applications can't run on App Engine without modification, because they require a relational database. But with the new pricing format , GAE is likely to be more expensive to users than other hosting services like AWS etc. One positive thing is that with the high-replication datastore, GAE provides a redundant, multihomed, fault tolerant system that can transparently survive whole data-center crashes.
URL FETCH
Applications can access resources on the Internet, such as web services or other data, using App Engine's URL fetch service. The URL fetch service retrieves web resources using the same high-speed Google infrastructure that retrieves web pages for many other Google products.
MAIL
Applications can send email messages using App Engine's mail service. The mail service uses Google infrastructure to send email messages.
MEMCACHE
The Memcache service provides your application with a high performance inmemory key-value cache that is accessible by multiple instances of your application. Memcache is useful for data that does not need the persistence and transactional features of the datastore, such as temporary data or data copied from the datastore to the cache for high speed access.
IMAGE MANIPULATION
The Image service lets your application manipulate images. With this API, you can resize, crop, rotate and flip images in JPEG and PNG formats.
10
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 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, the Java environment, and Python environment. Each environment provides standard protocols and common technologies for web application development. They are explained individually in the following pages. Although for an example we will be using the Python SDK for developing a web application for local development. It is relatively quite simple and easy to comprehend.
11
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. Go combines the performance and safety of a compiled language like C+ + but with the speed and dynamism of Python.
The mascot of Go
12
13
14
Firstly you need the Python framework on your computer, so visit the following link and download whatever version that matches your system specifications :
http://python.org/download Next you need the Google App Engine SDK that is available on the following / link. The Python SDK includes a web server application that simulates the App Engine environment, including a local version of the datastore, Google Accounts, and the ability to fetch URLs and send email directly from your computer using the App Engine APIs. http://code.google.com/intl/en/appengine/downloads.html
15
After this is done install the SDK that you downloaded from the Google Code website. The process should look somewhat like this:
16
Name the file as helloworld.py, changing the extension from .txt to .py This Python script responds to a request with an HTTP header that describes the content, a blank line, and the message "Hello, world!".
17
The application identifier is "helloworld". When you register your application with App Engine in the final step, you will select a unique identifier, and update this value. This value can be anything during development. This is version number 1 of this application's code. If you adjust this before uploading new versions of your application software, App Engine will retain previous versions, and let you roll back to a previous version using the administrative console. This code runs in the python runtime environment, version "1". Additional runtime environments and languages may be supported in the future. Every request to a URL whose path matches the regular
18
19
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.
Now click on "OK" to start the process of deploying a local test server. Click on File -> Add an existing application and then choose the directory "Helloworld". Select the application in the app list and then press "RUN" to start the application.
20
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. http://localhost:8080 The web server is now running, listening for requests on port 8080.
21
Registering the Application You create and manage App Engine web applications from the App Engine Administration Console, at the following URL: https://appengine.google.com/ Sign in to App Engine using your Google account. If you do not have a Google account, you can create a Google account with an email address and password. To create a new application, click the "Create an Application" button. Follow the instructions to register an application ID, a name unique to this application. If you elect to use the free appspot.com domain name, the full URL for the application will be "http://application-id.appspot.com/". You can also purchase a top-level domain name for your app, or use one that you have already registered. Edit the "app.yaml" file, then change the value of the application: setting from "helloworld" to your registered application ID.
22
Uploading the application Click "Deploy" on the Google App Engine Launcher to upload your finished application. Enter your Google username and password at the prompts. You can now see your application running on App Engine. If you set up a free appspot.com domain name, the URL for your website begins with your application ID: https://app-id.appspot.com/
23
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, there is a 15-minute charge ($0.02) every time* an instance starts and $9 per application per month (as a minimum spend) if you enable billing. 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. As App Engine has matured, it has gone from being a low-end hosting solution to a high-end hosting solution. Compared to building your own Hardware, App Engine is still comically cheap. 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. To the extent that more money means more features sooner, paying more might be worth it. Time will tell.
24
XVI. 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. In the hosting market it has several competitors but most of them lack the number of features that it has to offer. Features like more infrastructure, scalability, etc.
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.
All in all, App Engine is an excellent cloud computing platform as a service and has a great future ahead. It would probably be used only by people who are in business, but may not be used by developers who only do it as a hobby.
25
XVII. References
http://en.wikipedia.org/wiki/Google_App_Engine http://code.google.com/intl/en/appengine/ http://slideshare.net http://googleappengine.blogspot.com Campfire One Videos on Google App Engine http://youtube.com http://arstechnica.com http://stanford.edu
26