Waleed Rafique

Building And Hosting a Google App Engine Application

Share Button

Google app engine abbreviated as GAE is a cloud computing platform where web applications are developed and hosted in data centers managed by Google. Multiple servers are used to run an application. Automatic scaling of the applications is offered by the App Engine. In case there is an increase in the number of requests for an application; the App Engine allocates automatically more resources to meet the demand.

Google App Engine use is free until a certain level of resources is consumed. Resources that are charged include bandwidth, storage or instance hours an application requires.

Supported languages for developing Google App Engine application are Java, Python 2.7, Python 2.5 or Go.

This tutorial covers developing using python2.7. You need to download and install it from here.

You will require the App Engine Python software development kit (SDK) to develop and uploading the Python applications for Google App Engine. You can download it from here. There is a download for every operating system platform. Install it.

We will be implementing a small application that displays the message “Learning Google App Engine”.

We start off by creating a directory which I will name “learning“. At the root of learning directory, create a file and name it “learning.py”. Enter the following content into that file


This is a Python script that responds to request with HTTP headers.

app.yaml is a configuration file included with each App Engine application. It describes the handler scripts to be used for a certain URL. Inside the learning directory, create the app.yaml file and enter the following contents.

 

 

 

 

 

 

  • Learning the application identifier
  • The version number of this application is 1.
  • python27 is the runtime
  • The application is threadsafe thus capable of handling several simultaneous requests.
  • Put all the urls to be captured. Mine uses a regular expression /.* which handles all urls.

The application is now complete. We now have a directory with two files in it.

The web server that is included with the App Engine SDK can be used to test the app.

Run the App Engine SDK you just installed.

The application is setup by selecting File àAdd Existing Application.

This opens a dialog where you are to add the learning directory. Click on add.

The leaning app is added to the SDK. To start the application, select the learning application and click the Run button.

To view the app click on the Browse button

This opens the browser and displays the message.

This application is running on your local machine. We will now deploy it to the GAE cloud platform. Login to GAE using this link. You will need a gmail account to host on the GAE. Create one if you don’t have.

This opens a dashboard where you create an app. 10 applications can be created for this account. Click on “create Application”.

Opens a page where you enter the application identifier. This is a unique name that will be used to identify the application. Availability of the identifier chosen must be checked. Give a suitable title and click on create.

Opens a success page. Click on dashboard for the application administration

The identifier name is shown. You are to change the app.yaml file and replace the application name we had earlier named learning

With your application identifier that you used for your application. Mine is “Replicatio” and my app.yaml will change too


Google App Engine Launcher, click on deploy.

Enter the gmail address you created the GAE account with and click ok. The application is deployed. You can visit your application by visiting http://your_app_id.appspot.com

Share Button

Related posts:

Setting up an application using django and requirements
Using Cloud9 IDE To Develop And Debug Code From The Cloud
Cloud Accounting With QuickBooks
Creating Virtual Cloud Servers On NephoScale

«
»
  • CharlesEPedrosa

    Sharath Reddy, indeed you made us all look at the importance of the Google App Engine and exposed how we will utilize this. Google App Engine is useful for building web application which is powered by Google application. You are right. It is easy to build , maintain and also easy to scale as our traffic and need for data storage growing. Reading your article I also know that by uploading our application we can serve our application to the users, no need maintain the server. Once my application is uploaded to Google they host and scale my application for me. So I see that no need to worry about system administration, my new instance application, sharing my database or buying machines. Thanks Sharath for sharing your opinion with us.

  • MeganHMadison

    Fantastic article Sharath Reddy and I have touched with your discussion. I have heard about the GAE but deeply I don’t think about its advantage . Sharath you are a genius writer and your article is so easy and full of information that I can easily understand what is GAE and why we need this. I know there are many languages for GAE developing application such as Java, Python2.7 , Paython 2.5, or Go but I don’t know which version is compatible for me. I like your recommendation about Python 3.3 and you also provided links which are useful for me to start now. Thanks again Sharath for changing my view about GAE.

  • MarioMFischer

    Really Sharath your talented mythodology helps me to implement the message of displaying “ Learning Google App eng” . Your root of leaning directory is excellent for new learner and will be inspired to use GAE. I usually appreciate your screenshot and technique about Download the Google App Engine SDK because of unknown GAE uploading system I can’t use it and your description give me knowledge on how I will include the web server with the App Engine SDK. Very useful variation so thanks Sharath Reddy for sharing .

  • JoseFCrumpton

    Awesome!!!! Interesting read. At first when I saw the title for this piece I thought that it may be a stretch to make this topic, but in the end I was pleasantly surprising. Reading your article I amazed with your explanation how I will run my application with my local machine. Your clear opinion and step by step features has really increased my knowledge which since I am able now you use GAE. Well done Sharath Reddy and thanks for the article – some interesting reading and definitely some different content.

  • LesaRHildreth

    It is a great article, especially on Linear GAE. When I look for a decent GAE article, there is organic article on sharathreddy.com available, which includes an incredible group of intellects which belong to the Sharath Reddy community. I have read your article seamless and thanks for the awesome information about GAE. Sharath can you help me how Google App Engine can scale to meet my needs?

    • sharathreddy

      Automatic scaling is built in with Google App Engine. For this you have needed to do is write your application code and we’ll do the rest. It is not matter how many users you have or how much data your application stores, Goolge App Engine can scale to meet your needs.

To Top