Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate with Google Cloud Functions #125

Open
armanbilge opened this issue Dec 25, 2021 · 4 comments
Open

Integrate with Google Cloud Functions #125

armanbilge opened this issue Dec 25, 2021 · 4 comments
Labels
enhancement New feature or request google cloud

Comments

@armanbilge
Copy link
Member

Did some preliminary research, there seem to be:

  1. Http functions. These are a distinct type of function, and will need separate JVM and JS implementations. The JS implementation can use the node-serverless module in http4s.
  2. Background functions. I think these are more similar to Lambda, in that there is a common interface and various types of triggers that are parsed as JSON.
@armanbilge armanbilge added the enhancement New feature or request label Dec 25, 2021
@armanbilge
Copy link
Member Author

armanbilge commented Jan 1, 2022

I started working on this a bit and it seems that the background functions are (about to become) legacy, in favor of CloudEvents, which are supposedly designed to be cloud-platform-independent. It seems the Cloud Functions documentation hasn't been updated with this, and it's still not entirely clear to me how to deploy cloud-event-based functions.

In any case, it seems we may want to build our own Functions Framework according to the contract laid out here:
https://github.com/GoogleCloudPlatform/functions-framework#functions-framework-contract
IMO this is actually a lot more interesting, since it describes something lower-level (i.e., listening on ports rather than being handed pre-digested events) and actually might be portable beyond the Google Cloud Platform. So this gives us a lot more control over how we do things, and makes them much easier to test without requiring to emulate specific cloud environments.

@armanbilge
Copy link
Member Author

For performance, efficiency and correctness reasons, the framework must be able to handle multiple concurrent invocations of the developer's function.

This is very interesting 🤓

@armanbilge armanbilge changed the title Integrate with Google Cloud Functions Implement the Google Functions Framework Jan 1, 2022
@armanbilge armanbilge changed the title Implement the Google Functions Framework Integrate with Google Cloud Functions Jan 1, 2022
@armanbilge
Copy link
Member Author

Superseded by #132.

@armanbilge
Copy link
Member Author

Well, I suppose this is worth keeping open actually. At the moment I don't think you can deploy a custom Functions Framework to Cloud Functions (you have to buy into one of their frameworks) and Cloud Functions is a different product with a different pricing model etc. than e.g. Cloud Run or another service where you can deploy an custom Functions Framework.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request google cloud
Projects
None yet
Development

No branches or pull requests

1 participant