在 Android 应用程序中在 Google Cloud Storage 上部署数据库 [英] Deploying database on Google Cloud Storage in Android application

本文介绍了在 Android 应用程序中在 Google Cloud Storage 上部署数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

In my android application I want to store images from my Android application to Google Cloud Storage. For that I'm referring to this Mobil Backend starter example. In that they have a backend database which is deployed on Google Cloud Storage, but I don't know I can deploy my own database there.

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

What are the steps to query the database in my android app? Please help me to implement this functionality. Can anyone suggest a tutorial or link which provides proper guidelines for using and storing DB on Google Gloud? Thank you.

推荐答案

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

If you are writing your own App Engine application that needs to use storage, you have several options in the Google Cloud:

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

  1. 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/

There is the Cloud Storage API, that allows you to save objects to Google Cloud Storage Service. This service is analogous to Amazon S3 service and you can save your data, classified into groups i.e. buckets. This is a paid service. Refer to https://cloud.google.com/products/cloud-storage/

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

If you prefer to deal with SQL, you can look at Google Cloud SQL, which gives you a MySQL Instance in the cloud. This is a paid service too. Refer to https://developers.google.com/cloud-sql/

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

Finally, if you application prefers that you use the Google Drive account of the User itself, then you can look at directly integrating with Google Drive API. Recently Google introduced good updates to their Android Drive API. https://developers.google.com/drive/android/

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

In all the above cases, when it comes to interacting with the App Engine application, it is advisable that you expose the Data Services via a REST like API in your App Engine application.

这篇关于在 Android 应用程序中在 Google Cloud Storage 上部署数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆