GoogleCloudPlatform / node-red-contrib-google-cloud

Node-RED nodes for Google Cloud Platform
Apache License 2.0
90 stars 57 forks source link

Cloud Functions support #79

Open myco opened 4 years ago

myco commented 4 years ago

Hello. I am interested in Cloud Functions node for NodeRED. Is it in your future plans? Do you know if someone already working on such (for example Python based) Cloud Function which could be integrated with PubSub.

kolban-google commented 4 years ago

Hello my friend. Let's see if we can't work together to understand what Cloud Functions node for NodeRED would look like. As I understand Cloud Functions, when we use those, we (the developers) are responsible for providing the body of a function in either NodeJS, Python, Go or Java. The rest of the environment is provided for us by Cloud Functions such that when an incoming REST request is received, the request is automatically passed to the body of our function for execution.

With that story in mind, how would NodeRED and GCP Cloud Functions relate to each other?

Today, NodeRED can send REST requests which can be used to trigger Cloud Function. As such, nothing special needed there.

Are you perhaps thinking about running NodeRED as the implementation of a Cloud Function? If that were the case then I'd steer you away from Cloud Functions and towards Cloud Run.

As for the tail end question ... may I suggest posting to the Google Slack community for general usage questions? There is an active channel there called #functions which is dedicated to Cloud Functions.

One can join the GCP Slack community here:

https://join.slack.com/t/googlecloud-community/shared_invite/zt-erdf4ity-8ZMUQ18DYV~5hkbZ~gCswg

n0mer commented 3 years ago

@kolban-google probably it is about https://firebase.google.com/docs/functions/callable ("callable functions")