3
votes

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.

2
"Now I have a different application running on the Google Cloud Storage." I assume you mean running on Google Compute Engine?proppy

2 Answers

1
votes

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.

0
votes

This opensource API (using Json API ) is simpler than protocol buffer api

https://github.com/JavaMonday/gcd-json-java

example usage :

List<Foo> list = ds.gqlQuery(Foo.class).queryString("SELECT * FROM Foo").list();