SlideShare a Scribd company logo
1 of 91
Download to read offline
Adopting Java for the
Serverless world
from the perspective of the AWS developer
by Vadym Kazulkin, ip.labs GmbH
Contact
Vadym Kazulkin
ip.labs GmbH Bonn, Germany
Co-Organizer of the Java User Group Bonn
and Serverless Bonn Meetup
v.kazulkin@gmail.com
@VKazulkin
@ServerlessBonn (Meetup)
https://www.linkedin.com/in/vadymkazulkin/
https://www.iplabs.de/
ip.labs GmbH
https://www.iplabs.de/
Java popularity
https://www.cleveroad.com/blog/programming-languages-ranking Vadym Kazulkin @VKazulkin , ip.labs GmbH
AWS and Serverless
2020 Magic Quadrant for Cloud Infrastructure & Platform Services
https://pages.awscloud.com/GLOBAL-multi-DL-gartner-mq-cips-2020-learn.html?pg=LWIAWS
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Vadym Kazulkin @VKazulkin , ip.labs GmbH“State of Serverless 2020 report” https://codingsans.com/blog/serverless-trends
2020 AWS Lambda Benchmark Report for Developers, DevOps, and Decision Makers
https://newrelic.com/resources/ebooks/serverless-benchmark-report-aws-lambda-2020
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Life of the Java Serverless developer
on AWS
AWS Java Versions Support
• Java 8
• With extended long-term support
• Java 11 (since 2019)
• Only Long Term Support (LTS) by AWS
• Next LTS Java version is Java 17 in 2021
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Source: https://aws.amazon.com/de/corretto/
Java ist very fast
and mature
programming
language…
Image: burst.shopify.com/photos/a-look-across-the-landscape-with-view-of-the-sea Christian Bannes and Vadym Kazulkin @VKazulkin , ip.labs GmbH
… but
Serverless
adoption of Java
looks like this
Vadym Kazulkin @VKazulkin , ip.labs GmbH“State of Serverless 2020 report” https://codingsans.com/blog/serverless-trends
2020 AWS Lambda Benchmark Report for Developers, DevOps, and Decision Makers
https://newrelic.com/resources/ebooks/serverless-benchmark-report-aws-lambda-2020
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Developers love Java and will be happy
to use it for Serverless
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Creating AWS Lambda with Java 1/2
:
Source https://blog.runscope.com/posts/how-to-write-your-first-aws-lambda-function
Creating AWS Lambda with Java 2/2
:
Source https://blog.runscope.com/posts/how-to-write-your-first-aws-lambda-function
Challenge Number 1 with Java is a
big cold-start
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Source: https://www.serverless.com/blog/keep-your-lambdas-warm
Cold Start
:
Source: Ajay Nair „Become a Serverless Black Belt” https://www.youtube.com/watch?v=oQFORsso2go
Bootstrap the Java Runtime Phase
• AWS Lambda starts the JVM
• Java runtime loads and initializes
handler class
• Static initializer block of the handler class is
executed
• Boosted host full CPU access up to 10 seconds
• Lambda calls the handler method
• Full CPU access only approx. at 1.8 GB
“assigned” memory to the function
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Source: Stefano Buliani : "Best practices for AWS Lambda and Java„ https://www.youtube.com/watch?v=ddg1u5HLwg8
AWS Lambda cold start duration
per programming language
Source: Mikhail Shilkov: „AWS Lambda: Cold Start Duration per Language. 2020 edition” https://mikhail.io/serverless/coldstarts/aws/languages/
Cold start duration with Java
• Below 1 second is best-case cold start duration for very simple
Lambda like HelloWorld with no dependencies
• It goes up significantly with more complex scenarios
• Dependencies to multiple OS projects
• Clients instantiation outside of the handler method to communicate with other
(AWS) services (e.g. DynamoDB, SNS, SQS, 3rd party)
• To minimize the cold start time apply best practices from this talk
• Worst-case cold starts can be higher than 10 and even 20 seconds
Source: Stefano Buliani : "Best practices for AWS Lambda and Java„ https://www.youtube.com/watch?v=ddg1u5HLwg8
Sean O‘Toole „AWS Lambda Java Tutorial: Best Practices to Lower Cold Starts” https://www.capitalone.com/tech/cloud/aws-lambda-java-tutorial-reduce-cold-starts/
2020 AWS Lambda Benchmark Report for Developers, DevOps, and Decision Makers
https://newrelic.com/resources/ebooks/serverless-benchmark-report-aws-lambda-2020
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Provisioned
Concurrency for
Lambda Functions
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Yan Cui: https://lumigo.io/blog/provisioned-concurrency-the-end-of-cold-starts/
Jeremy Daly: “Mixing VPC and Non-VPC Lambda Functions for Higher Performing Microservices”
https://www.jeremydaly.com/mixing-vpc-and-non-vpc-lambda-functions-for-higher-performing-microservices/ Vadym Kazulkin @VKazulkin , ip.labs GmbH
Lambda behind the
Virtual Private
Cloud (VPC)
Lambda in VPC
As function’s execution environment
scales
• More network interfaces are created and
attached to the Lambda infrastructure
• The exact number of network interfaces
created and attached is a factor of your
function configuration and concurrency
• Caused additional the cold start up to
approx. 10 seconds
Chris Munns: "Announcing improved VPC networking for AWS Lambda functions”
https://aws.amazon.com/de/blogs/compute/announcing-improved-vpc-networking-for-aws-lambda-functions/
Lambda in VPC Improvements:
• The network interface creation happens
when Lambda function is created or its
VPC settings are updated.
• The network interfaces are shared across
execution environments
• Only a handful of network interfaces are
required per function
• Reduced additional cold start from approx.
10 seconds to below 1 second
Chris Munns: "Announcing improved VPC networking for AWS Lambda functions”
https://aws.amazon.com/de/blogs/compute/announcing-improved-vpc-networking-for-aws-lambda-functions/
Improvements 1/4
• Switch to the AWS SDK 2.0 for Java
• Lower footprint and more modular
• Allows to configure HTTP Client of your choice (e.g. Java own Basic HTTP Client
or newly introduced AWS Common Runtime async HTTP Client)
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Source: Stefano Buliani : "Best practices for AWS Lambda and Java„ https://www.youtube.com/watch?v=ddg1u5HLwg8
Zoe Wang: „Introducing AWS Common Runtime HTTP Client in the AWS SDK for Java 2.x”
https://aws.amazon.com/de/blogs/developer/introducing-aws-common-runtime-http-client-in-the-aws-sdk-for-java-2-x/
S3AsyncClient.builder()
.httpClientBuilder(AwsCrtAsyncHttpClient.builder()
.maxConcurrency(50))
.build();
Improvements 1/4
Provide all known values (for building clients e.g. DynamoDB client)
to avoid auto-discovery
• credential provider, region, endpoint
AmazonDynamoDB client = AmazonDynamoDBClientBuilder.standard()
.withRegion(Regions.US_WEST_2)
.withCredentials(new ProfileCredentialsProvider("myProfile"))
.build();
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Source: Stefano Buliani : "Best practices for AWS Lambda and Java„ https://www.youtube.com/watch?v=ddg1u5HLwg8
Sean O‘Toole „AWS Lambda Java Tutorial: Best Practices to Lower Cold Starts” https://www.capitalone.com/tech/cloud/aws-lambda-java-tutorial-reduce-cold-starts/
Improvements 1/4
• Initialize and prime dependencies during initialization phase
• Use static initialization in the handler class, instead of in the handler method (e.g.
handleRequest) to take the advantage of the access to the full CPU core for max 10 seconds
• „Fake“ the calls to pre-initalize „things“, e.g. Jackson Marshallers in case of DynamoDB client
AmazonDynamoDB client = AmazonDynamoDBClientBuilder.standard()...build();
DynamoDB dynamoDB = new DynamoDB(client);
Table table = dynamoDB.getTable(„mytable");
Item item = table.getItem("Id", 210);
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Source: Stefano Buliani : "Best practices for AWS Lambda and Java„ https://www.youtube.com/watch?v=ddg1u5HLwg8
Sean O‘Toole „AWS Lambda Java Tutorial: Best Practices to Lower Cold Starts” https://www.capitalone.com/tech/cloud/aws-lambda-java-tutorial-reduce-cold-starts/
getItem() call forces Jackson Marshallers to initialize
Improvements 1/4
• Less (dependencies, classes) is more
• Include only required dependencies (e.g. not the whole AWS SDK 2.0 for Java, but the
dependencies to the clients to be used in Lambda)
• Exclude dependencies, which you don‘t need at runtime e.g. test frameworks like Junit
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Source: Stefano Buliani : "Best practices for AWS Lambda and Java„ https://www.youtube.com/watch?v=ddg1u5HLwg8
Sean O‘Toole „AWS Lambda Java Tutorial: Best Practices to Lower Cold Starts” https://www.capitalone.com/tech/cloud/aws-lambda-java-tutorial-reduce-cold-starts/
https://github.com/awsdocs/aws-doc-sdk-examples/tree/master/javav2
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.4.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>dynamodb</artifactId>
<version>2.10.86</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>bom</artifactId>
<version>2.10.86</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Improvements 2/4
Avoid Reflection
Or use DI Frameworks like Micronaut, Quarkus or Dagger which aren‘t
reflection-based
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Source: Stefano Buliani : "Best practices for AWS Lambda and Java„ https://www.youtube.com/watch?v=ddg1u5HLwg8
Sean O‘Toole „AWS Lambda Java Tutorial: Best Practices to Lower Cold Starts” https://www.capitalone.com/tech/cloud/aws-lambda-java-tutorial-reduce-cold-starts/
Improvements 3/4
Strive for cost optimization
Vadym Kazulkin @VKazulkin , ip.labs GmbH
AWS Lambda pricing model
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Cost for Lambda
REQUEST DURATION
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Request Tier
$ 0.20
Per 1 Mio Requests
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Duration Tier
$ 0.00001667
Per GB-Second
Christian Bannes and Vadym Kazulkin @VKazulkin , ip.labs GmbH
GB-Second
ONE SECOND ONE GB
Christian Bannes and Vadym Kazulkin @VKazulkin , ip.labs GmbH
Example
• 1 Mio requests
• Lambda with 512MiB
• Each lambda takes 180ms
(will be rounded to 200ms)
0.5 GiB * 0.2 sec * 1 Mio
= 100 000 GB-Seconds
Requests:
$0.20
GB-Seconds:
$1.67
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Cost scales
linearly with
memory
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Improvements 4/4
More memory = more expensive?
Christian Bannes and Vadym Kazulkin @VKazulkin , ip.labs GmbH
Lambda Power Tuning
• Executes different
settings in parallel
• Outputs the optimal
setting
Image: https://github.com/alexcasalboni/aws-lambda-power-tuning Vadym Kazulkin @VKazulkin , ip.labs GmbH
Monitor the Java Virtual Machine
Garbage Collection on AWS
Lambda
Source: Steffen Grunwald „Monitoring the Java Virtual Machine Garbage Collection on AWS Lambda”
https://aws.amazon.com/de/blogs/architecture/field-notes-monitoring-the-java-virtual-machine-garbage-collection-on-aws-lambda/
AWS Java Versions Support
• Java 8
• With extended long-term support
• Java 11 (since 2019)
• Only Long Term Support (LTS) by AWS
• Next LTS Java version is Java 17 in 2021
• What about the support of the current Java version 15?
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Source: https://aws.amazon.com/de/corretto/
Current Java Version Support with frgaal
• frgaal can produce bytecode from Java 14 (with new and
experimental features) syntax that is compatible with JDK 8
• JDK 9–14 contains no features that would require bytecode changes except
modules and records
• Var and textblocks features are purely syntactic
• Switch expressions and “instanceof” do not require any special bytecode
either
• Most of these features just alter the Abstract Syntax Tree (AST) of Java, so
it’s possible to emit JDK 8 compatible bytecode for the generator
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Source: https://frgaal.org/
Toni Epple „Use next generation Java, today! “ https://medium.com/@toni.epple/use-next-generation-java-today-d3394efb8c24
Current Java Version Support with frgaal
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<dependencies> <dependency>
<groupId>org.frgaal</groupId>
<artifactId>compiler-maven-plugin</artifactId>
<version>14.0.2</version>
</dependency> </dependencies>
Vadym Kazulkin @VKazulkin , ip.labs GmbH
<configuration>
<compilerId>frgaal</compilerId>
<source>14</source>
<target>1.8</target>
<compilerArgs>
<arg>-Xlint:deprecation</arg>
<arg>--enable-safe-preview</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
</build>
Source: https://frgaal.org/
Toni Epple „Use next generation Java, today! “ https://medium.com/@toni.epple/use-next-generation-java-today-d3394efb8c24
mvn clean install
Cost optimization
• Java is well optimized for long running server applications
• High startup times
• High memory utilization
Vadym Kazulkin @VKazulkin , ip.labs GmbH
And both memory and execution time are cost dimensions,
when using Serverless in the cloud
GraalVM enters the scene
Source: https://www.graalvm.org/
Project Metropolis
Goals:
Low footprint ahead-of-time mode for JVM-based languages
High performance for all languages
Convenient language interoperability and polyglot tooling
Source: „Everything you need to know about GraalVM by Oleg Šelajev & Thomas Wuerthinger” https://www.youtube.com/watch?v=ANN9rxYo5Hg
GraalVM
Architecture
Sources: Practical Partial Evaluation for High-Performance Dynamic Language Runtimes http://chrisseaton.com/rubytruffle/pldi17-truffle/pldi17-truffle.pdf
„The LLVM Compiler Infrastructure“ https://llvm.org/
GraalVM
Architecture
Sources: Practical Partial Evaluation for High-Performance Dynamic Language Runtimes http://chrisseaton.com/rubytruffle/pldi17-truffle/pldi17-truffle.pdf
„The LLVM Compiler Infrastructure“ https://llvm.org/
SubstrateVM
Source: Oleg Šelajev, Thomas Wuerthinger, Oracle: “Deep dive into using GraalVM for Java and JavaScript”
https://www.youtube.com/watch?v=a-XEZobXspo
GraalVM and SubstrateVM
Source: Oleg Selajev, Oracle : “Run Code in Any Language Anywhere with GraalVM” https://www.youtube.com/watch?v=JoDOo4FyYMU
GraalVM on SubstrateVM
A game changer for Java & Serverless?
Java Function compiled into a native executable using
GraalVM on SubstrateVM reduces
• “cold start” times
• memory footprint
by order of magnitude compared to running on JVM.
And both memory and execution time are cost dimensions,
when using Serverless in the cloud
GraalVM on SubstrateVM
A game changer for Java & Serverless?
Current challenges with native executable using GraalVM :
• Most Cloud Providers (AWS) doesn’t provide GraalVM as Java
Runtime out of the box, only Open JDK (i.e. AWS provides Corretto)
• Some Cloud Providers (e.g. AWS) provide Custom Runtime Option
Lambda Layers
& Lambda
Runtime API
Christian Bannes and Vadym Kazulkin @VKazulkin , ip.labs GmbH
Custom Lambda Runtimes
GraalVM Complitation Modes
Source: „Everything you need to know about GraalVM by Oleg Šelajev & Thomas Wuerthinger” https://www.youtube.com/watch?v=ANN9rxYo5Hg
AOT vs JIT
Source: „Everything you need to know about GraalVM by Oleg Šelajev & Thomas Wuerthinger” https://www.youtube.com/watch?v=ANN9rxYo5Hg
GraalVM Profile-Guided Optimizations
Source: „https://www.graalvm.org/reference-manual/native-image/PGO”
Support of GraalVM native images in Frameworks
Spring Framework: working toward GraalVM native image support
without requiring additional configuration or workaround is one of the
themes of upcoming Spring Framework 5.3
Spring Boot: Ongoing work on experimental Spring Graal Native
project. Probably ready for the 2.4 release
Quarkus: a Kubernetes Native Java framework developed by Red Hat
tailored for GraalVM and HotSpot, crafted from best-of-breed Java
libraries and standards.
Micronaut: a modern, JVM-based, full-stack framework for building
modular, easily testable microservice and serverless applications.
Source: „GraalVM native image support“ https://github.com/spring-projects/spring-framework/wiki/GraalVM-native-image-support
Common principles for all Frameworks
• Rely on as little reflection as possible
• Speed up start up times and decrease memory usage for Microservice
and Serverless Java applications
• With and without usage of GraalVM and native image
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Steps to deploy to AWS
• Installation prerequisites
• Framework of your choice (Micronaut, Quarkus, Spring)
• Java 8 or 11 or GraalVM and Native Image
• Apache Maven or Gradle
• AWS CLI and AWS SAM CLI (for local testing)
• Build Linux executable of your application with GraalVM native-image
• Deploy Linux executable as AWS Lambda Custom Runtime
• Function.zip with bootstrap Linux executable
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Source: https://github.com/awslabs/aws-serverless-java-container/tree/master/samples/micronaut/pet-store
AWS Lambda Deployment of Custom Runtime with SAM
Source: https://github.com/awslabs/aws-serverless-java-container/tree/master/samples/micronaut/pet-store
Micronaut Framework
Source: https://micronaut.io/
AWS Lambda with Micronaut Framework
Testing AWS Lambda with Micronaut Framework
Micronaut Additional Features
• Custom Validators
• AWS API Gateway integration
• Spring annotation processor available
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Source: Stefano Buliani : "Best practices for AWS Lambda and Java„ https://www.youtube.com/watch?v=ddg1u5HLwg8
Build GraalVM Native Image with Micronaut Framework
There is already Gradle plugin, Maven plugin in development
Quarkus
Source: https://quarkus.io/
AWS Lambda with Quarkus Framework
Testing AWS Lambda with Quarkus Framework
Build GraalVM Native Image with Quarkus Framework
mvn –Pnative package
Quarkus Additional Features
• Website for creating the App
• AWS API Gateway integration
• Funqy
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Source: Stefano Buliani : "Best practices for AWS Lambda and Java„ https://www.youtube.com/watch?v=ddg1u5HLwg8
Quarkus Fanqy
Source: https://quarkus.io/guides/funqy
Quarkus-Fanqy AWS
Serverless Support
• AWS Lambda
• AWS API Gateway
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Spring (Boot) Framework
Source: https://spring.io/
Spring GraalVM Native Project
Vadym Kazulkin @VKazulkin , ip.labs GmbH
AWS Lambda with Spring Framework
using Spring Graal Native and Spring Cloud Functions
Bean Registration with Spring Framework
using Spring Graal Native and Spring Cloud Functions
Build GraalVM Native Image with Spring Framework
mvn –Pnative package
Framework Comparison 1/2
• Project Initializer
• Programming Model
• Database Support
• Test Support
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Source: „Battle Of The Microservice Frameworks: Micronaut versus Quarkus edition! by Michel Schudel“ https://www.youtube.com/watch?v=hnEXOqcNXPs
„Micronaut 2.0 vs Quarkus 1.3.1 vs Spring Boot 2.3 Performance on JDK 14“ https://www.youtube.com/watch?v=rJFgdFIs_k8
Framework Comparison 2/2
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Source: „Battle Of The Microservice Frameworks: Micronaut versus Quarkus edition! by Michel Schudel“ https://www.youtube.com/watch?v=hnEXOqcNXPs
„Micronaut 2.0 vs Quarkus 1.3.1 vs Spring Boot 2.3 Performance on JDK 14“ https://www.youtube.com/watch?v=rJFgdFIs_k8
• Native Image with Framework
• Build time
• Native Image Size
• (Cold) Startup Time
• Request/Invocation duration
• Memory Consumption
• Plain Framework
• Application Size
• (Cold) Start Time
• Request/Invocation duration
• Memory Consumption
Conclusion 1/3
• GraalVM and Frameworks are really powerful with a lot of potential
• Micronaut and Quarkus will improve the cold starts of Java
applications significantly even without GraalVM and native image
• They use as little as possible reflection and other optimizations
• Cold start duration will still be in the range of single digit seconds depending on your
application
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Source: „https://stackoverflow.com/questions/63328298/how-do-you-debug-a-no-instances-of-are-allowed-in-the-image-heap-when-buil
Conclusion 2/3
• But the combination of discussed frameworks with GraalVM and Native
Image currently not without challenges
• AWS Lambda Custom runtime requires Linux executable only
• Managing Custom Runtime requires some additional effort
• Delivering execution runtime (i.e. Java) via Lambda Custom Runtime reduces performance
compared to (the same) managed Lambda Runtime
• Windows and Mac developers may only build Linux executable via Docker
• plenty of 'No instances of … are allowed in the image heap’ and other errors when building
a native image
• Lots of experimentation with additional build arguments like “initialize-at-runtime” or “delay-
class-initialization-to-runtime“ required
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Source: „https://stackoverflow.com/questions/63328298/how-do-you-debug-a-no-instances-of-are-allowed-in-the-image-heap-when-buil
Conclusion 3/3
• Once again: Less (dependencies, classes) is more
• AWS Lambda function should be small and shouldn’t have many dependencies
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Source: „https://stackoverflow.com/questions/63328298/how-do-you-debug-a-no-instances-of-are-allowed-in-the-image-heap-when-buil
Try it yourselves
• Micronaut
• https://github.com/micronaut-guides/micronaut-function-aws-lambda
• Quarkus
• https://github.com/JosemyDuarte/quarkus-terraform-lambda-demo/tree/dynamo-terraform
• Spring Boot
• https://github.com/spring-projects-experimental/spring-graalvm-native/tree/master/spring-
graalvm-native-samples/function-aws
• Misc
• https://github.com/awslabs/aws-serverless-java-container/tree/master/samples
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Project Leyden
Source: https://mail.openjdk.java.net/pipermail/discuss/2020-April/005429.html
www.iplabs.de
Thank You!

More Related Content

What's hot

DevOps On AWS - Deep Dive on Continuous Delivery
DevOps On AWS - Deep Dive on Continuous DeliveryDevOps On AWS - Deep Dive on Continuous Delivery
DevOps On AWS - Deep Dive on Continuous DeliveryMikhail Prudnikov
 
Continuous Delivery in the AWS Cloud
Continuous Delivery in the AWS CloudContinuous Delivery in the AWS Cloud
Continuous Delivery in the AWS CloudNigel Fernandes
 
AWS re:Invent 2016: Chalk Talk: Succeeding at Infrastructure-as-Code (GPSCT312)
AWS re:Invent 2016: Chalk Talk: Succeeding at Infrastructure-as-Code (GPSCT312)AWS re:Invent 2016: Chalk Talk: Succeeding at Infrastructure-as-Code (GPSCT312)
AWS re:Invent 2016: Chalk Talk: Succeeding at Infrastructure-as-Code (GPSCT312)Amazon Web Services
 
Serverless in Java Lessons learnt
Serverless in Java Lessons learntServerless in Java Lessons learnt
Serverless in Java Lessons learntKrzysztof Pawlowski
 
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...Amazon Web Services
 
Serverless in production, an experience report
Serverless in production, an experience reportServerless in production, an experience report
Serverless in production, an experience reportYan Cui
 
Deploy, scale and manage your application with AWS Elastic Beanstal
Deploy, scale and manage your application with AWS Elastic BeanstalDeploy, scale and manage your application with AWS Elastic Beanstal
Deploy, scale and manage your application with AWS Elastic BeanstalAmazon Web Services
 
Continuous Integration and Deployment Best Practices on AWS
Continuous Integration and Deployment Best Practices on AWSContinuous Integration and Deployment Best Practices on AWS
Continuous Integration and Deployment Best Practices on AWSAmazon Web Services
 
Security in serverless world
Security in serverless worldSecurity in serverless world
Security in serverless worldYan Cui
 
Accelerating Innovation with DevOps on AWS
Accelerating Innovation with DevOps on AWSAccelerating Innovation with DevOps on AWS
Accelerating Innovation with DevOps on AWSAmazon Web Services
 
Security in serverless world
Security in serverless worldSecurity in serverless world
Security in serverless worldYan Cui
 
How did we get here and where are we going
How did we get here and where are we goingHow did we get here and where are we going
How did we get here and where are we goingYan Cui
 
Continuous Delivery to Amazon ECS
Continuous Delivery to Amazon ECSContinuous Delivery to Amazon ECS
Continuous Delivery to Amazon ECSAmazon Web Services
 
Rock Solid Deployment of Web Applications
Rock Solid Deployment of Web ApplicationsRock Solid Deployment of Web Applications
Rock Solid Deployment of Web ApplicationsPablo Godel
 
Getting Started With Docker on AWS
Getting Started With Docker on AWSGetting Started With Docker on AWS
Getting Started With Docker on AWSMikhail Prudnikov
 
Building a CICD Pipeline for Container Deployment to Amazon ECS - May 2017 AW...
Building a CICD Pipeline for Container Deployment to Amazon ECS - May 2017 AW...Building a CICD Pipeline for Container Deployment to Amazon ECS - May 2017 AW...
Building a CICD Pipeline for Container Deployment to Amazon ECS - May 2017 AW...Amazon Web Services
 
DevOps, Microservices and Serverless Architecture
DevOps, Microservices and Serverless ArchitectureDevOps, Microservices and Serverless Architecture
DevOps, Microservices and Serverless ArchitectureMikhail Prudnikov
 
DevOps on AWS: Accelerating Software Delivery with the AWS Developer Tools
DevOps on AWS: Accelerating Software Delivery with the AWS Developer ToolsDevOps on AWS: Accelerating Software Delivery with the AWS Developer Tools
DevOps on AWS: Accelerating Software Delivery with the AWS Developer ToolsAmazon Web Services
 

What's hot (20)

DevOps On AWS - Deep Dive on Continuous Delivery
DevOps On AWS - Deep Dive on Continuous DeliveryDevOps On AWS - Deep Dive on Continuous Delivery
DevOps On AWS - Deep Dive on Continuous Delivery
 
Continuous Delivery in the AWS Cloud
Continuous Delivery in the AWS CloudContinuous Delivery in the AWS Cloud
Continuous Delivery in the AWS Cloud
 
AWS re:Invent 2016: Chalk Talk: Succeeding at Infrastructure-as-Code (GPSCT312)
AWS re:Invent 2016: Chalk Talk: Succeeding at Infrastructure-as-Code (GPSCT312)AWS re:Invent 2016: Chalk Talk: Succeeding at Infrastructure-as-Code (GPSCT312)
AWS re:Invent 2016: Chalk Talk: Succeeding at Infrastructure-as-Code (GPSCT312)
 
Serverless in Java Lessons learnt
Serverless in Java Lessons learntServerless in Java Lessons learnt
Serverless in Java Lessons learnt
 
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
 
Serverless in production, an experience report
Serverless in production, an experience reportServerless in production, an experience report
Serverless in production, an experience report
 
Deploy, scale and manage your application with AWS Elastic Beanstal
Deploy, scale and manage your application with AWS Elastic BeanstalDeploy, scale and manage your application with AWS Elastic Beanstal
Deploy, scale and manage your application with AWS Elastic Beanstal
 
Continuous Integration and Deployment Best Practices on AWS
Continuous Integration and Deployment Best Practices on AWSContinuous Integration and Deployment Best Practices on AWS
Continuous Integration and Deployment Best Practices on AWS
 
Security in serverless world
Security in serverless worldSecurity in serverless world
Security in serverless world
 
Accelerating Innovation with DevOps on AWS
Accelerating Innovation with DevOps on AWSAccelerating Innovation with DevOps on AWS
Accelerating Innovation with DevOps on AWS
 
Security in serverless world
Security in serverless worldSecurity in serverless world
Security in serverless world
 
How did we get here and where are we going
How did we get here and where are we goingHow did we get here and where are we going
How did we get here and where are we going
 
Continuous Delivery to Amazon ECS
Continuous Delivery to Amazon ECSContinuous Delivery to Amazon ECS
Continuous Delivery to Amazon ECS
 
Rock Solid Deployment of Web Applications
Rock Solid Deployment of Web ApplicationsRock Solid Deployment of Web Applications
Rock Solid Deployment of Web Applications
 
Getting Started With Docker on AWS
Getting Started With Docker on AWSGetting Started With Docker on AWS
Getting Started With Docker on AWS
 
Building a CICD Pipeline for Container Deployment to Amazon ECS - May 2017 AW...
Building a CICD Pipeline for Container Deployment to Amazon ECS - May 2017 AW...Building a CICD Pipeline for Container Deployment to Amazon ECS - May 2017 AW...
Building a CICD Pipeline for Container Deployment to Amazon ECS - May 2017 AW...
 
New AWS Services
New AWS ServicesNew AWS Services
New AWS Services
 
DevOps, Microservices and Serverless Architecture
DevOps, Microservices and Serverless ArchitectureDevOps, Microservices and Serverless Architecture
DevOps, Microservices and Serverless Architecture
 
DevOps on AWS: Accelerating Software Delivery with the AWS Developer Tools
DevOps on AWS: Accelerating Software Delivery with the AWS Developer ToolsDevOps on AWS: Accelerating Software Delivery with the AWS Developer Tools
DevOps on AWS: Accelerating Software Delivery with the AWS Developer Tools
 
AWS Deployment Best Practices
AWS Deployment Best PracticesAWS Deployment Best Practices
AWS Deployment Best Practices
 

Similar to Adopting Java for the Serverless world at JUG Hamburg

Adopting Java for the Serverless world at Serverless Meetup New York and Boston
Adopting Java for the Serverless world at Serverless Meetup New York and BostonAdopting Java for the Serverless world at Serverless Meetup New York and Boston
Adopting Java for the Serverless world at Serverless Meetup New York and BostonVadym Kazulkin
 
Adopting Java for the Serverless World at VoxxedDays Luxemburg
Adopting Java for the Serverless World at VoxxedDays LuxemburgAdopting Java for the Serverless World at VoxxedDays Luxemburg
Adopting Java for the Serverless World at VoxxedDays LuxemburgVadym Kazulkin
 
Adopting Java for the Serverless World at JUG Darmstadt 2022
Adopting Java for the Serverless World at JUG Darmstadt 2022Adopting Java for the Serverless World at JUG Darmstadt 2022
Adopting Java for the Serverless World at JUG Darmstadt 2022Vadym Kazulkin
 
Adopting Java for the Serverless World at JUG Bonn 2022
Adopting Java for the Serverless World at JUG Bonn 2022Adopting Java for the Serverless World at JUG Bonn 2022
Adopting Java for the Serverless World at JUG Bonn 2022Vadym Kazulkin
 
Adopting Java for the Serverless World at JUG Hessen 2022
Adopting Java for the Serverless World at JUG Hessen 2022Adopting Java for the Serverless World at JUG Hessen 2022
Adopting Java for the Serverless World at JUG Hessen 2022Vadym Kazulkin
 
How to reduce cold starts for Java Serverless applications in AWS at Serverle...
How to reduce cold starts for Java Serverless applications in AWS at Serverle...How to reduce cold starts for Java Serverless applications in AWS at Serverle...
How to reduce cold starts for Java Serverless applications in AWS at Serverle...Vadym Kazulkin
 
How to reduce cold starts for Java Serverless applications in AWS at InfoShar...
How to reduce cold starts for Java Serverless applications in AWS at InfoShar...How to reduce cold starts for Java Serverless applications in AWS at InfoShar...
How to reduce cold starts for Java Serverless applications in AWS at InfoShar...Vadym Kazulkin
 
Adopting Java for the Serverless World at JAX 2022
Adopting Java for the Serverless World at JAX 2022Adopting Java for the Serverless World at JAX 2022
Adopting Java for the Serverless World at JAX 2022Vadym Kazulkin
 
Adopting Java for the Serverless World at Voxxed Days Bruxelles 2023
Adopting Java for the Serverless World at Voxxed Days Bruxelles 2023Adopting Java for the Serverless World at Voxxed Days Bruxelles 2023
Adopting Java for the Serverless World at Voxxed Days Bruxelles 2023Vadym Kazulkin
 
How to reduce cold starts for Java Serverless applications in AWS at JCON Wor...
How to reduce cold starts for Java Serverless applications in AWS at JCON Wor...How to reduce cold starts for Java Serverless applications in AWS at JCON Wor...
How to reduce cold starts for Java Serverless applications in AWS at JCON Wor...Vadym Kazulkin
 
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...Vadym Kazulkin
 
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...Vadym Kazulkin
 
Getting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudAmazon Web Services
 
Customer Case Study: Land Registry as a Service in the Cloud - AWS PS Summit ...
Customer Case Study: Land Registry as a Service in the Cloud - AWS PS Summit ...Customer Case Study: Land Registry as a Service in the Cloud - AWS PS Summit ...
Customer Case Study: Land Registry as a Service in the Cloud - AWS PS Summit ...Amazon Web Services
 
AWS Lambda SnapStart: Why, How and What AWS Serverless Meetup New York Boston...
AWS Lambda SnapStart: Why, How and What AWS Serverless Meetup New York Boston...AWS Lambda SnapStart: Why, How and What AWS Serverless Meetup New York Boston...
AWS Lambda SnapStart: Why, How and What AWS Serverless Meetup New York Boston...Vadym Kazulkin
 
AWS Community Day 2022 Dhiraj Mahapatro_AWS Lambda under the hood _ Best Prac...
AWS Community Day 2022 Dhiraj Mahapatro_AWS Lambda under the hood _ Best Prac...AWS Community Day 2022 Dhiraj Mahapatro_AWS Lambda under the hood _ Best Prac...
AWS Community Day 2022 Dhiraj Mahapatro_AWS Lambda under the hood _ Best Prac...AWS Chicago
 
Running serverless at scale
Running serverless at scaleRunning serverless at scale
Running serverless at scaleYan Cui
 
Developing and deploying serverless applications (February 2017)
Developing and deploying serverless applications (February 2017)Developing and deploying serverless applications (February 2017)
Developing and deploying serverless applications (February 2017)Julien SIMON
 
Getting Started with AWS Lambda & Serverless Cloud
Getting Started with AWS Lambda & Serverless CloudGetting Started with AWS Lambda & Serverless Cloud
Getting Started with AWS Lambda & Serverless CloudIan Massingham
 

Similar to Adopting Java for the Serverless world at JUG Hamburg (20)

Adopting Java for the Serverless world at Serverless Meetup New York and Boston
Adopting Java for the Serverless world at Serverless Meetup New York and BostonAdopting Java for the Serverless world at Serverless Meetup New York and Boston
Adopting Java for the Serverless world at Serverless Meetup New York and Boston
 
Adopting Java for the Serverless World at VoxxedDays Luxemburg
Adopting Java for the Serverless World at VoxxedDays LuxemburgAdopting Java for the Serverless World at VoxxedDays Luxemburg
Adopting Java for the Serverless World at VoxxedDays Luxemburg
 
Adopting Java for the Serverless World at JUG Darmstadt 2022
Adopting Java for the Serverless World at JUG Darmstadt 2022Adopting Java for the Serverless World at JUG Darmstadt 2022
Adopting Java for the Serverless World at JUG Darmstadt 2022
 
Adopting Java for the Serverless World at JUG Bonn 2022
Adopting Java for the Serverless World at JUG Bonn 2022Adopting Java for the Serverless World at JUG Bonn 2022
Adopting Java for the Serverless World at JUG Bonn 2022
 
Adopting Java for the Serverless World at JUG Hessen 2022
Adopting Java for the Serverless World at JUG Hessen 2022Adopting Java for the Serverless World at JUG Hessen 2022
Adopting Java for the Serverless World at JUG Hessen 2022
 
How to reduce cold starts for Java Serverless applications in AWS at Serverle...
How to reduce cold starts for Java Serverless applications in AWS at Serverle...How to reduce cold starts for Java Serverless applications in AWS at Serverle...
How to reduce cold starts for Java Serverless applications in AWS at Serverle...
 
How to reduce cold starts for Java Serverless applications in AWS at InfoShar...
How to reduce cold starts for Java Serverless applications in AWS at InfoShar...How to reduce cold starts for Java Serverless applications in AWS at InfoShar...
How to reduce cold starts for Java Serverless applications in AWS at InfoShar...
 
Adopting Java for the Serverless World at JAX 2022
Adopting Java for the Serverless World at JAX 2022Adopting Java for the Serverless World at JAX 2022
Adopting Java for the Serverless World at JAX 2022
 
Adopting Java for the Serverless World at Voxxed Days Bruxelles 2023
Adopting Java for the Serverless World at Voxxed Days Bruxelles 2023Adopting Java for the Serverless World at Voxxed Days Bruxelles 2023
Adopting Java for the Serverless World at Voxxed Days Bruxelles 2023
 
How to reduce cold starts for Java Serverless applications in AWS at JCON Wor...
How to reduce cold starts for Java Serverless applications in AWS at JCON Wor...How to reduce cold starts for Java Serverless applications in AWS at JCON Wor...
How to reduce cold starts for Java Serverless applications in AWS at JCON Wor...
 
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...
 
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...
 
Getting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless Cloud
 
Customer Case Study: Land Registry as a Service in the Cloud - AWS PS Summit ...
Customer Case Study: Land Registry as a Service in the Cloud - AWS PS Summit ...Customer Case Study: Land Registry as a Service in the Cloud - AWS PS Summit ...
Customer Case Study: Land Registry as a Service in the Cloud - AWS PS Summit ...
 
AWS Lambda SnapStart: Why, How and What AWS Serverless Meetup New York Boston...
AWS Lambda SnapStart: Why, How and What AWS Serverless Meetup New York Boston...AWS Lambda SnapStart: Why, How and What AWS Serverless Meetup New York Boston...
AWS Lambda SnapStart: Why, How and What AWS Serverless Meetup New York Boston...
 
AWS Community Day 2022 Dhiraj Mahapatro_AWS Lambda under the hood _ Best Prac...
AWS Community Day 2022 Dhiraj Mahapatro_AWS Lambda under the hood _ Best Prac...AWS Community Day 2022 Dhiraj Mahapatro_AWS Lambda under the hood _ Best Prac...
AWS Community Day 2022 Dhiraj Mahapatro_AWS Lambda under the hood _ Best Prac...
 
Running serverless at scale
Running serverless at scaleRunning serverless at scale
Running serverless at scale
 
Developing and deploying serverless applications (February 2017)
Developing and deploying serverless applications (February 2017)Developing and deploying serverless applications (February 2017)
Developing and deploying serverless applications (February 2017)
 
AWS Serverless Workshop
AWS Serverless WorkshopAWS Serverless Workshop
AWS Serverless Workshop
 
Getting Started with AWS Lambda & Serverless Cloud
Getting Started with AWS Lambda & Serverless CloudGetting Started with AWS Lambda & Serverless Cloud
Getting Started with AWS Lambda & Serverless Cloud
 

More from Vadym Kazulkin

Revolutionize DevOps lifecycle with Amazon CodeCatalyst and DevOps Guru at De...
Revolutionize DevOps lifecycle with Amazon CodeCatalyst and DevOps Guru at De...Revolutionize DevOps lifecycle with Amazon CodeCatalyst and DevOps Guru at De...
Revolutionize DevOps lifecycle with Amazon CodeCatalyst and DevOps Guru at De...Vadym Kazulkin
 
Amazon DevOps Guru for the Serverless Applications at AWS Community Day NL 2023
Amazon DevOps Guru for the Serverless Applications at AWS Community Day NL 2023Amazon DevOps Guru for the Serverless Applications at AWS Community Day NL 2023
Amazon DevOps Guru for the Serverless Applications at AWS Community Day NL 2023Vadym Kazulkin
 
Making sense of service quotas of AWS Serverless services and how to deal wit...
Making sense of service quotas of AWS Serverless services and how to deal wit...Making sense of service quotas of AWS Serverless services and how to deal wit...
Making sense of service quotas of AWS Serverless services and how to deal wit...Vadym Kazulkin
 
Github Copilot vs Amazon CodeWhisperer for Java developers at JCON 2023
Github Copilot vs Amazon CodeWhisperer for Java developers at JCON 2023Github Copilot vs Amazon CodeWhisperer for Java developers at JCON 2023
Github Copilot vs Amazon CodeWhisperer for Java developers at JCON 2023Vadym Kazulkin
 
Revolutionize DevOps with ML capabilities. Deep dive into Amazon CodeGuru and...
Revolutionize DevOps with ML capabilities. Deep dive into Amazon CodeGuru and...Revolutionize DevOps with ML capabilities. Deep dive into Amazon CodeGuru and...
Revolutionize DevOps with ML capabilities. Deep dive into Amazon CodeGuru and...Vadym Kazulkin
 
Amazon DevOps Guru for the Serverless Applications at AWS Community Day Bene...
Amazon DevOps Guru for the Serverless Applications at  AWS Community Day Bene...Amazon DevOps Guru for the Serverless Applications at  AWS Community Day Bene...
Amazon DevOps Guru for the Serverless Applications at AWS Community Day Bene...Vadym Kazulkin
 
Amazon CodeGuru vs SonarQube for Java Developers at JCon 2022
Amazon CodeGuru vs SonarQube for Java Developers at JCon 2022Amazon CodeGuru vs SonarQube for Java Developers at JCon 2022
Amazon CodeGuru vs SonarQube for Java Developers at JCon 2022Vadym Kazulkin
 
Adopting Java for the Serverless World at JUG Saxony Day 2022
Adopting Java for the Serverless World at JUG Saxony Day 2022Adopting Java for the Serverless World at JUG Saxony Day 2022
Adopting Java for the Serverless World at JUG Saxony Day 2022Vadym Kazulkin
 
Projects Valhalla and Loom DWX 2022
Projects Valhalla and Loom DWX 2022Projects Valhalla and Loom DWX 2022
Projects Valhalla and Loom DWX 2022Vadym Kazulkin
 
Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...
Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...
Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...Vadym Kazulkin
 
Amazon CodeGuru vs SonarQube for Java Developers at AWS DeveloperWeek Europe ...
Amazon CodeGuru vs SonarQube for Java Developers at AWS DeveloperWeek Europe ...Amazon CodeGuru vs SonarQube for Java Developers at AWS DeveloperWeek Europe ...
Amazon CodeGuru vs SonarQube for Java Developers at AWS DeveloperWeek Europe ...Vadym Kazulkin
 
Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...
Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...
Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...Vadym Kazulkin
 
Writing less code with Serverless on AWS at OOP 2022
Writing less code with Serverless on AWS at OOP 2022Writing less code with Serverless on AWS at OOP 2022
Writing less code with Serverless on AWS at OOP 2022Vadym Kazulkin
 
Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...
Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...
Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...Vadym Kazulkin
 
Projects Valhalla and Loom at IT Tage 2021
Projects Valhalla and Loom at IT Tage 2021Projects Valhalla and Loom at IT Tage 2021
Projects Valhalla and Loom at IT Tage 2021Vadym Kazulkin
 
Writing less code with Serverless on AWS at AWS User Group Nairobi
Writing less code with Serverless on AWS at AWS User Group NairobiWriting less code with Serverless on AWS at AWS User Group Nairobi
Writing less code with Serverless on AWS at AWS User Group NairobiVadym Kazulkin
 
Writing less code with Serverless on AWS at AWS Community Day DACH 2021
Writing less code with Serverless on AWS at AWS Community Day DACH 2021Writing less code with Serverless on AWS at AWS Community Day DACH 2021
Writing less code with Serverless on AWS at AWS Community Day DACH 2021Vadym Kazulkin
 
Measure and Increase Developer Productivity with Help of Serverless at JCON 2...
Measure and Increase Developer Productivity with Help of Serverless at JCON 2...Measure and Increase Developer Productivity with Help of Serverless at JCON 2...
Measure and Increase Developer Productivity with Help of Serverless at JCON 2...Vadym Kazulkin
 
Writing less code with Serverless on AWS at FrOSCon 2021
Writing less code with Serverless on AWS at FrOSCon 2021Writing less code with Serverless on AWS at FrOSCon 2021
Writing less code with Serverless on AWS at FrOSCon 2021Vadym Kazulkin
 

More from Vadym Kazulkin (19)

Revolutionize DevOps lifecycle with Amazon CodeCatalyst and DevOps Guru at De...
Revolutionize DevOps lifecycle with Amazon CodeCatalyst and DevOps Guru at De...Revolutionize DevOps lifecycle with Amazon CodeCatalyst and DevOps Guru at De...
Revolutionize DevOps lifecycle with Amazon CodeCatalyst and DevOps Guru at De...
 
Amazon DevOps Guru for the Serverless Applications at AWS Community Day NL 2023
Amazon DevOps Guru for the Serverless Applications at AWS Community Day NL 2023Amazon DevOps Guru for the Serverless Applications at AWS Community Day NL 2023
Amazon DevOps Guru for the Serverless Applications at AWS Community Day NL 2023
 
Making sense of service quotas of AWS Serverless services and how to deal wit...
Making sense of service quotas of AWS Serverless services and how to deal wit...Making sense of service quotas of AWS Serverless services and how to deal wit...
Making sense of service quotas of AWS Serverless services and how to deal wit...
 
Github Copilot vs Amazon CodeWhisperer for Java developers at JCON 2023
Github Copilot vs Amazon CodeWhisperer for Java developers at JCON 2023Github Copilot vs Amazon CodeWhisperer for Java developers at JCON 2023
Github Copilot vs Amazon CodeWhisperer for Java developers at JCON 2023
 
Revolutionize DevOps with ML capabilities. Deep dive into Amazon CodeGuru and...
Revolutionize DevOps with ML capabilities. Deep dive into Amazon CodeGuru and...Revolutionize DevOps with ML capabilities. Deep dive into Amazon CodeGuru and...
Revolutionize DevOps with ML capabilities. Deep dive into Amazon CodeGuru and...
 
Amazon DevOps Guru for the Serverless Applications at AWS Community Day Bene...
Amazon DevOps Guru for the Serverless Applications at  AWS Community Day Bene...Amazon DevOps Guru for the Serverless Applications at  AWS Community Day Bene...
Amazon DevOps Guru for the Serverless Applications at AWS Community Day Bene...
 
Amazon CodeGuru vs SonarQube for Java Developers at JCon 2022
Amazon CodeGuru vs SonarQube for Java Developers at JCon 2022Amazon CodeGuru vs SonarQube for Java Developers at JCon 2022
Amazon CodeGuru vs SonarQube for Java Developers at JCon 2022
 
Adopting Java for the Serverless World at JUG Saxony Day 2022
Adopting Java for the Serverless World at JUG Saxony Day 2022Adopting Java for the Serverless World at JUG Saxony Day 2022
Adopting Java for the Serverless World at JUG Saxony Day 2022
 
Projects Valhalla and Loom DWX 2022
Projects Valhalla and Loom DWX 2022Projects Valhalla and Loom DWX 2022
Projects Valhalla and Loom DWX 2022
 
Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...
Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...
Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...
 
Amazon CodeGuru vs SonarQube for Java Developers at AWS DeveloperWeek Europe ...
Amazon CodeGuru vs SonarQube for Java Developers at AWS DeveloperWeek Europe ...Amazon CodeGuru vs SonarQube for Java Developers at AWS DeveloperWeek Europe ...
Amazon CodeGuru vs SonarQube for Java Developers at AWS DeveloperWeek Europe ...
 
Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...
Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...
Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...
 
Writing less code with Serverless on AWS at OOP 2022
Writing less code with Serverless on AWS at OOP 2022Writing less code with Serverless on AWS at OOP 2022
Writing less code with Serverless on AWS at OOP 2022
 
Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...
Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...
Revolutionize DevOps with ML capabilities. Introduction to Amazon CodeGuru an...
 
Projects Valhalla and Loom at IT Tage 2021
Projects Valhalla and Loom at IT Tage 2021Projects Valhalla and Loom at IT Tage 2021
Projects Valhalla and Loom at IT Tage 2021
 
Writing less code with Serverless on AWS at AWS User Group Nairobi
Writing less code with Serverless on AWS at AWS User Group NairobiWriting less code with Serverless on AWS at AWS User Group Nairobi
Writing less code with Serverless on AWS at AWS User Group Nairobi
 
Writing less code with Serverless on AWS at AWS Community Day DACH 2021
Writing less code with Serverless on AWS at AWS Community Day DACH 2021Writing less code with Serverless on AWS at AWS Community Day DACH 2021
Writing less code with Serverless on AWS at AWS Community Day DACH 2021
 
Measure and Increase Developer Productivity with Help of Serverless at JCON 2...
Measure and Increase Developer Productivity with Help of Serverless at JCON 2...Measure and Increase Developer Productivity with Help of Serverless at JCON 2...
Measure and Increase Developer Productivity with Help of Serverless at JCON 2...
 
Writing less code with Serverless on AWS at FrOSCon 2021
Writing less code with Serverless on AWS at FrOSCon 2021Writing less code with Serverless on AWS at FrOSCon 2021
Writing less code with Serverless on AWS at FrOSCon 2021
 

Recently uploaded

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 

Recently uploaded (20)

Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 

Adopting Java for the Serverless world at JUG Hamburg

  • 1. Adopting Java for the Serverless world from the perspective of the AWS developer by Vadym Kazulkin, ip.labs GmbH
  • 2. Contact Vadym Kazulkin ip.labs GmbH Bonn, Germany Co-Organizer of the Java User Group Bonn and Serverless Bonn Meetup v.kazulkin@gmail.com @VKazulkin @ServerlessBonn (Meetup) https://www.linkedin.com/in/vadymkazulkin/ https://www.iplabs.de/
  • 7. 2020 Magic Quadrant for Cloud Infrastructure & Platform Services https://pages.awscloud.com/GLOBAL-multi-DL-gartner-mq-cips-2020-learn.html?pg=LWIAWS Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 8. Vadym Kazulkin @VKazulkin , ip.labs GmbH“State of Serverless 2020 report” https://codingsans.com/blog/serverless-trends
  • 9. 2020 AWS Lambda Benchmark Report for Developers, DevOps, and Decision Makers https://newrelic.com/resources/ebooks/serverless-benchmark-report-aws-lambda-2020 Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 10. Life of the Java Serverless developer on AWS
  • 11. AWS Java Versions Support • Java 8 • With extended long-term support • Java 11 (since 2019) • Only Long Term Support (LTS) by AWS • Next LTS Java version is Java 17 in 2021 Vadym Kazulkin @VKazulkin , ip.labs GmbH Source: https://aws.amazon.com/de/corretto/
  • 12. Java ist very fast and mature programming language… Image: burst.shopify.com/photos/a-look-across-the-landscape-with-view-of-the-sea Christian Bannes and Vadym Kazulkin @VKazulkin , ip.labs GmbH … but Serverless adoption of Java looks like this
  • 13. Vadym Kazulkin @VKazulkin , ip.labs GmbH“State of Serverless 2020 report” https://codingsans.com/blog/serverless-trends
  • 14. 2020 AWS Lambda Benchmark Report for Developers, DevOps, and Decision Makers https://newrelic.com/resources/ebooks/serverless-benchmark-report-aws-lambda-2020 Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 15. Developers love Java and will be happy to use it for Serverless Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 16. Creating AWS Lambda with Java 1/2 : Source https://blog.runscope.com/posts/how-to-write-your-first-aws-lambda-function
  • 17. Creating AWS Lambda with Java 2/2 : Source https://blog.runscope.com/posts/how-to-write-your-first-aws-lambda-function
  • 18. Challenge Number 1 with Java is a big cold-start Vadym Kazulkin @VKazulkin , ip.labs GmbH Source: https://www.serverless.com/blog/keep-your-lambdas-warm
  • 19. Cold Start : Source: Ajay Nair „Become a Serverless Black Belt” https://www.youtube.com/watch?v=oQFORsso2go
  • 20. Bootstrap the Java Runtime Phase • AWS Lambda starts the JVM • Java runtime loads and initializes handler class • Static initializer block of the handler class is executed • Boosted host full CPU access up to 10 seconds • Lambda calls the handler method • Full CPU access only approx. at 1.8 GB “assigned” memory to the function Vadym Kazulkin @VKazulkin , ip.labs GmbH Source: Stefano Buliani : "Best practices for AWS Lambda and Java„ https://www.youtube.com/watch?v=ddg1u5HLwg8
  • 21. AWS Lambda cold start duration per programming language Source: Mikhail Shilkov: „AWS Lambda: Cold Start Duration per Language. 2020 edition” https://mikhail.io/serverless/coldstarts/aws/languages/
  • 22. Cold start duration with Java • Below 1 second is best-case cold start duration for very simple Lambda like HelloWorld with no dependencies • It goes up significantly with more complex scenarios • Dependencies to multiple OS projects • Clients instantiation outside of the handler method to communicate with other (AWS) services (e.g. DynamoDB, SNS, SQS, 3rd party) • To minimize the cold start time apply best practices from this talk • Worst-case cold starts can be higher than 10 and even 20 seconds Source: Stefano Buliani : "Best practices for AWS Lambda and Java„ https://www.youtube.com/watch?v=ddg1u5HLwg8 Sean O‘Toole „AWS Lambda Java Tutorial: Best Practices to Lower Cold Starts” https://www.capitalone.com/tech/cloud/aws-lambda-java-tutorial-reduce-cold-starts/
  • 23. 2020 AWS Lambda Benchmark Report for Developers, DevOps, and Decision Makers https://newrelic.com/resources/ebooks/serverless-benchmark-report-aws-lambda-2020 Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 24. Provisioned Concurrency for Lambda Functions Vadym Kazulkin @VKazulkin , ip.labs GmbH Yan Cui: https://lumigo.io/blog/provisioned-concurrency-the-end-of-cold-starts/
  • 25. Jeremy Daly: “Mixing VPC and Non-VPC Lambda Functions for Higher Performing Microservices” https://www.jeremydaly.com/mixing-vpc-and-non-vpc-lambda-functions-for-higher-performing-microservices/ Vadym Kazulkin @VKazulkin , ip.labs GmbH Lambda behind the Virtual Private Cloud (VPC)
  • 26. Lambda in VPC As function’s execution environment scales • More network interfaces are created and attached to the Lambda infrastructure • The exact number of network interfaces created and attached is a factor of your function configuration and concurrency • Caused additional the cold start up to approx. 10 seconds Chris Munns: "Announcing improved VPC networking for AWS Lambda functions” https://aws.amazon.com/de/blogs/compute/announcing-improved-vpc-networking-for-aws-lambda-functions/
  • 27. Lambda in VPC Improvements: • The network interface creation happens when Lambda function is created or its VPC settings are updated. • The network interfaces are shared across execution environments • Only a handful of network interfaces are required per function • Reduced additional cold start from approx. 10 seconds to below 1 second Chris Munns: "Announcing improved VPC networking for AWS Lambda functions” https://aws.amazon.com/de/blogs/compute/announcing-improved-vpc-networking-for-aws-lambda-functions/
  • 28. Improvements 1/4 • Switch to the AWS SDK 2.0 for Java • Lower footprint and more modular • Allows to configure HTTP Client of your choice (e.g. Java own Basic HTTP Client or newly introduced AWS Common Runtime async HTTP Client) Vadym Kazulkin @VKazulkin , ip.labs GmbH Source: Stefano Buliani : "Best practices for AWS Lambda and Java„ https://www.youtube.com/watch?v=ddg1u5HLwg8 Zoe Wang: „Introducing AWS Common Runtime HTTP Client in the AWS SDK for Java 2.x” https://aws.amazon.com/de/blogs/developer/introducing-aws-common-runtime-http-client-in-the-aws-sdk-for-java-2-x/ S3AsyncClient.builder() .httpClientBuilder(AwsCrtAsyncHttpClient.builder() .maxConcurrency(50)) .build();
  • 29. Improvements 1/4 Provide all known values (for building clients e.g. DynamoDB client) to avoid auto-discovery • credential provider, region, endpoint AmazonDynamoDB client = AmazonDynamoDBClientBuilder.standard() .withRegion(Regions.US_WEST_2) .withCredentials(new ProfileCredentialsProvider("myProfile")) .build(); Vadym Kazulkin @VKazulkin , ip.labs GmbH Source: Stefano Buliani : "Best practices for AWS Lambda and Java„ https://www.youtube.com/watch?v=ddg1u5HLwg8 Sean O‘Toole „AWS Lambda Java Tutorial: Best Practices to Lower Cold Starts” https://www.capitalone.com/tech/cloud/aws-lambda-java-tutorial-reduce-cold-starts/
  • 30. Improvements 1/4 • Initialize and prime dependencies during initialization phase • Use static initialization in the handler class, instead of in the handler method (e.g. handleRequest) to take the advantage of the access to the full CPU core for max 10 seconds • „Fake“ the calls to pre-initalize „things“, e.g. Jackson Marshallers in case of DynamoDB client AmazonDynamoDB client = AmazonDynamoDBClientBuilder.standard()...build(); DynamoDB dynamoDB = new DynamoDB(client); Table table = dynamoDB.getTable(„mytable"); Item item = table.getItem("Id", 210); Vadym Kazulkin @VKazulkin , ip.labs GmbH Source: Stefano Buliani : "Best practices for AWS Lambda and Java„ https://www.youtube.com/watch?v=ddg1u5HLwg8 Sean O‘Toole „AWS Lambda Java Tutorial: Best Practices to Lower Cold Starts” https://www.capitalone.com/tech/cloud/aws-lambda-java-tutorial-reduce-cold-starts/ getItem() call forces Jackson Marshallers to initialize
  • 31. Improvements 1/4 • Less (dependencies, classes) is more • Include only required dependencies (e.g. not the whole AWS SDK 2.0 for Java, but the dependencies to the clients to be used in Lambda) • Exclude dependencies, which you don‘t need at runtime e.g. test frameworks like Junit Vadym Kazulkin @VKazulkin , ip.labs GmbH Source: Stefano Buliani : "Best practices for AWS Lambda and Java„ https://www.youtube.com/watch?v=ddg1u5HLwg8 Sean O‘Toole „AWS Lambda Java Tutorial: Best Practices to Lower Cold Starts” https://www.capitalone.com/tech/cloud/aws-lambda-java-tutorial-reduce-cold-starts/ https://github.com/awsdocs/aws-doc-sdk-examples/tree/master/javav2 <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter-api</artifactId> <version>5.4.2</version> <scope>test</scope> </dependency> <dependency> <groupId>software.amazon.awssdk</groupId> <artifactId>dynamodb</artifactId> <version>2.10.86</version> </dependency> <dependency> <groupId>software.amazon.awssdk</groupId> <artifactId>bom</artifactId> <version>2.10.86</version> <type>pom</type> <scope>import</scope> </dependency>
  • 32. Improvements 2/4 Avoid Reflection Or use DI Frameworks like Micronaut, Quarkus or Dagger which aren‘t reflection-based Vadym Kazulkin @VKazulkin , ip.labs GmbH Source: Stefano Buliani : "Best practices for AWS Lambda and Java„ https://www.youtube.com/watch?v=ddg1u5HLwg8 Sean O‘Toole „AWS Lambda Java Tutorial: Best Practices to Lower Cold Starts” https://www.capitalone.com/tech/cloud/aws-lambda-java-tutorial-reduce-cold-starts/
  • 33. Improvements 3/4 Strive for cost optimization Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 34. AWS Lambda pricing model Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 35. Cost for Lambda REQUEST DURATION Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 36. Request Tier $ 0.20 Per 1 Mio Requests Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 37. Duration Tier $ 0.00001667 Per GB-Second Christian Bannes and Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 38. GB-Second ONE SECOND ONE GB Christian Bannes and Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 39. Example • 1 Mio requests • Lambda with 512MiB • Each lambda takes 180ms (will be rounded to 200ms) 0.5 GiB * 0.2 sec * 1 Mio = 100 000 GB-Seconds Requests: $0.20 GB-Seconds: $1.67 Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 40. Cost scales linearly with memory Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 41. Improvements 4/4 More memory = more expensive? Christian Bannes and Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 42. Lambda Power Tuning • Executes different settings in parallel • Outputs the optimal setting Image: https://github.com/alexcasalboni/aws-lambda-power-tuning Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 43. Monitor the Java Virtual Machine Garbage Collection on AWS Lambda Source: Steffen Grunwald „Monitoring the Java Virtual Machine Garbage Collection on AWS Lambda” https://aws.amazon.com/de/blogs/architecture/field-notes-monitoring-the-java-virtual-machine-garbage-collection-on-aws-lambda/
  • 44. AWS Java Versions Support • Java 8 • With extended long-term support • Java 11 (since 2019) • Only Long Term Support (LTS) by AWS • Next LTS Java version is Java 17 in 2021 • What about the support of the current Java version 15? Vadym Kazulkin @VKazulkin , ip.labs GmbH Source: https://aws.amazon.com/de/corretto/
  • 45. Current Java Version Support with frgaal • frgaal can produce bytecode from Java 14 (with new and experimental features) syntax that is compatible with JDK 8 • JDK 9–14 contains no features that would require bytecode changes except modules and records • Var and textblocks features are purely syntactic • Switch expressions and “instanceof” do not require any special bytecode either • Most of these features just alter the Abstract Syntax Tree (AST) of Java, so it’s possible to emit JDK 8 compatible bytecode for the generator Vadym Kazulkin @VKazulkin , ip.labs GmbH Source: https://frgaal.org/ Toni Epple „Use next generation Java, today! “ https://medium.com/@toni.epple/use-next-generation-java-today-d3394efb8c24
  • 46. Current Java Version Support with frgaal <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.1</version> <dependencies> <dependency> <groupId>org.frgaal</groupId> <artifactId>compiler-maven-plugin</artifactId> <version>14.0.2</version> </dependency> </dependencies> Vadym Kazulkin @VKazulkin , ip.labs GmbH <configuration> <compilerId>frgaal</compilerId> <source>14</source> <target>1.8</target> <compilerArgs> <arg>-Xlint:deprecation</arg> <arg>--enable-safe-preview</arg> </compilerArgs> </configuration> </plugin> </plugins> </build> Source: https://frgaal.org/ Toni Epple „Use next generation Java, today! “ https://medium.com/@toni.epple/use-next-generation-java-today-d3394efb8c24 mvn clean install
  • 47. Cost optimization • Java is well optimized for long running server applications • High startup times • High memory utilization Vadym Kazulkin @VKazulkin , ip.labs GmbH And both memory and execution time are cost dimensions, when using Serverless in the cloud
  • 48. GraalVM enters the scene Source: https://www.graalvm.org/
  • 49. Project Metropolis Goals: Low footprint ahead-of-time mode for JVM-based languages High performance for all languages Convenient language interoperability and polyglot tooling Source: „Everything you need to know about GraalVM by Oleg Šelajev & Thomas Wuerthinger” https://www.youtube.com/watch?v=ANN9rxYo5Hg
  • 50.
  • 51. GraalVM Architecture Sources: Practical Partial Evaluation for High-Performance Dynamic Language Runtimes http://chrisseaton.com/rubytruffle/pldi17-truffle/pldi17-truffle.pdf „The LLVM Compiler Infrastructure“ https://llvm.org/
  • 52. GraalVM Architecture Sources: Practical Partial Evaluation for High-Performance Dynamic Language Runtimes http://chrisseaton.com/rubytruffle/pldi17-truffle/pldi17-truffle.pdf „The LLVM Compiler Infrastructure“ https://llvm.org/
  • 53. SubstrateVM Source: Oleg Šelajev, Thomas Wuerthinger, Oracle: “Deep dive into using GraalVM for Java and JavaScript” https://www.youtube.com/watch?v=a-XEZobXspo
  • 54. GraalVM and SubstrateVM Source: Oleg Selajev, Oracle : “Run Code in Any Language Anywhere with GraalVM” https://www.youtube.com/watch?v=JoDOo4FyYMU
  • 55. GraalVM on SubstrateVM A game changer for Java & Serverless? Java Function compiled into a native executable using GraalVM on SubstrateVM reduces • “cold start” times • memory footprint by order of magnitude compared to running on JVM. And both memory and execution time are cost dimensions, when using Serverless in the cloud
  • 56. GraalVM on SubstrateVM A game changer for Java & Serverless? Current challenges with native executable using GraalVM : • Most Cloud Providers (AWS) doesn’t provide GraalVM as Java Runtime out of the box, only Open JDK (i.e. AWS provides Corretto) • Some Cloud Providers (e.g. AWS) provide Custom Runtime Option
  • 57. Lambda Layers & Lambda Runtime API Christian Bannes and Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 59. GraalVM Complitation Modes Source: „Everything you need to know about GraalVM by Oleg Šelajev & Thomas Wuerthinger” https://www.youtube.com/watch?v=ANN9rxYo5Hg
  • 60. AOT vs JIT Source: „Everything you need to know about GraalVM by Oleg Šelajev & Thomas Wuerthinger” https://www.youtube.com/watch?v=ANN9rxYo5Hg
  • 61. GraalVM Profile-Guided Optimizations Source: „https://www.graalvm.org/reference-manual/native-image/PGO”
  • 62. Support of GraalVM native images in Frameworks Spring Framework: working toward GraalVM native image support without requiring additional configuration or workaround is one of the themes of upcoming Spring Framework 5.3 Spring Boot: Ongoing work on experimental Spring Graal Native project. Probably ready for the 2.4 release Quarkus: a Kubernetes Native Java framework developed by Red Hat tailored for GraalVM and HotSpot, crafted from best-of-breed Java libraries and standards. Micronaut: a modern, JVM-based, full-stack framework for building modular, easily testable microservice and serverless applications. Source: „GraalVM native image support“ https://github.com/spring-projects/spring-framework/wiki/GraalVM-native-image-support
  • 63. Common principles for all Frameworks • Rely on as little reflection as possible • Speed up start up times and decrease memory usage for Microservice and Serverless Java applications • With and without usage of GraalVM and native image Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 64. Steps to deploy to AWS • Installation prerequisites • Framework of your choice (Micronaut, Quarkus, Spring) • Java 8 or 11 or GraalVM and Native Image • Apache Maven or Gradle • AWS CLI and AWS SAM CLI (for local testing) • Build Linux executable of your application with GraalVM native-image • Deploy Linux executable as AWS Lambda Custom Runtime • Function.zip with bootstrap Linux executable Vadym Kazulkin @VKazulkin , ip.labs GmbH Source: https://github.com/awslabs/aws-serverless-java-container/tree/master/samples/micronaut/pet-store
  • 65. AWS Lambda Deployment of Custom Runtime with SAM Source: https://github.com/awslabs/aws-serverless-java-container/tree/master/samples/micronaut/pet-store
  • 67. AWS Lambda with Micronaut Framework
  • 68. Testing AWS Lambda with Micronaut Framework
  • 69. Micronaut Additional Features • Custom Validators • AWS API Gateway integration • Spring annotation processor available Vadym Kazulkin @VKazulkin , ip.labs GmbH Source: Stefano Buliani : "Best practices for AWS Lambda and Java„ https://www.youtube.com/watch?v=ddg1u5HLwg8
  • 70. Build GraalVM Native Image with Micronaut Framework There is already Gradle plugin, Maven plugin in development
  • 72. AWS Lambda with Quarkus Framework
  • 73. Testing AWS Lambda with Quarkus Framework
  • 74. Build GraalVM Native Image with Quarkus Framework mvn –Pnative package
  • 75. Quarkus Additional Features • Website for creating the App • AWS API Gateway integration • Funqy Vadym Kazulkin @VKazulkin , ip.labs GmbH Source: Stefano Buliani : "Best practices for AWS Lambda and Java„ https://www.youtube.com/watch?v=ddg1u5HLwg8
  • 77. Quarkus-Fanqy AWS Serverless Support • AWS Lambda • AWS API Gateway Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 78. Spring (Boot) Framework Source: https://spring.io/
  • 79. Spring GraalVM Native Project Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 80. AWS Lambda with Spring Framework using Spring Graal Native and Spring Cloud Functions
  • 81. Bean Registration with Spring Framework using Spring Graal Native and Spring Cloud Functions
  • 82. Build GraalVM Native Image with Spring Framework mvn –Pnative package
  • 83. Framework Comparison 1/2 • Project Initializer • Programming Model • Database Support • Test Support Vadym Kazulkin @VKazulkin , ip.labs GmbH Source: „Battle Of The Microservice Frameworks: Micronaut versus Quarkus edition! by Michel Schudel“ https://www.youtube.com/watch?v=hnEXOqcNXPs „Micronaut 2.0 vs Quarkus 1.3.1 vs Spring Boot 2.3 Performance on JDK 14“ https://www.youtube.com/watch?v=rJFgdFIs_k8
  • 84. Framework Comparison 2/2 Vadym Kazulkin @VKazulkin , ip.labs GmbH Source: „Battle Of The Microservice Frameworks: Micronaut versus Quarkus edition! by Michel Schudel“ https://www.youtube.com/watch?v=hnEXOqcNXPs „Micronaut 2.0 vs Quarkus 1.3.1 vs Spring Boot 2.3 Performance on JDK 14“ https://www.youtube.com/watch?v=rJFgdFIs_k8 • Native Image with Framework • Build time • Native Image Size • (Cold) Startup Time • Request/Invocation duration • Memory Consumption • Plain Framework • Application Size • (Cold) Start Time • Request/Invocation duration • Memory Consumption
  • 85. Conclusion 1/3 • GraalVM and Frameworks are really powerful with a lot of potential • Micronaut and Quarkus will improve the cold starts of Java applications significantly even without GraalVM and native image • They use as little as possible reflection and other optimizations • Cold start duration will still be in the range of single digit seconds depending on your application Vadym Kazulkin @VKazulkin , ip.labs GmbH Source: „https://stackoverflow.com/questions/63328298/how-do-you-debug-a-no-instances-of-are-allowed-in-the-image-heap-when-buil
  • 86. Conclusion 2/3 • But the combination of discussed frameworks with GraalVM and Native Image currently not without challenges • AWS Lambda Custom runtime requires Linux executable only • Managing Custom Runtime requires some additional effort • Delivering execution runtime (i.e. Java) via Lambda Custom Runtime reduces performance compared to (the same) managed Lambda Runtime • Windows and Mac developers may only build Linux executable via Docker • plenty of 'No instances of … are allowed in the image heap’ and other errors when building a native image • Lots of experimentation with additional build arguments like “initialize-at-runtime” or “delay- class-initialization-to-runtime“ required Vadym Kazulkin @VKazulkin , ip.labs GmbH Source: „https://stackoverflow.com/questions/63328298/how-do-you-debug-a-no-instances-of-are-allowed-in-the-image-heap-when-buil
  • 87. Conclusion 3/3 • Once again: Less (dependencies, classes) is more • AWS Lambda function should be small and shouldn’t have many dependencies Vadym Kazulkin @VKazulkin , ip.labs GmbH Source: „https://stackoverflow.com/questions/63328298/how-do-you-debug-a-no-instances-of-are-allowed-in-the-image-heap-when-buil
  • 88. Try it yourselves • Micronaut • https://github.com/micronaut-guides/micronaut-function-aws-lambda • Quarkus • https://github.com/JosemyDuarte/quarkus-terraform-lambda-demo/tree/dynamo-terraform • Spring Boot • https://github.com/spring-projects-experimental/spring-graalvm-native/tree/master/spring- graalvm-native-samples/function-aws • Misc • https://github.com/awslabs/aws-serverless-java-container/tree/master/samples Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 90.