Evolution of Java – Quarkus
April 1, 2020 2:38 pm / BY JaguarSoftware / No Comments
Upto now Spring Framework was the most popular Java framework. Spring Boot had become the goto framework for Java. But Java is a very old language, which was developed in the last Century. When Huge Servers used to run monolithic large applications. So, Java consumes a lot of memory and startup time is very slow.
Java is not fit for the Cloud as Java consumes a lot of memory and startup time is very slow. So other languages like Go came up.
The root cause of the problem was found to be a widely used feature in Java called reflection. Reflection uses a lot of memory to determine the status of objects and then operate on them.
Android was using Java apps and they were suffering from high memory usage and slow performance. But Android teams researched and found a solution to make Java Apps fast and small. This solution was Ahead of Time (AOT) Compilation. AOT is a type of compilation which does the work done by reflection at the runtime, but it did it at compile time. So when source code is being compiled all the work is dome and data saved, so that reflection will not be required at runtime. Thus, by eliminating reflection the memory footprint at runtime was brought down significantly. Also because less work is being done at runtime so the startup time was reduced significantly.
Redhat took the initiative to provide a wider solution and make Java relevant again. They developed a new framework called Quarkus which used AOT. This was the birth of supersonic, sub atomic Java. Quarkus makes Java relevant for the Cloud. Low memory footprint, small size, very fast startup time and great developer experience. Java Developers earlier could have a coffee while waiting for the program to compile. But with Quarkus you just save the code and the results show instantly.
With significant reduction in the startup and response times and the lower memory footprint makes Quarkus Applications fit for the Cloud. Quarkus has better or similar performance as nodeJs or Go.
- by Aman S Bains