What is Google App Engine?
GAE provides more infrastructure than other scalable hosting services, such as Amazon Elastic Compute Cloud (EC2). GAE also eliminates some system administration and development tasks to make writing scalable applications easier.
Google provides GAE free up to a certain amount of use for the following resources:
Users exceeding the per-day or per-minute rates can pay for more of these resources.
How is GAE used?
GAE is a fully managed, serverless platform that is used to host, build and deploy web applications. Users can create a GAE account, set up a software development kit and write application source code. They can then use GAE to test and deploy the code in the cloud.
One way to use GAE is building scalable mobile application back ends that adapt to workloads as needed. Application testing is another way to use GAE. Users can route traffic to different application versions to A/B test them and see which version performs better under various workloads.
What are GAE's key features?
Key features of GAE include the following:
API selection. GAE has several built-in APIs, including the following five:
- Blobstore for serving large data objects;
- GAE Cloud Storage for storing data objects;
- Page Speed Service for automatically speeding up webpage load times;
- URL Fetch Service to issue HTTP requests and receive responses for efficiency and scaling; and
- Memcache for a fully managed in-memory data store.
Managed infrastructure. Google manages the back-end infrastructure for users. This approach makes GAE a serverless platform and simplifies API management.
Support for legacy runtimes. GAE supports legacy runtimes, which are versions of programming languages no longer maintained. Examples include Python 2.7, Java 8 and Go 1.11.
Application diagnostics. GAE lets users record data and run diagnostics on applications to gauge performance.
Traffic splitting. GAE lets users route requests to different application versions.
Versioning. Applications in Google App Engine function as a set of microservices that refer back to the main source code. Every time code is deployed to a service with the corresponding GAE configuration files, a version of that service is created.
Google App Engine benefits and challenges
GAE extends the benefits of cloud computing to application development, but it also has drawbacks.
Benefits of GAE
- Ease of setup and use. GAE is fully managed, so users can write code without considering IT operations and back-end infrastructure. The built-in APIs enable users to build different types of applications. Access to application logs also facilitates debugging and monitoring in production.
- Pay-per-use pricing. GAE's billing scheme only charges users daily for the resources they use. Users can monitor their resource usage and bills on a dashboard.
- Scalability. Google App Engine automatically scales as workloads fluctuate, adding and removing application instances or application resources as needed.
- Security. GAE supports the ability to specify a range of acceptable Internet Protocol (IP) addresses. Users can allowlist specific networks and services and blocklist specific IP addresses.
- Lack of control. Although a managed infrastructure has advantages, if a problem occurs in the back-end infrastructure, the user is dependent on Google to fix it.
- Performance limits. CPU-intensive operations are slow and expensive to perform using GAE. This is because one physical server may be serving several separate, unrelated app engine users at once who need to share the CPU.
- Limited access. Developers have limited, read-only access to the GAE filesystem.
- Java limits. Java apps cannot create new threads and can only use a subset of the Java runtime environment standard edition classes.
Examples of Google App Engine
One example of an application created in GAE is an Android messaging app that stores user log data. The app can store user messages and write event logs to the Firebase Realtime Database and use it to automatically synchronize data across devices.
Java servers in the GAE flexible environment connect to Firebase and receive notifications from it. Together, these components create a back-end streaming service to collect messaging log data.
GAE can be used in many different application contexts. Additional sample application code in GitHub includes the following:
- a Python application that uses Blobstore;
- a program that uses MySQL connections from GAE to Google Cloud Platform SQL; and
- code that shows how to set up unit tests in GAE.
GAE lets users structure applications as microservices. Learn the difference between service-oriented architecture and microservices and the benefits of each.