About the 2nd Edition
The 2nd edition of Programming Google App Engine was published by O'Reilly Media in October 2012. It is available in print, Kindle, PDF, ePub, Mobi, and DAISY editions.
What's New
The 2nd edition features over 250 pages of new or rewritten material from the 1st edition. Features include:
- Completely updated for Python 2.7 and the High Replication datastore
- Coverage of new datastore features such as cursors, projection queries, and cross-group transactions
- All-new chapters on instances, the Blobstore, AppStats, and more
- Extended and rewritten chapters on task queues, memcache, URL Fetch, email, XMPP, and the Django web application framework
- Even more fully-tested sample code
Here's the chapter list for the 2nd edition:
- Chapter 1: Introducing Google App Engine
- Chapter 2: Creating an Application
- Chapter 3: Configuring an Application
- Chapter 4: Request Handlers and Instances
- Chapter 5: Datastore Entities
- Chapter 6: Datastore Queries
- Chapter 7: Datastore Transactions
- Chapter 8: Datastore Administration
- Chapter 9: Data Modeling with Python
- Chapter 10: The Java Persistence API
- Chapter 11: The Memory Cache
- Chapter 12: Large Data and the Blobstore
- Chapter 13: Fetching URLs and Web Resources
- Chapter 14: Sending and Receiving Email Messages
- Chapter 15: Sending and Receiving Instant Messages with XMPP
- Chapter 16: Task Queues and Scheduled Tasks
- Chapter 17: Optimizing Service Calls
- Chapter 18: The Django Web Application Framework
- Chapter 19: Managing Request Logs
- Chapter 20: Deploying and Managing Applications
For a more detailed table of contents, see O'Reilly's page.
2nd Edition Errata
All errata from the 1st edition has been fixed in the 2nd edition. But of course, new material means new bugs! The following issues were present in the version of the 2nd edition that went to print in October 2012, and these may or may not have been fixed in updates.
App Engine is an active project, and may have changed since the 2nd edition was published. For a complete list of changes, see the App Engine release notes for Java and Python.
Many thanks to the readers that have submitted errata and feedback! Submit your feedback.
Chatper 2
- The Clock application (both Python and Java versions) uses an integer type to store the user's timezone UCT offset. Some timezones use UCT offsets with a fractional hour part. For example, India Standard Time (IST) uses a UCT offset of +5 hours 30 minutes. The code sample can be modified to accept and store offsets as a number of minutes (330 for IST) or tenths of an hour (55). Note that storing the offset as a floating point value may result in rounding errors.
Chapter 5
- The Python
db.allocate_ids()
example passes a prototype key to the function built asdb.Key.from_path('Entity', 0)
. The0
should be a1
. (An ID of0
tells the library that the key is "incomplete." The ID is otherwise ignored.)
Chatper 6
- The Python example of datastore cursors is missing an import statement:
import os
Chapter 16
- In "Transactional Tasks in Python," the code sample is missing the
transactional=True
parameter in the call totaskqueue.add()
. As described in the text above the sample (which is correct), the parameter is necessary for the task to be added transactionally. If omitted, the task is silently added separately from the transaction, which makes this bug difficult to catch in practice, so be careful!