Jan Vladimir Mostert
Jan Vladimir Mostert

Reputation: 12972

Accessing Task Queues and Google Datastore in Google Compute Engine

Is there a way to access task queues and the datastore from a Google Compute Engine application? If so, please point me in the right direction, if not, then I guess I'll need to build an API on the Google Compute Engine side and call the API from the Google App Engine side (less ideal)

What I'm trying to do is to have a Google App Engine pop an ID of an entity on the Task Queue, once the application on Google Compute Engine receives it, it will do a lookup and retrieve that record from the datastore, do some heavy computation on it (which is not suitable for App Engine due to its various limitations) and then store the result directly into the entity.

Upvotes: 3

Views: 1056

Answers (1)

DanielViveiros
DanielViveiros

Reputation: 179

Yes, it's possible. You need to use a PULL queue and the Task Queue REST API to read the message inside GCE. More information here: https://developers.google.com/appengine/docs/java/taskqueue/rest/libraries

If you need to read from datastore directly, last year Google announced the Datastore API, so it should also be possible, although I have never done that. Anyway, perhaps it's possible to put the entity itself in the PULL queue to avoid another operation coming from the GCE.

Cheers!

Upvotes: 2

Related Questions