Reputation: 9218
If I were to make a project with the Google App Engine (using Python), and this project contained small user-generated images (which, once uploaded, will be accessed a lot, but won't change or altered dynamically anymore), would the Google App Engine BlobStore make sense to use (in terms of costs, speed etc.)? Or would GAE or the client connecting to Amazon S3 and storing images there make more sense, as these files will end up being static?
For what it's worth, the generated image files are all considered to be public, not user-private, and it would be perfectly fine for them to be on another subdomain. All files will be fixed-palette 16 colors PNGs of exactly 19x19 pixels. Their URL/ID would be referenced in the GAE datastore, with a couple of more attributes (like creatorId), for handling/ showing them in the web app.
Thanks!
Upvotes: 2
Views: 1445
Reputation: 16882
If you are concerned about speed and cost, by far the best way is to store them in the blobstore and use get_serving_url()
(link). These images are served by google's high performance image servers, and will never cost you instance hours, just bandwidth, and you don't have to worry about memcache.
Upvotes: 8
Reputation: 15219
For such small images, you can simply use the Datastore. Even with the 1Gb of space it gives you in the free quotas you should be able to store a few 19x19 pixels images easily. Using BlobStore is slightly more complicated as the API's are more complex and the actual sotorage procedure involves more steps than just storing binary data in the DataStore. I do recommend however that you implement memCache for the retrieval of these images, since you say that will not be modified afterwards. You don't want to query the same 19*19*4 bytes out of the database for each image over and over.
Upvotes: 1
Reputation: 1204
I asked a similar question a few days ago. Im sticking with storing the images in the DataStore as BLOBS (not in the BlobStore) and ensuring i set a Cache Control header to ensure they arent requested too many times.
Upvotes: 1