Repository navigation
Closed
Milestone
Description
Google Cloud Functions work a little differently from AWS. However we'll try to have a common interface across provider whenever we can, which should be easier with the provider-per-service approach. Here's a basic outline of their offering and how we can support it:
Research:
- Google Functions use
triggersto trigger functions. It's just like our events concept, so we'll call iteventsfor consistency. - Google Functions support HTTP, Bucket, Pub/Sub topic and direct invoke triggers. They don't yet support schedule events.
- Google Functions can support additional triggers by using Pub/Sub topics as a proxy, for example Gmail push notifications and cloud logging.
- Google Functions can be tested/invoked using the direct trigger event.
- Google Functions can be deployed from either a Google Storage bucket, or a source control repo. We'll probably go with the bucket approach for consistency.
- Google Functions are not yet supported in the SDK, and they don't provide a public REST API either. The only way to access Google Functions right now is via the CLI. So we'll have to have this dependency, at least for now.
- Google Functions are not supported in Google Resource Manager either. So we won't be able to deploy via the resource manager and be consistent in that front.
- Google Functions logs are accessed via Google StackDriver, the equivalent of AWS CloudWatch. So we'll be able to have logging functionality.
- The entry point is called
entryPointbut we should call thishandlerfor consistency - Right now only Node.js is supported
- Google thinks in terms of
Projectswe should keepService - Two types of functions (
foregroundandbackground--> docs)
Questions:
- Should we go full
CLIsince CloudFunctions can only be deployed this way or should we use the Resource Manager to e.g. deploy theserviceBucket? - How do we abstract the
Pub/Sub topicsupport as an event source?
Helpful links:
Reacted by Philipp Muens, Austen , Simone Scarduzio, Midge 't Hoen, Alex Eftimie, Cristiano Belloni, Dan McDonald, Daniel Vassilev, Roman Hotsiy, Kevin Brey and 5 more
Metadata
Metadata
Assignees
Labels
No labels
Activity
pmuens commentedon Jul 8, 2016
@eahefnawy thanks for that! Awesome!
Added a few more notes to your already awesome description!
eahefnawy commentedon Jul 8, 2016
Available Regions:
Default timeout:
60 seconds
Triggers:
.cloudfunctions.net/
Package Deployment:
Notes
jmdobry commentedon Oct 13, 2016
gRPC (HTTP/2) client is in the works.
pmuens commentedon Oct 14, 2016
Damn @jmdobry 💃 👯 right in time!
Thank you very much for that!
pmuens commentedon Oct 25, 2016
Hey @jmdobry thanks for the example!
I just started to implement this and got your example up and running.
However I'm struggling to create / update a function.
Is there any chance to get a real quick example how one can create a function with the help of the API? I saw that I need to specify the function itself in the request but I'm not sure how exactly this would look like.
Thanks in advance!
jmdobry commentedon Oct 25, 2016
Edit: This sample could probably be tweaked so that is doesn't write the zip file to disk, but instead streams it straight up to the GCS bucket. When the new library is ready it will do some of this stuff for you.
pmuens commentedon Oct 26, 2016
Thank you very much for this in-depth example @jmdobry! 👏 👍
That's exactly what I need.
I just deployed the first function this morning through the API 💃
flomotlik commentedon Nov 4, 2016
closing here as this is now in a separate PR and will be moved to a separate repo
arycloud commentedon Nov 20, 2017
I'm also struggling to achieve this thing using python, not success till now!