Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Mastering Google App Engine
  • Toc
  • feedback
Mastering Google App Engine

Mastering Google App Engine

3 (2)
close
Mastering Google App Engine

Mastering Google App Engine

3 (2)

Overview of this book

Developing web applications that serve millions of users is no easy task, as it involves a number of configurations and administrative tasks for the underlying software and hardware stack. This whole configuration requires not only expertise, but also a fair amount of time as well. Time that could have been spent on actual application functionality. Google App Engine allows you develop highly scalable web applications or backends for mobile applications without worrying about the system administration plumbing or hardware provisioning issues. Just focus writing on your business logic, the meat of the application, and let Google's powerful infrastructure scale it to thousands of requests per second and millions of users without any effort on your part. This book takes you from explaining how scalable applications work to designing and developing robust scalable web applications of your own, utilizing services available on Google App Engine. Starting with a walkthrough of scalability is and how scalable web applications work, this book introduces you to the environment under which your applications exist on Google App Engine. Next, you will learn about Google's datastore, which is a massively scalable distributed NoSQL solution built on top of BigTable. You will examine the BigTable concepts and operations in detail and reveal how it is used to build Google datastore. Armed with this knowledge, you will then advance towards how to best model your data and query that along with transactions. To augment the powerful distributed dataset, you will deep dive into search functionality offered on Google App Engine. With the search and storage sorted out, you will get a look into performing long running tasks in the background using Google App Engine task queues along with sending and receiving emails. You will also examine the memcache to boost web application performance, image processing for common image manipulation tasks. You will then explore uploading, storing, and serving large files using Blobstore and Cloud storage. Finally, you will be presented with the deployment and monitoring of your applications in production along with a detailed look at dividing applications into different working modules.
Table of Contents (12 chapters)
close
11
Index

Putting it all together


Now that we are done exploring everything about e-mails on Google App Engine, it is time to put it all together. We are going to develop an app that is similar to what we did in the last chapter. You give it a URL and an e-mail address. The page is downloaded, compressed, and stored in the datastore like before. But besides that, we also e-mail that page to the given e-mail address. In case the sending of the e-mail fails, we handle the bounce notifications and record this information in logs.

In case the user replies to the e-mail, we parse the incoming e-mails and record the feedback as well. Let's go through everything file by file. The first one is app.yaml:

application: your-app-id
version: 1 
runtime: python27 
api_version: 1 
threadsafe: true 

inbound_services: 
- mail 
- mail_bounce 

handlers: 
# Emails 
- url: /_ah/mail/.+ 
  script: email_handler.app 
  login: admin 
# Bounce backs 
- url: /_ah/bounce 
  script: email_handler.app 
  login: admin 
# Normal...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete