Google App Engine


What is Google App Engine?

It is a PaaS (Platform as a Service) that helps to set up a pretty complex web application with very little effort of provisioning the configurations and essentially focusing on building the application code. 

datacloudies app engine
Photo by Frank McKenna
The app engine environment allows us to scale up or scale down automatically depending on the load consuming. Also, we can customize the settings such as runtime, operating system, and other dependency requirements. 
The app engine provides two environment models. 
  1. Standard environment
  2. Flexible environment

Standard Environment

The standard environment is preconfigured with specific runtimes such as Java, Python, Go, and Php. This provides in a container environment using a Google-owned container platform, in which you can deploy your application code. So, when you run the application code in a standard environment, you cannot change the runtime settings.  

Pointers

  • Standard app engine provides,
  • Quick autoscaling
  • Integrate with other Google services easily
  • Ease of deployment
  • Supports blue/green deployments, A/B testing, etc

However, if you want to move/collaborate with other clouds, this will be difficult, as the app engine standard highly integrated with GCP.

D:\2020\gcp\appengine-standard.png




1. The app engine supports different platforms such as Android, IOS, and desktop apps. 

2. The load balancer distributes the incoming traffic across the multiple app engine nodes.
3. The app engine processes the incoming request as per the definition.
4. Use Memcache for caching mostly used data, which provides a scalable high-performance web apps. 
5. Depends on the nature of the data, the app engine transfers the data for persistent storage. A portion of data requires block-level data store, choose the Cloud SQL
6. Cloud storage for object levels data stores such as files and directories.  
Task queue API schedules background applications to be executed sequentially by worker services. Push queues dispatch the request at a steady rate. Pull queues depend on the other worker services to lease tasks from the queue.
7. By the time the deadline arrives, the worker must either complete the task and delete it or task queue service will allow another worker to lease it. Pull queues are useful for batch processing tasks.



How to deploy the application in App Engine Standard


Refer the video tutorial for the above deployment

1. Connect to a project,

gcloud config set project project_id

2. Create a directory and generate the application source code, In this example, I have cloned the sample application from GCP

git clone https://github.com/GoogleCloudPlatform/python-docs-samples

datacloudies app engine


3. Install the dependencies like flask used for the web app, gunicorn for webserver processing. The requirement file contains flask and gunicorn.

pip install –r requirement.txt
4. Deploy the application to app engine 

gcloud app deploy app.yaml --project spartan-metric-267403
5. Verify the application deployment by browsing the app

datacloudies app engine

datacloudies app engine

Excellent, we have successfully deployed the sample application to the app engine. 
Please do check out the other tutorials in this series

Recent Posts