4 ms·
I was wondering about this, given the examples. AWS's Golang support for Lambda involves including their library and passing your function to a Lambda initializ
by skywhopper 8y ago
I was wondering about this, given the examples. AWS's Golang support for Lambda involves including their library and passing your function to a Lambda initializer function. Which I'm sure is all that's happening with this, but it's weird to hand off the Go source to Google. I wonder if they are multiplexing multiple functions in single binaries or using special Go toolchains. Or just don't want to lock into specific backends yet.
- justasitsounds 8y ago> AWS's Golang support for Lambda involves including their library and passing your function to a Lambda initializer function AWS announced 'native' Golang support last year - since then there hasn't been a need to use a Python or node 'shim' to bootstrap the golang executable like this. You just upload your compiled binary to S3 and provide the path to AWS lambda
- DSingularity 8y agoThat would be my guess. Since this is all event driven code, why wouldn’t they bundle them for improved system utilization?
- sudhirj 8y agoBecause Go's namespacing / packaging model doesn't have the kinds of isolation required to prevent you from accessing the code and variables of the other packages you've been bundled with, compared to NodeJS, which does (VM feature).
- zaphirplane 8y agoUnlikely Golang’s init block will get executed in all the multiplexed serverless functions that are bundled in the one binary. Which adds a side effect
- chrisbroadfoot 8y agoNo, there's no real magic. Each function runs in its own process (which is inside a gVisor sandbox). The toolchain is completely unmodified. Disclaimer: I work at GCP and worked on this product.