3 ms·
Fantastic paper. So I've been playing with the java and python runtimes and it's absolutely stunning how much better python is on execution and start up time.
by Something1234 5y ago
Fantastic paper. So I've been playing with the java and python runtimes and it's absolutely stunning how much better python is on execution and start up time.
Also how does an event actually get to the lambda handler? Because they can come from all kind of sources.
- mdaniel 5y agoI believe they fire up an http server, based on how their local executor behaves, and then do "servlet-y" (or WSGi-y) dispatch into the entry point method
- ben0x539 5y agoJudging from five minutes of browsing the go runtime sources, they poll some lambda API: https://github.com/aws/aws-lambda-go/blob/159d1c69878562cd5409719d4fc4cfa298e2c4bf/lambda/runtime_api_client.go#L71 https://github.com/aws/aws-lambda-go/blob/159d1c69878562cd54... The response is apparently posted to another API endpoint. Googling for the environment variable actually specifying the API endpoint, I found https://docs.aws.amazon.com/lambda/latest/dg/runtimes-custom.html https://docs.aws.amazon.com/lambda/latest/dg/runtimes-custom... which seems to spell out some of the details. Of course that just moves the question to "where does the runtime API get the event from?" but at that point they could be doing all kinds of things, I guess. Now I'm curious to see what happens if you ask for more events before returning a response for the first event you got. Can you actually process events in parallel?
- bigodanktime 5y agoPretty sure its just gRPC calls, and firecracker passes events along to its firecracker-containerd services. My guess is java is slow as it works really well when the JIT can optimize your code. Longer running functions will very likely outperform python.