在 Android 应用程序中在 Google Cloud Storage 上部署数据库

本教程将介绍在 Android 应用程序中在 Google Cloud Storage 上部署数据库的处理方法,这篇教程是从别的地方看到的,然后加了一些国外程序员的疑问与解答,希望能对你有所帮助,好了,下面开始学习吧。

问题描述

在我的 android 应用程序中,我想将图像从我的 Android 应用程序存储到 Google Cloud Storage.为此,我指的是 Mobil Backend starter 示例.因为他们有一个部署在谷歌云存储上的后端数据库,但我不知道我可以在那里部署我自己的数据库.

在我的 Android 应用程序中查询数据库的步骤是什么?请帮我实现这个功能.谁能建议一个教程或链接,为在 Google Gloud 上使用和存储数据库提供适当的指导?谢谢.

推荐答案

如果您正在编写自己的需要使用存储的 App Engine 应用程序,您可以在 Google Cloud 中选择以下几种方式:

    使用 Datastore API 的 Mobile Backend Starter,它在 Google Cloud 中提供类似 NoSQL 的数据存储,您的 App Engine 应用程序可以通过 Datastore API 与之交互.默认情况下,您可以获得总共 1GB 的免费层空间,之后您必须为每次使用付费以满足您的存储需求.

    The Mobile Backend Starter using the Datastore API, that provides a NoSQL like datastore in the Google Cloud that your App Engine application can interact with via the Datastore API. By default you get a total of 1GB of space in the free tier, after which you have to pay per use for your storage requirements.

有 Cloud Storage API,可让请问对象保存到 Google Cloud Storage Service.该服务类似于 Amazon S3 服务,您可以保存您的数据,分类为组,即存储桶.这是一项付费服务​​.参考 https://cloud.google.com/products/cloud-storage/

如果您更喜欢处理 SQL,可以查看 Google Cloud SQL,它为您提供云中的 MySQL 实例.这也是一项付费服务​​.参考 https://developers.google.com/cloud-sql/

最后,如果您的应用程序更喜欢使用用户本身的 Google Drive 帐户,那么您可以考虑直接与 Google Drive API 集成.最近 Google 对其 Android Drive API 进行了很好的更新.https://developers.google.com/drive/android/

在上述所有情况下,在与 App Engine 应用程序交互时,建议您在 App Engine 应用程序中通过类似 REST 的 API 公开数据服务.

好了关于在 Android 应用程序中在 Google Cloud Storage 上部署数据库的教程就到这里就结束了,希望趣模板源码网找到的这篇技术文章能帮助到大家,更多技术教程可以在站内搜索。

0
没有账号?注册  忘记密码?