与数据存储和云存储通过Java的谷歌Compute引擎进行通信 [英] Communication with Datastore and cloud Storage from google Compute engine in Java

查看:119
本文介绍了与数据存储和云存储通过Java的谷歌Compute引擎进行通信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有GAE应用程序,它在Google Cloud Datastore中创建一些数据并将一些二进制文件存储到Google Cloud Storage中 - 让我们称之为 Web应用程序



现在,我在Google云存储 Google计算引擎上运行了一个不同的应用程序。现在,ComputeApp应该连接到数据存储区,查询由WebApp创建的实体并读取相关的二进制文件来自Google云端存储。然后,CoumputeApp会对二进制文件进行一些处理,例如重新编码为不同的格式,并将其存储回云存储并更新数据存储区中的相关实体。

现在让我描述一个问题:

ComputeApp如何与DataStore进行通信? (我使用Objectify)
我发现的唯一方法是GAE Remote API for Java。它在连接到本地运行的WebApp时起作用,但在连接到在GAE中部署的WebApp时不起作用。原因可能是此处。但我不知道python,所以我不理解所描述的解决方案。
我的ComputeApp如何与GAE Datastore服务进行通信还有其他可能的方式吗?



非常感谢!



编辑:我改正了我的错字,正确地注意到了。您可以使用 Google云数据存储API (目前处于预览状态)



目前不支持App Engine Java客户端库,如Objectify,只有低级别的Java基于protobuf的API:请参阅 Java入门指南



我在公开问题上创建了一个问题跟踪器,因为这是工程团队未来有兴趣支持的事情。

I've GAE application which creates some data in the Google Cloud Datastore and stores some binary files into the Google Cloud Storage - let's call the application WebApp.

Now I have a different application running on the Google Cloud Storage Google compute engine. Let's call the application ComputeApp.

Now, the ComputeApp should connect to the Datastore, query for entities created by the WebApp and read related binary file from the Google Cloud Storage. Then the CoumputeApp does some processing over the binary file such is reencoding to different format and store it back to the Cloud Storage and update related entity in the Datastore.

Now let me describe a problem:

How can the ComputeApp communicate with the DataStore? (I use Objectify for that) Only method I found is GAE Remote API for Java. It works when connecting to my WebApp running locally, but it doesn't work when connecting to my WebApp deployed in the GAE. The reason is probably described here. But I donnot know python, so I donnot understand the described solution. Is there any other possible way how my ComputeApp can communicate with the GAE Datastore service?

Thanks a lot!

Edit: I corrected my typo as proppy rightly noted.

解决方案

You can connect to the Datastore from Compute Engine using Google Cloud Datastore API (currently in Preview)

Currently there is no support for App Engine Java client library like Objectify, only a low level Java API based on protobuf: see the Getting Started Guide for Java.

I created an issue on the public issue tracker as this is something the engineering team is interested to support in the future.

这篇关于与数据存储和云存储通过Java的谷歌Compute引擎进行通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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