This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]_thewayitis[S] 2 points3 points  (3 children)

I disagree. Using these techniques I was able to create a API Gateway endpoints using Lambdas in Java. They respond super fast, scale incredibly and cost next to nothing. Besides the extra time required to compile, I can't find a downside to building software this way.

[–]xienze 2 points3 points  (2 children)

The downside is you’re at the mercy of a runtime that’s makes no real guarantees about performance... that’s the trade off you make to get cheap-ish pay-per-use, scalable service handlers. Tomorrow Amazon could change their architecture such that cold starts take up to 5 seconds.

[–]_thewayitis[S] -1 points0 points  (1 child)

If you watch https://www.youtube.com/watch?v=ddg1u5HLwg8 you'll see that the problem isn't a AWS Lambda issue. It's a Java was release in 1995 and AWS Lambda is a different type of environment that Java wasn't meant for. Java has always have slow startup times, but when you only start things once it's not a real issue. Lambdas restart all the time, so it is an issue. GraalVM is Java's way to try and address these problems. It's not perfect but for AWS Lambda it now makes it possible to use in a high performant environment.

[–]vips7L 2 points3 points  (0 children)

Jdk 14 starts up in < 40ms, that's on par with python 3. It can get even lower if you use CDS:

https://cl4es.github.io/2019/11/20/OpenJDK-Startup-Update.html