Reputation: 608
I have a database in Google Datastore. I don't know how to use cloud functions, but i want to trigger an event after a creation or an update. Unfortunately the documentation is light on the subject : https://cloud.google.com/appengine/docs/standard/java/datastore/callbacks
I don't know how i could use @PostPut to trigger an event as soon as a line is created or updated.
Does anyone have a tutorial which a basic example ?
thank you
Upvotes: 0
Views: 2723
Reputation: 8964
Cloud Datastore does not support real-time triggers on CRUD (Create, Read, Update, Delete) events.
However, you can migrate to Cloud Firestore which does support real-time triggers for those actions (by way of Cloud Pub/Sub which can be made to invoke a Cloud Function). Cloud Firestore is the successor to Cloud Datastore and may eventually supplant it at some point in future.
Upvotes: 3
Reputation: 1098
Dan MacGrath provided an answer to a similar request (callbacks are indeed discussed below. Such solution doesn't exist yet. As a workaround, taking into account the current available triggers:
I would suggest a couple of solutions:
EDIT 1
node.js 6
in Github.node.js 6
in Github (the same than before).Upvotes: 3