0

There are a number of questions on whether or not to use blobstore, such as Store Photos in Blobstore or as Blobs in Datastore - Which is better/more efficient /cheaper?. In all of the cases that I have read, the image is something which changes relatively rarely, such as a profile image.

I need to store thumbnail images for the first frame of many different user-written programs. Every time that they change their program the thumbnail will be recalculated. As such, it could happen at a rate of up to multiple times per minute.

Blobstore's support for read/create/delete but not update suggests to me that it is not intended for this type of use case. Is it?

Community
  • 1
  • 1
Daniel F
  • 340
  • 1
  • 3
  • 16

2 Answers2

1

I wouldn't recommend blobstore for your use case. Have you considered using Google Cloud Storage instead? It's far more flexible while still allowing you to use the Images API (https://cloud.google.com/appengine/docs/python/images/) for serving your thumbnails.

Another reason I would shy away from blobstore is that it doesn't sound like Google plans to support it in the long term, given their recent turn down of the Files API (https://cloud.google.com/appengine/docs/deprecations/files_api).

Jeremy Rans
  • 211
  • 1
  • 5
0

As the other answer notes, the blobstore appears to be deprecated so best to not rely on it for longer term plans.

The replacement for the blobstore is Google Cloud Storage (GCS), but I do not recommend using it for frequently changing data. In my experience, the API for GCS is not reliable and produces a lot of time out errors.

Profile images should be reasonably small and much less than 1MB (the entity size limit). I recommend storing the profile images as an ndb.BlobProperty in an entity. Note that this is not the same as storing them in the blobstore. The BlobProperty will be stored in the datastore as a property of an entity. This will make it easy to update them.

new name
  • 15,861
  • 19
  • 68
  • 114