简体   繁体   English

在Google App Engine上存储图像的设计选择

[英]Design Choices for storing images on Google App Engine

I'm developing an application that I'm thinking of hosting on GAE, hopefully within the free tier. 我正在开发一个我打算在GAE上托管的应用程序,希望在免费套餐中。 It's an "own-time" project and I find the GAE documentation pretty incomprehensible when it comes to working out which products are available, how much they cost, and how they should be used. 这是一个“私人”项目,在确定哪些产品可用,价格多少以及应如何使用时,我发现GAE文档非常难以理解。

The app relies on users being able to upload images with some meta data. 该应用程序依赖于用户能够上传带有一些元数据的图像。 The meta data needs to be searchable and allow the images to be displayed. 元数据需要可搜索,并允许显示图像。

My problem comes with where to save the images. 我的问题是在哪里保存图像。 I'm storing the metadata in the DataStore. 我将元数据存储在DataStore中。 Google seem to imply that I should store the images in either Cloud Storage or the Blob Store, with a preference for Cloud Storage. Google似乎暗示我应该将图像存储在Cloud Storage或Blob Store中,并优先使用Cloud Storage。 This seems to be chargeable. 这似乎是收费的。

I also see mention of the Image Service - is this something else I should consider? 我还看到提到了图像服务-我还应该考虑这件事吗?

From Default Google Cloud Storage bucket : 默认的Google Cloud Storage存储桶中

Applications can use a Default Google Cloud Storage bucket, which has free quota and doesn't require billing to be enabled for the app. 应用程序可以使用默认Google Cloud Storage存储桶,该存储桶具有免费配额,并且不需要为该应用程序启用计费。 You create this free default bucket in the Google Cloud Platform Console App Engine settings page for your project. 您可以在项目的Google Cloud Platform Console App Engine设置页面中创建此免费的默认存​​储桶。

So you can use GCS without being charged as long as you don't exceed the free quota. 因此,只要您不超过免费配额,就可以免费使用GCS。

You also probably want to stick with the standard environment for its free quota. 您可能还希望使用其免费配额的标准环境。 From App Engine Pricing : App Engine定价中

App Engine applications run as instances within the standard environment or the flexible environment . App Engine应用程序在标准环境灵活环境中作为实例运行。

Instances within the standard environment have access to a daily limit of resource usage that is provided at no charge defined by a set of quotas . 标准环境中的实例可以访问资源的每日限制,该限制由一组配额免费提供 Beyond that level, applications will incur charges as outlined below. 超过该水平,申请将产生以下概述的费用。 To control your application costs, you can set a spending limit . 为了控制您的申请费用,您可以设置支出限额 To estimate costs for the standard environment, use the pricing calculator. 要估算标准环境的成本,请使用价格计算器。

For instances within the flexible environment, services and APIs are priced as described below. 对于灵活环境中的实例,服务和API的定价如下所述。

And for images-related options, from Overview of Images API for Java : 对于图像相关的选项,可从Java图像API概述中获取

Java 8 on App Engine supports Java's native image manipulation classes such as AWT and Java2D alongside the App Engine Images API. App Engine上的Java 8与App Engine Images API一起支持Java的本机图像处理类,例如AWTJava2D

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM