Google App Engine: Robust, Restful API Platform

Abdul Rahim Ansari
9 min readDec 11, 2020
Logo

Google App Engine

GAE is a managed application platform that supports any language, framework, or library you want to use. Application engine is an integral part of Google’s cloud platform. It can provide you with everything you need to build a cloud including a platform and infrastructure like a service and big data, cloud storage and more advanced cloud applications should be able to scale temporarily to handle large or small traffic volumes. You should only pay for the infrastructure capacity your programs use. If you use an app engine, you can build your apps to run on Google’s world-class infrastructure. You do not have to worry about providing and managing a data center that measures your needs. Google takes care of all that and you can just focus on building the best app for your users.

When creating an app engine, you can use popular languages ​​like Python, Java, PHP and Go. You can use existing frames like Django and flask too. You can focus on your code and let Google worry about data management, server configuration, blurring, load balancing and everything else you need to build scales. You have many options for storing your data including related information, awesome file storage and a light data store.

Various Languages Available

The app engine makes you more productive by reducing the need to write boilerplate code. Manage services such as job lines, Memcache and the user API will help you build a user API will help you build world-class applications. You can use the tools you know including Eclipse, Intellij, Maven, GIT and many more. The app engine STK lets you test apps in a customized environment and run your app with easy-to-use tools. The cloud is one of the most important advances in computer technology for decades. The app engine is built on the same infrastructure that allows Google to retrieve billions of search results in milliseconds.

Features:

• It builts your application in Node.js, Java, Ruby, C#, Go, Python, or PHP — or bring your own language runtime.

• It is open and flexible.It’s Custom runtimes allow you to bring any library and framework to App Engine by supplying a Docker container.

• It manages environment and let you focus on code whereas App Engine manages infrastructure concerns.

• It Uses Cloud Monitoring and Cloud Logging to monitor the health and performance of your app and Cloud Debugger and Error Reporting to diagnose and fix bugs quickly.

• It Easily host different versions of your app, and easily create development, test, staging, and production environments.

• It Routes incoming requests to different app versions, A/B test, and do incremental feature rollouts.

• It Helps safeguard your application by defining access rules with App Engine firewall and leverage managed SSL/TLS certificates by default on your custom domain at no additional cost.

• It taps a growing ecosystem of Google Cloud services from your app including an excellent suite of cloud developer tools.

Environment

You can launch your applications in App Engine using a standard or flexible environment. You can also choose to simultaneously use both areas of your app and allow your services to take advantage of the benefits of each environment. App Engine is well suited for applications designed to use microservice configuration, especially if you decide to use both locations.

When to choose the standard environment

Application conditions work with sandbox, using the working time environment of the supported language below.

Requests requiring immediate rating.

Standard environment suitable for applications with the following features:

· Source code is written in certain versions of edited programming languages:

• Python 2.7, Python 3.7, Python 3.8

• Java 8, Java 11

• Node.js 8, Node.js 10, and Node.js 12

• PHP 5.5, PHP 7.2, PHP 7.3, and PHP 7.4

• Ruby 2.5, Ruby 2.6, and Ruby 2.7

• Go to 1.11, to 1.12, to 1.13, and to 1.14

· intended to run for free or at a very low cost, where you pay only what you need and when you need it. For example, your app can go up to 0 levels in the absence of traffic.

· It detects sudden and severe traffic congestion that needs immediate measurement.

When to choose the flexible environment

Application conditions work within Docker containers on Compute Engine (VM) machines.

Applications that receive consistent traffic, meet standard traffic fluctuations, or meet incremental and low incremental restrictions.

The flexible environment is ideal for applications with the following features:

· Source code written in translation for any supported programming languages:

Python, Java, Node.js, Go, Ruby, PHP, or .NET

· Works on Docker container that includes custom operating time or source code written in other programming languages.

· Uses or relies on entities that include traditional code.

· Accesses your Google Cloud project resources or services hosted on a Compute Engine network.

Tools in Google app engine

Among many other things Google provides a set of useful tools to maintain, upload, test or develop an application in offline App Engine environment.

Development Server

The App Engine Java SDK consists of a development web server with a purpose of testing the application without a desire of uploading it to the web App Engine environment. The development server simulates the App Engine Java runtime environment with all of its services and Datastore included. Although the event server is meant to function the identical way because the App Engine Java runtime environment, it’s still quite common that some functionality that may work offline in its destination environment will simply not work. Similarly to the App Engine Java runtime environment the event server provides a console with most of the services useful for testing. When the event environment is running it’s possible to access the event console just by entering the URL (by default:http://localhost:8888/_ah/admin).

Google Plugin for Eclipse

Instead of putting in the event Server manually, Google provides a awfully useful plugin for Eclipse that does that. When installed, this feature adds a replacement possibility of making an internet Application Project. When the choice of making the net Application Project is chosen, the user includes a possibility of defining what SDK one wants to figure on or whether to use Google Web Toolkit (GWT) or not. After following a pair of steps the whole development environment is about. All the features previously described for the event Server also apply for Google Plugin for Eclipse because it implements the environment with Development Server included. to check the 93 Cloud Computing with a stress on PaaS and Google App Engine application on Development Server it’s only enough to decide on run or debug Web Application from the project’s options.

Local Unit Testing

App Engine provides testing utilities that use local implementations of Datastore and
other App Engine services. Local Unit Testing is more of an approach than a tool. It is the documentation that offers the hints on the way to write unit tests against various App Engine Services. The examples are written in JUnit.

Benefits of Google App Engine

1. 24 X 7 Availability

When you develop and deploy web applications on the cloud, you enable remote access for your applications. GAE is the right choice that lets the developers develop applications remotely, while the cloud service manages the infrastructure needs.

2. Ensure Faster Time to promote

For your web applications to succeed, ensuring faster time to promote is imperative because the requirements are likely to vary if the launch time is extended. Using Google App Engine is as easy because it can get for developers. the assorted tool repository and other functionalities ensure that the event and testing time gets reduced, which, in turn, ensures faster launch time for MVP and consecutive launches.

3. Easy to Use Platform

The developers only require to put in code. With zero configuration and server management, there will be no burden to manage and deploy the code. GAE makes it easy to use the platform, which offers the flexibleness to think about other concurrent web applications and processes. the foremost effective part is that Google App Engine automatically handles the traffic increase through patching, provisioning, and monitoring.

4. Diverse Set of APIs

Google App Engine has several built-in APIs and services that allow developers to make robust and feature-rich apps. These features include:

Access to the applying log

Blobstore, serve large data objects

Google App Engine Cloud Storage

SSL Support

Page Speed Services

Google Cloud Endpoint, for mobile application

User API, Memcache API, Channel API ,URL Fetch API, XXMP API, File API

5. Increased Scalability

Scalability is synonymous with growth — a crucial factor that assures success and competitive advantage. The great news is that the GAE cloud development platform is automatically scalable. Whenever the traffic to the online application increases, Google App Engine automatically scales up the resources, and vice-versa.

6. Improved Savings

With GAE, you’re doing not should spend extra on server management of the app. The Google Cloud service is good at managing the backend process.

Also, GAE pricing is flexible because the resources can scale up/down supported the app’s usage. The resources automatically scale up/down supported how the app performs within the market, thus ensuring honest pricing within the end.

7. Smart Pricing

The major concern of organizations revolves around what quantity does Google App Engine cost? For your convenience ,you will be charge what you use i.e. Google App Engine incorporates a daily and a monthly billing cycle.

Many companies and organizations use GAE some of them are:

• Snapchat

• Rovio (The makers of angry birds)

• Khan Academy

Deploying and implementing App engine

GAE environment makes it easy to build and deploy an application.

App engine is a perfect for those companies that don’t want to care about underlying infrastructure and only concern about making the service available all the time.

Following are the steps to deploy the application to app engine.

1.Create project

Visit to Google cloud dashboard and create a project by confirming it. Or you can use existing project if you have.

2.Copy the code from outside to the app engine

1. We can choose any language from languages supported by Google App engine for project.

e.g. Python, Java, PHP, GO, C#, Ruby , Node.js , .Net .

2.Cloud Shell is a built-in command line tool for the console. We’re going to use Cloud Shell to deploy our app. Cloud Shell is used to copy the code.

3.Enter the following command in cloud shell.

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

and then we can switch to the tutorial directory.

4.In sample application’s structure the website folder contains website content and its landing page must be index.html. and app.yaml is your application configuration file. Configuration file tell App engine how to map URLs to your static files.

3.Configuring your deployment

You are now in the main directory for the sample code.

1.Exploring your application

Enter the following command to view your application code.

Cat main.py

(your project’s languages may be different we are using python.)

2.Exploring your configuration

Google App Engine uses YAML files to specify a deployment’s configuration.

app.yaml files contain information about your application, like the runtime environment, environment variables etc.

4.Testing your app

For testing the app before deploying it we use Cloud Shell.

1.To testing app, create an isolated virtual environment. This ensures that your app does not interfere with other Python applications that may be available on your system.

Write following commands in cloud shell(at app_name in below command you can put your app name)

virtualenv — python python3 \
~/envs/app_name

2.Activate your newly-created virtual environment.

source \
~/envs/app_name/bin/activate

3.Use pip to install project dependencies.

pip install -r requirements.txt

4. Finally, run your app in Cloud Shell using the Flask development server:

python main.py

5.Deploying to google app engine.

In order to deploy your app, you need to create app in a region.

Enter:

gcloud app create

Use gcloud tool to deploy your web service to App engine.

You can use Cloud Shell to deploy your app. To deploy your app enter:

gcloud app deploy app.yaml — project \
prashantapaudel-219410

Your app has been deployed.

Summary

· GAE offers a PaaS standard environment to create and deploy web applications on Google’s infrastructure.

· The Google service could be a preferable choice for organizations as they are doing not should worry about hosting and managing the appliance infrastructure. It helps ensure faster time to plug, helps you to target core business capabilities, and helps you to efficiently manage the consecutive release cycle.

· To start with — Create a GAE account, founded app engine SDK, write the appliance ASCII text file, test the appliance, and at last deploy it on the cloud.

References:

· https://cloud.google.com/appengine

· https://www.netsolutions.com/insights/what-is-google-app-engine-its-advantages-and-how-it-can-benefit-your-business/

· https://prashantapaudel.medium.com/gcp-certification-series-3-3-deploying-and-implementing-app-engine-and-cloud-functions-resources-23cab2a02235

--

--

Abdul Rahim Ansari
0 Followers

Studying at Vishwakarma Institute of Technology