Edwardt
Edwardt

Reputation: 147

How do I get one App Engine Project to query a different App Engine's Datastore?

I have two App Engine projects. One collects data into the datastore and does some other things. The other is just to report on the datastore collections from the first App Engine. I am writing these programs in Java. I appreciate assistance to how I can make the query work across the two GAE projects.

Upvotes: 1

Views: 145

Answers (2)

max
max

Reputation: 29993

Much has changed since 2014. Today you just can use the Google cloud client libraries to for Java to access any Projects Datastore.

Upvotes: 0

Mihail Russu
Mihail Russu

Reputation: 2536

You have three options to access one app's datastore from another:

  1. As suggested in the comments you can use Modules to combine the two apps into one. Read more here: https://cloud.google.com/appengine/docs/java/modules/

  2. You can use remote_api to connect one app's datastore from another. Read more here: https://cloud.google.com/appengine/docs/java/tools/remoteapi

  3. You can write your own simple REST API that will server one app the data from its own datastore.

Upvotes: 3

Related Questions