Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Mastering Google App Engine
  • Table Of Contents Toc
  • Feedback & Rating feedback
Mastering Google App Engine

Mastering Google App Engine

3 (2)
close
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
close
11
Index

Available runtimes

You can write web applications on top of Google App Engine in many programming languages, and your choices include Python, Java, Go, and PHP. For Python, two versions of runtimes are available, we will focus on the latest version.

Let's briefly look at each of the environments.

Python

The most basic and important principle of all runtime environments, including that of Python, is that you can talk to the outside world only by going through Google's own services. It is like a completely sealed and contained sandbox where you are not allowed to write to the disk or to connect to the network. However, no program will be very useful in that kind of isolation. Therefore, you can definitely talk to the outside world but only through the services provided by the App Engine. You can also ship your own code and libraries but they must all be in pure Python code and no C extensions are allowed. This is actually a limitation and tradeoff to ensure that the containers are always identical. Since no external libraries are allowed, it can be ensured that the minimal set of native required libraries is always present on the instance.

At the very beginning, App Engine started with the Python runtime environment, and version 2.5 was the one that was available for you. It had a few external libraries too, and it provided a CGI environment for your web app to talk to the world. That is, when a web request comes in, the environment variables are set from the request, the body goes to stdin and the Python interpreter invoked with given program. It is up to your program to then handle and respond to the request. This runtime environment is now deprecated.

Later, the Python 2.7 runtime environment came along, with new language features and updated shipped libraries. A major departure from the Python 2.5 runtime environment was not only the language version, but also a switch from CGI to WSGI. Because of this switch, it became possible for web apps to process requests concurrently. This boosted the overall throughput per instance. We will examine CGI and WSGI in detail in the next chapter.

The Java runtime environment

Java runtime environment presents a standard Servlet version 2.5 environment, and there are two language versions available—Java 5 and Java 6. The Java 6 runtime environment is deprecated and will be soon removed. The Java 6 runtime environment will be replaced and new applications users can only be able to use Java 7. The app.xml is a file that defines your application, and you have various standard Java APIs available to talk to Google services, such as JPA for persistence, Java Mail for mail, and so on.

This runtime environment is also capable of handling concurrent requests.

Go

This runtime environment uses the new Go programming language from Google. It is a CGI environment too, and it's not possible to handle concurrent requests, the applications are written in Go version 1.4.

PHP

This is a preview platform, and the PHP interpreter is modified to fit in the scalable environment with the libraries patched, removed, or the individual functions disabled. You get to develop applications just as you would do for any normal PHP web application, but there are many limitations. Many of the standard library modules are either not available, or are partially functional, the applications are written in PHP version 5.5.

Create a Note

Modal Close icon
You need to login to use this feature.
notes
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

Delete Note

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

Edit Note

Modal Close icon
Write a note (max 255 characters)
Cancel
Update Note

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY