Micronaut is a full stack framework for JVM developers helping them to build modular, easily testable microservices and cloud-native applications. It provides a familiar development workflow similar to Spring or Grails but with a minimal startup time and memory usage. Therefore, Micronaut covers the gap where traditional MVC frameworks are not suitable, such as Android applications, serverless functions and IoT Deployments.
Traditional JVM web applications are based on frameworks that promote the Model-View-Controller pattern, Aspect Oriented Programming and Dependency Injection. Some examples are Spring and Grails, both frameworks heavily relies on reflection to analyze application classes at runtime and then wire them together to build the dependency graph for the application.
The I/O and reflection activities can be be very costly for startup time and memory usage, two important resources to pay attention when we run our application in a cloud platform.
The end goal of Micronaut is to preserve the MVC programming and other features of traditional frameworks and keep a low memory footprint by implementing a reflection-free approach to Dependency Injection and AOP.
End User mental model
The Micronaut API documention reflects the needs of the software developers which are the central end-user of the system. As stated by Coplien and Bjørnvig in the Lean Architecture: for Agile Software Development, its important to capture the key-end user mental models in the code to radically increases its value.
Micronaut boost software developers productivity and satisfaction by keeping the annotated conventions from Spring. The main difference is that it performs the dependency injection at compile-time rather than run time.
System’s key capabilities and properties
As stated earlier, Micronaut aims to be a full-stack framework and therefore it aims to provide all tools necessary for building a JVM-based microservice. The tools and functionalities included into Micronaut are well explained in their User-Guide and in the following an overview is given.
The framework comes with meaningful default configurations so that new applications based can be built quickly. For keeping the business application code free of secondary or supporting functions it also contains Aspect-Oriented Programming (AOP) mechanisms.
For communicating between microservices often HTTP(S) based communication (especially REST) is used. Therefore, Micronaut provides functionality to implement HTTP(S) servers and clients. Of course, Micronaut also includes a security solution for all common security patterns with different authentification providers (e.g. BasicAuth, Json Web Token, and LDAP).
Naturally, a web-service without a database often cannot provide real functionality. Therefore, Micronaut comes with connectors to many different databases. Besides the classical SQL databases also many NoSQL databases as Redis, MongoDB and Cassandra are supported.
Micronaut is designed for building Cloud Native applications and supports many best practices from this architecture approach. For example, it allows external configuration and integrates well with widely-used distributed configuration servers. Furthermore, it includes different mechanisms for service discovery and client-side load balancing.
Apart from Micronaut focusing on microservices, it can also be used for building serverless functions and CLI applications with the JVM languages Java, Groovy and Kotlin.
It is not surprising, that the functionality provided by Micronaut is inspired by similar frameworks like Grails or Spring Boot. However Micronaut differentiats from them, especially by focusing on quality capabilities. Micronaut aims that applications build on top of it are having short startup times (Time Behaviour), are low on memory consumption (Resource Utilization), are easy to test with unit tests (Testability) and that they can handle the failure of conencted services (Resilience).
As stated by Coplien and Bjørnvig in the Lean Architecture: for Agile Software Development, half of the software development revolves around the technical stuffs like coding, testing, etc but the other half has to deal with the people and relationships. These people who are directly or indirectly impacted by the use or service of any product are generally termed as stakeholders. Stakeholders derive value from the product. There are multiple stakeholders impacted by Micronaut and we broadly divide them into the below categories:
The Business - Micronaut’s parent company Object Computing sponsors its development, maintains the framework and employs key members of the Micronaut team, hence becoming the key business stakeholder.Also, Micronaut’s collaboration with Google Cloud Platform and Amazon Web Services for extended cloud based service, makes both of them the business stakeholders.
The Customers - A customer could be any enterprise or company using Micronaut’s framework to offer its services to the end customers like companies developing and offering cloud webservices. There are multiple customers using Micronaut namely Minecraft, Mojang, CSS, Skylo Tecnhologies, Target and Samsung SmartThings.
Domain Experts - The team of Micronaut’s co-founders and software architects like Graeme Rocher the co-founder who created several popular open source projects, including Micronaut, Jeff Scott Brown who has been doing JVM application development for as long as the JVM has existed and Álvaro Sánchez who is a passionate software architect and agile enthusiast with over 16 years of experience.
Developers - Micronaut has a great technically diversified development team including people like Nirav Assar who is an experienced Java developer and Sergio del Amo who is an experienced web and mobile developer.
End User - Application developers who use the framework to develop any sort of application, for example - Microsoft (Customer) decides to use Micronaut and the developers working for Microsoft are the ones actually using Micronaut, hence, they become the end user. Another end user may be any player playing Minecraft’s game based on Micronaut’s framework.
Product’s usage context
Currently, Micronaut continues to be a path forward for server side Java or serverless applications. Being a complete application framework for any type of application, Micronaut enables one to build multiple applications like microservices, serveless applications, message driven applications with Kafka/Rabit, CLI applications, android applications - basically anything with static void (String args).
Mirconaut stands out in business because of the various properties and features that it works on. These include Ahead Of Time compilation (eliminating run time reflections and performing compiled time annotation processes), Dependency Injections, Aspect Oriented Programming, Beans Introspection, etc. which result in monumental leap in startup time, blazing-fast throughput and minimal memory footprint. In a layman’s language, all these features make any application based on Micronaut’s framework capable of running in low memory and eliminate reflections, dynamic classloading and runtime proxies which increases the run time efficiency because majority of work is handled in compilation processes, hence, positively impacting the two most valued components of the computational world in today’s era - TIME and MEMORY.
The future direction of Micronaut is clearly defined by the product roadmap, in particular the roadmap for the next major release, version 2.0.
From the milestones listed on the roadmap it becomes evident that Micronaut intends to become an even more comprehensive full-stack JVM-based microservice framework.
Specifically, the major features that are planned for the 2.0 release are: Reactive Micronaut Data for SQL, Neo4j and MongoDB; HTTP/2 support; improvements to serverless support; new build plugins for Maven and Gradle; and further performance refinements. The 2.0.0 milestone on GitHub includes some additional objectives, notably some changes to address architectural issues.
The roadmap beyond this version is loosely defined. It is interesting to note, however, that the focus so far lies on adding and improving support for even more protocols and services, such as MQTT, Azure, and Google Cloud Platform. It is clear that the direction Micronaut is aiming for is to become a framework with an ever-increasing support for tools to build JVM-based microservice applications.