Book Image

Mastering Google App Engine

By : Mohsin Hijazee, Mohsin Shafique
Book Image

Mastering Google App Engine

By: Mohsin Hijazee, Mohsin Shafique

Overview of this book

Table of Contents (18 chapters)
Mastering Google App Engine
About the Author
About the Reviewers

Chapter 7. Using Task Queues

When you open a URL, usually you get a text document in response that usually contains marked up text with HTML (and CSS, JavaScript), which in turn is either generated on the fly or is fetched from the file system as is. In any case, the time it takes for such a computational activity is pretty small, in the order of a few hundred milliseconds. But there are things that need and take more time than just milliseconds and can't be appropriately done within such time frame.

For more computationally expensive tasks, it's best if they are executed in the background. And that's where the task queues comes in where you queue computationally expensive tasks and process them later at your convenience in the background or in case there are batches of data that need to be processed and cannot be done in a single request. Google App Engine provides you with this functionality to enqueue your longer tasks and process them in background. That's what this chapter is all about...