Building Solutions for Google Cloud Platform with App Engine
As developers, the learning never ends. Just when we get used to a certain technology, it goes and changes. We’re always needing to learn new languages, frameworks, APIs, and platforms.
And if you’re also in charge of deploying your code, then you need to understand how to setup and configure web servers, deal with scaling issues and manage databases. Frankly, it can be exhausting!
So, why invest the time in learning yet another set of technologies? That’s the question I find myself asking whenever some new trend comes along. I want to know how it’ll make my job, and the jobs of my peers better or easier.
Throughout my career I’ve been responsible for deploying my own code. And I think that’s why the Google Cloud Platform resonates with me so well. It’s a platform that understands developers.
So, why take the time to learn something like App Engine? I think the answer is simple. Because you can take all your development experience and apply it to a platform as a service that removes most of the obstacles to getting code running in production.
The value of having Google ensure your app is highly available is worth a lot to me. We get a rich set of tools for developing locally, and simple deployments, with application versioning. All while using the same programming languages and frameworks that we’re used to.
If you’re looking for a native cloud platform for building out highly scalable applications, or mobile back-ends, then you’ve come to the right place. App Engine provides all that and more.
This course focuses on teaching you about the tools App Engine provides to build out highly scalable systems.
We’ll be building out Python web applications using Flask, and using Cloud Datastore as our database. There is a bit of a learning curve to getting started. And that’s what this course is for, to minimize the amount of time spent learning the platform, so you can get back to writing code.
The source code lives on: Github so feel free to download it, and follow along.
We’ll cover a lot of data in this 2 hour course. And by the end of it, you should feel comfortable getting started building out App Engine applications of your own.
And if you’re looking to get your Qualified Solutions Developer certification, this is going help you with that too.
So, if this sounds useful to you, let’s get started!
In this course
- We’ll create an App Engine application, and deploy it
- We’ll be Developing a REST API with Cloud Endpoints
- We’ll learn about the different Authentication and Authorization methods available on App Engine.
- We’ll learn about the monitoring and management tools available.
- We’ll cover the different storage options available.
- We’ll review Cloud Datastore more in depth.
- We’ll look into ways to improve application performance.
- And We’ll learn about Task Queues.
This is a intermediate level course because it assumes:
- You have development experience
What You'll Learn
|Lecture||What you'll learn|
|Intro||What will be covered in this course|
|Getting Started||Creating our first App Engine application|
|Cloud Endpoints||How to create RESTful APIs with Endpoints|
|Services||How to break our applications down into separate services|
|Authentication||How can we authenticate users?|
|Managing Applications||How do we manage App Engine apps?|
|Storage||How do we use the different storage options?|
|Datastore||A more in depth look at datastore|
|App Performance||How can we make our apps more responsive?|
|Task Queues||How can we run tasks outside of a user request?|
|What's next?||Where do we go from here?|
Welcome back to Developing Solutions for Google Cloud Platform. I'm Ben Lambert, and I'll be your instructor for this lesson. In this lesson we're gonna summarize what we've covered throughout the course and we're gonna talk about the next steps.
The learning objectives for this course were to create an App Engine application and deploy it. Which we covered in the first lesson, we created a Hello World application with Flask and then we deployed it with the application launcher. We also said we'd be developing REST APIs with endpoints.
In lesson two we created a basic endpoint service that allowed us to list off some cartoon characters, get a single character, and add new characters. We learned that we can use the concept of messages to receive data and that we can use Python or Java to build endpoints that can send Jason-based response messages. We said that we'd cover breaking down apps into services.
In lesson three, we learned about services which were once called modules, and how they allow us to break out functionality into its own app. And with its own runtime and scaling options. We created a simple do service, and then we showed how we can use datastore and Memcache for shared application state. Authentication and authorization were another learning objective.
In lesson four, we covered auth when we talked about some of the different options available for authenticating users and we showed the users API and how simple it was to authenticate users for our routes with configuration settings. We showed how to use simple API keys to use Google APIs that didn't need access to a user's data. And then we showed how to use service keys to allow Google APIs such as the Vision API to access our data from cloud storage. And we demonstrated using OAuth2 as a way to request permissions from users to access things like Google Drive.
We said that we would cover application management and monitoring and in lesson five we covered management using versions to allow us to incrementally roll out changes or to perform A B testing. And we saw how to use traffic migrations to switch traffic from one version to another. We also learned how to use the logging tool to parse through our application and request logs. And then we saw the Trace tool and how it will allow us to keep tabs on potential application performance issues. And we said we'd cover the different options for storage on App Engine.
And in lesson six we talked about things like cloud storage and how to use it to store our files and even make them public, allowing us to have cloud storage serve up the files. And we talked about Cloud SQL which is a Google-managed version of My SQL which supports vertical scaling for reads and writes and horizontal scaling for reads, allowing us to use a scalable relational database.
We also covered Cloud Datastore, which is a highly scalable, native cloud No SQL database. It's schemaless which allows us to define the structure of the entities in code, we can have different properties on our entities of the same kind. And we can even have two entities of the same kind with the same property name, just using different property types. This leaves us with a very flexible way to model our data. Covering Datestore more in depth was another important objective.
In lesson seven, we talked about indexes and how each property is individually indexed. And if we wanna create queries on multiple properties we have to use a composite index. Which the development server will generate for us the first time we run that query locally. And then we shifted gears towards transactions and how to gain strong consistency inside of transactions. We also said that we were gonna cover application performance.
In lesson eight we covered caching and scaling. We used Memcache to cache some frequently read data and we talked about using batch operations to make our caching reads and writes even faster. And then we talked about how to use manual, basic, and automatic scaling depending on our needs.
And finally, we said that we'd cover task queues. In lesson nine we covered how to use task queues. We talked about using the default push queue, and that it's only usable inside of App Engine. And then we covered pull queues and how to create a pull queue if we need to do work outside of App Engine. And then we used the cron.yaml file to create a scheduled task and deploy it to App Engine.
We've covered a lot in the course, so, what's next? This course was intended to teach you how to get started building solutions for App Engine. It's a starting point and it's not really a destination. Your next step should be to build something with App Engine. You can use something like the Thousand Words application as a base and improve and expand it. Or you can create something of your own. As developers, our learning depends on doing things. We can learn a lot by observing, however eventually we're gonna need to build things. It's when things break that we really learn how a system works. So, start building something.
Once you're comfortable building things and deploying them, you may wanna get certified as a Qualified Solutions Developer. Having recently passed the exam, I'm gonna share my experience with you now. The exam is taken online and you can find it by clicking the Take Exam button on the Details page for the specific exam. You'll need to sign up and once you're all signed up, you can schedule the exam. The windows for scheduling are something like every 15 minutes so you don't really need to schedule a week or a day in advance. It's a proctored, closed book exam, and you're given an hour and a half to answer 45 questions.
The questions are multiple choice and some are multiple answer. You're gonna wanna read them carefully. Now they don't try to trip you up with clever wording, however sometimes they'll be given in the negative form. For example, which certification is not a Google certification? Notice the word not. Read each question very carefully.
Do your best to find a quiet place to take the exam. There's no talking allowed and you shouldn't be wearing earbuds either. The exam costs 100 dollars as of the time of this recording and it's pass or fail. If you fail you can retake the exam after two days and after a second failure, you have to wait 14 days. Currently it doesn't tell us which areas we need to work on if we fail so if you fail, try and mentally take note of any of the questions that you weren't 100 percent sure of. And then when the exam is over I want you to jot 'em down on a piece of paper and look them up. Don't put it off, find the answers while the information is fresh in your mind.
How do you know when you're ready to actually take the exam? The short answer is, you don't. However, if you're comfortable building and deploying apps on App Engine you may be ready. Before you take the exam I recommend that you go through the documentation for App Engine. There's a lot of really useful information throughout the docs.
The exam is gonna test you on the following. The App Engine fundamentals, which includes task queues, traffic splitting, application versioning, services, quotas, authentication, App Engine Standard and Flexible Environments.
And then we have App Engine and Cloud Datatstore, which is going to cover entities, kinds, entity groups, queries, ancestor queries and indexes.
And then we have application configuration and management. These are gonna be things like scaling, application logging, troubleshooting app errors, Stackdriver and Memcache. Review the documentation shortly before taking the exam. It's gonna help you have this info fresh in your mind.
Now once you've taken the exam, pass or fail, I'd love to hear your story on the Community forum. Building course content is a collaborative effort and if there are things that you think would be useful for us to cover more in depth, letting us know will help us improve the content. Thanks for taking the time to watch this course. I hope it's been helpful in preparing you to develop solutions for App Engine. And if you end up taking the exam I hope to hear from you on how it went. For CloudAcademy, I'm Ben Lambert, thanks for watching.
Ben Lambert is a software engineer and was previously the lead author for DevOps and Microsoft Azure training content at Cloud Academy. His courses and learning paths covered Cloud Ecosystem technologies such as DC/OS, configuration management tools, and containers. As a software engineer, Ben’s experience includes building highly available web and mobile apps. When he’s not building software, he’s hiking, camping, or creating video games.