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
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Blobs


While discussing datastore, we mentioned that you can store binary objects in ndb.BlobProperty, but there's a better way to do this. The ndb.BlobProperty directly stores uninterpreted bytes in datastore. One of the criteria for datastore pricing is the amount of data that goes out of datastore. So, if you have stored large blobs in datastore, it will become expensive while reading out your entities.

However, you can avoid this by using GQL (or projection via API) and only selecting a few properties, and this might save you some bandwidth. But the real problem still exists. You may recall that all the entity properties are stored in a single column in the underlying BigTable. So, even if you select only a few properties, this might save you the internal bandwidth, but the performance penalty will still be there.

So, a better option is Blobstore which can handle very large binary objects, be it images or large high-quality video files. When you hand over a file to Blobstore, you get a...