Introducing the Inverno Framework

Jeremy Kuhn
6 min readSep 2, 2021
inverno.io

Yet another application framework?

Softwares have significantly changed over the past few years, expectations in terms of stability, security, performance and maintainability are much higher now than before. Modern applications are developed and released using shorter automated cycles, they are cloud native and run in various technical and functional contexts, above all they must be able to react to change faster over the long term with minimum defects and limited costs. The ability to change must now be considered as a mandatory feature as well as making a proper usage of resources.

In that context, technologies used to develop applications have to change as well in order to respond to these new challenges. In the Java world, the most well known and widely adopted solutions are the Spring Framework and JEE, we can wonder whether they are still fit for the job ahead. The fact that JEE has been basically abandonned in its former form by companies who massively invested to make it successful is a big sign that a radical change is in motion. If we now look at the Spring framework which mostly defined the state of the art of enterprise application development, its architecture based on IoC/DI makes it flexible enough to adapt to these changes. Spring Boot is the natural evolution of the Spring Framework and a first response to above concerns. Nonetheless, I believe that some of its core concepts and its implementation which contributed to make it so successful are no longer in line with today’s technological landscape and it will be difficult to transform it into a perfect solution.

What is the Inverno Framework?

I’ve created the Inverno Framework based on that statement with the objective of delivering a complete Java framework for the development of modern applications exposing microservices in the cloud. It has been built around four main lines:

  • Modularity which allows to properly separate the various parts of an application into isolated modules. This approach simplifies the development of complex applications by large distributed teams while improving stability, reusability, extensibility and maintainability.
    Properly isolated modules are easier and safer to fix, replace or evolve than a complex monolythic application. They are also easier to compose and extend in order to adapt to a particular context.
    A modern application development framework must support and facilitate modular programming.
  • Performance which has become an important concern following the Cloud tranformation. Indeed people are starting to realize that although Cloud computing makes it easier to scale vertically and horizontally, this is not necessarly cheap and as a result, it is crucial for a modern application to make the most efficient use of resources.
    On bare metal, things are a bit different since hardware is regularly updated and the computing capacity can only increase for a price that remains more or less stable. When a new application is deployed, the capacity planning basically consists in matching the expected throughput with what the application can handle on a given hardware at a given point in time. After that, hardware is regularly updated depending on traffic bump and/or obsolescence. So if performance is not identified as a main concern in the first place, you may actually never see that an application doesn’t fully exploit assigned resources. Cloud computing brought resource usage into light as you strictly pay for the resources consumed by your application.
    Another important performance aspect is the boot and first response time. When running in the Cloud an application can be stopped or started at any time in response to a control plane therefore a long startup time is unacceptable. This is less of a problem on bare metal where an application run 99.999% of the time on a dedicated hardware with scheduled maintenance outages.
    A modern application development framework must then start fast, has a minimal runtime footprint and support very high throughput while optimizing the usage of hardware resources.
  • Simplicity which is what makes an application stable and maintainable. KISS and SOLID are already widely accepted principles that can only be achieved when the middleware allows to address complexity in the most simple way.
    A modern application development framework must provide a smooth development experience and always favors strictness and readability to be able to safely adapt to change.
  • Configurability which enables applications to adapt to a particular context. A modern application can be operated in multiple technical environments and for multiple users with different expectations.
    A modern application development framework must provide advanced configuration capabilities in order to create applications that can adapt quickly to a particular context and not the other way around.

The Inverno framework is fully modular and it enforces modular programming by combining the Java module system with a fresh approach to Inversion of Control and Dependency Injection. A module is an isolated building block which exposes a clear interface describing the features it provides and the dependencies it requires. Modules are assembled by the compiler which validates and generates the graph of objects forming the application.

This approach is different from existing solutions because modules are now first class citizens and most of the middleware processing is performed statically at compile time rather than runtime. This has many advantanges: first of all readability is improved since modules responsibilities are clearly identified, stability is also improved since we don’t have to actually run the application to know that it is workable, the application is safer thanks to the Java module system and because no code is dynamically loaded at runtime and finally the application runtime footprint and the startup time are decreased by an order of magnitude. GraalVM ahead-of-time compilation and native image generation for fast startup and low memory footprint are also greatly simplified.

The framework has been designed from scratch to be fully reactive, every APIs are exposing reactive non-blocking operations. At its heart it combines a best-in-class reactive threading model with non-blocking I/O which allows to absorb a very high throughput and make a full use of hardware resources. The reactor API also simplifies development as the code can be streamlined resulting in more concise and more readable programs.

It provides a unified configuration API which can be used to support complex setups from low-level environment related configurations required to bootstrap an application to higher level tenant specific configurations used to customize application behavior at runtime.

Microservices architecture makes complex applications easier to understand and to operate, their development can be easily distributed and parallelized which perfectly matches Cloud and DevOps practices. The Inverno framework provides special support for the development of microservices application including: descriptive route definition, advanced request routing, content negotiation, automatic payload conversion or the generation of OpenAPI specifications based on JavaDoc.

In addition, the framework also includes handlers for static contents and WebJars, a fast reactive template engine, a reactive SQL client and build tools that create native and optimized images of an application ready to be deployed in the Cloud.

Take away

Now why should you care? Because Cloud transformation is already well advanced and you might now need to create new modern applications that fit better, adapt faster with lower operational costs. Cloud technologies and DevOps practices have become universal, unlike traditional frameworks, the Inverno framework has been carefully designed to create efficient, cost effective and maintainable cloud native applications. It takes advantage of cutting-edge technologies like Java module system and reactive programming that makes it a perfect choice for modern application development on the Java platform.

The current stable release allows to develop microservices with database connectivity. Next milestones will provide a complete security module, monitoring capabilities and many more. The next round of Web framework benchmarks from TechEmpower should include the Inverno framework and allow you to fully assess framework’s performances which are among the best out there.

If you wish to go deeper and start working with the Inverno framework, please have a look at the reference documentation and if you need more, I also provide professional support and trainings through the Talatium company.

--

--