Measuring Java 11 Lambda cold starts with SnapStart - Part 2 Using Micronaut Framework

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • We'll use the same application as in the first part of this series, but we'll rewrite it to use Micronaut Framework. The code of this sample application can be found here. It basically provides AWS API Gateway and 2 Lambda functions: "CreateProduct" and "GetProductById". The products are stored in the Amazon DynamoDB. We'll use AWS Serverless Application Model (AWS SAM) for the infrastructure as a code.

  • Quarkus

    Quarkus: Supersonic Subatomic Java.

  • Conclusions and next steps In this blog post we looked into the Micronaut Framework and learned how to write AWS Lambda function which receives the event from AWS API Gateway. We also measured the cold start with and without enabling of the SnapStart. Especially in case of enabling SnapStart the cold starts were only slightly higher compared to the Lambda written with the plain Java. As Micronaut Framework increases the productivity of the developers by providing lots of features (see the list above), it's worth considering to use it. In the next part of series we'll explore Quarkus for writing Lambda functions and measure the cold start with and without enabling of the SnapSart.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • Micronaut

    Micronaut Application Framework

  • Micronaut Framework and its features Micronaut Framework is modern, JVM-based, full-stack framework for building modular, easily testable microservice and serverless applications. It gives us the possibility to create our application using the launcher or CLI, provides customer validation, API Gateway integration, GraalVM (Native Image) integation, supports Maven und Gradle and much more. What is very important, is that the Micronaut processes annotations at compile time and doesn't use reflection, runtime byte code generation, runtime generated proxies and dynamic class loading. On the other hand Micronaut doesn't support MicroProfile.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts