Storing large blob with Objectify Appengine

人走茶凉 提交于 2019-12-04 08:34:54

Rick's answer is really the best - store blobs in the blobstore, especially if you are new to GAE and having conceptual issues with the datastore.

On the other hand, there are some good reasons to use split entities for storing blobs, especially if you are storing data that is close to the 1M edge. You wouldn't want to do this with 100MB blobs, but 2MB blobs can make sense.

First of all, you don't want serialized or embedded. Those are simply ways to structure data inside a single entity.

Also, there's no magic annotation that lets you split blobs across entities. You have to do it all by hand. You don't need to actually create a 'master' or root entity; just create all the entity fragments with a parent defined by an id (but no actual entity) and use an ancestor() query to fetch all the pieces.

You should store it in the Blobstore and just save the Blobkey in Objectify. Objectify works on top of the datastore, not the blobstore.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!