Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

App Engine - Datastore vs Blobstore for user uploaded profile pics?

Which one should I use? What are the pros and cons to using each? The images will all be less than 100 kilobytes. 3 kilobyte thumbnails of each image will be retrieved quite often, like 2 to 5 on each page view on average.

Which would be better to use, considering latency in retrieving the images, cost in CPU time of retrieving the images, and any other factors?

like image 653
Kyle Avatar asked Aug 04 '10 17:08

Kyle


3 Answers

This question came up again recently and has a great and detailed answer here. BlobStore storage is cheaper, and since BlobStore can serve the images directly without having to go through your app, you'll also gain efficiency and save on CPU cost. In your case, caching is very important, and BlobStore will automatically cache your images. It takes longer to set up, but as Swizec said, serving images is exactly what it was designed to do.

So the answer is: BlobStore.

like image 100
Sarah Northway Avatar answered Nov 11 '22 07:11

Sarah Northway


If it's profile picks, I don't think you should use either service. Gravatar provides a profile pic service for free and it won't affect your quotas. Just make a url composed of a checksummed version of the users email address.

like image 44
SingleNegationElimination Avatar answered Nov 11 '22 07:11

SingleNegationElimination


The BlobStore was designed to store and serve binary files.

The datastore was not.

It's really quite that simple.

Oh and if you ever want to crop images and such Google's images library works very well together with the blobstore.

like image 25
Swizec Teller Avatar answered Nov 11 '22 07:11

Swizec Teller