chris - Fotolia

Why would I use Micronaut framework instead of Java?

Micronaut is JVM-based, so what does it bring to application development and test that the Java framework doesn't already address?

Micronaut's minimalist footprint and optimized startup time can deal with the latency for serverless applications, which reduces the need for expensive external mechanisms that keep functions warm, according to Gregg Siegfried, research director for cloud and IT operations at Gartner. That's why some Java developers choose Micronaut.

Consider Micronaut for serverless designs that run into problems in development and testing -- for example, a project composed of multiple separated AWS Lambda functions accessed by Amazon API Gateway with proxy integration. Vladimír Oraný, an independent software engineer who created this serverless design, discovered issues with a Java approach to build functions.

"There was no suitable, well-performing framework at the moment for [an] AWS Lambda environment; Micronaut perfectly fills this gap," Oraný said.

His team built an Amazon DynamoDB trigger with Micronaut because the framework can create an entire application skeleton and deploy functions in minutes, he said.

Beyond serverless uses, Micronaut is also a lightweight microservices framework that offers interoperability with Spring and Grails frameworks.

The team's developers can refactor internal libraries from Grails plugins to Micronaut libraries. These libraries work in serverless functions, as well as other applications, Oraný said, so using Micronaut helps developers share code bases.

The framework targets nonserverless application development as well. Wojtek Suwala, lab team leader at Altkom Software & Consulting, started building apps with a microservices-based approach in 2015 and seeks tools that boost productivity. The team trialed Micronaut on a simplified insurance sales app.

Micronaut features provide communication between services in both synchronous and asynchronous ways for the application. "Data access features can persist and load data from both relational and NoSQL databases," Suwala said.

Micronaut does not have the history of Java for application development and delivery, with version 1 released in October 2018. This newness might deter developers from putting it to work on enterprise applications. For Suwala at Altkom, Micronaut version 1 must go through performance testing to vet it for use with production code.

Next Steps

A breakdown of new features in Micronaut 3

Dig Deeper on Enterprise architecture management

Software Quality
Cloud Computing