5 min

Tags in this article

, , ,

Java is one of the most popular programming languages among developers, but according to Red Hat, there is now too much work needed to run the programming language. To change this, the open-source giant developed the Quarkus framework. The idea is to make Java simpler and more relevant to various modern development disciplines: cloud-native app development, microservices and serverless. We decided to discuss this development in the Red Hat portfolio with Roel Hodzelmans, Senior Solution Architect at the company.

Within Red Hat, they are convinced of the power of Java as a programming language. For example, companies very often choose it for web development. The open-source giant also calls Java ‘the workhorse for the enterprise’ for a variety of reasons. However, the reality is also that the programming language is less suitable for some tasks than for others. For serverless development, for example, companies are more inclined to move to Python and Node.js, says Hodzelmans.

Java has taken steps in recent years to support as many types of applications and development disciplines as possible. For example, Java Enterprise Edition can well support a monolithic architecture. After that, the Java community also came up with additions to support microservices by collecting APIs with the Microprofile initiative. Now that developers also see more and more advantages in disciplines such as serverless, the Java community has to come up with something again.

According to Hodzelmans, enterprises are ultimately best served when striving for a mix of the various development disciplines. Monolithic applications are relevant when little overhead and remote calls are required, while microservices are scalable and dynamic. Serverless, in turn, comes with low costs and a fast deployment process.

In order to support this mix in the best possible way, Red Hat brought together several experts. The central question: how can we help Java developers with all the use cases with as little retraining as possible? They found the answer with Quarkus.

How does Quarkus work?

At the start of the development process of Quarkus, Red Hat established a number of principles on which it can fall back. The decision was made that Quarkus should have a positive effect on company revenues, a negative effect on operating costs, and that it should allow companies to avoid risk. Red Hat’s next step was to look at the technologies it can use to realize these principles.

The open-source giant came up with two necessary components for development, namely GraalVM and HotSpot. Red Hat looked as it were at what it can do to create custom applications for GraalVM and HotSpot. These technologies are used in current development processes to compile Java code. Red Hat saw a potential improvement for this compilation time (time needed to convert imported code to something executable), so there are also certain effects to be implemented towards the runtime (when the executable is actually running).

Normally, certain tasks take place in the runtime of an application. These tasks are performed in the memory, which leads to excessive use of that memory. Starting up these tasks also takes some time, which makes the overall process not very efficient. Quarkus performs this process differently, by calculating in advance how many resources are needed. This pre-calculation ensures that the system knows what is needed where, and how the application will behave, in order to prepare the necessary resources during compilation time. By default, less memory and disk space are needed, since tasks that are not needed are not executed. In the image below, Red Hat shows what Quarkus adds during the boot time of the application.

Another crucial move for Quarkus was getting along with popular industry standards and frameworks. These include Hibernate, RESTEasy, Apache Camel, Apache Kafka and Prometheus. Ultimately, the aim is to run Java efficiently in containers, with a particular focus on Kubernetes. Because of the pre-calculation, the size of the Java virtual machine decreases, making Java applications on Kubernetes run faster. The compatibility of Kubernetes, therefore, promotes the deployment process of the applications.

Effect of framework on business

According to Hodzelmans, Quarkus’ working method has resulted in organizations realizing four advantages when they take the framework into use. The benefits are as follows:

  • There is an improvement in efficiency. A standard traditional service stack requires 218 MB of memory and 9.5 seconds to start an application, while Quarkus in combination with GrailVM requires 35 MB memory and 0.055 seconds. When calling a serverless application, this is an acceptable time frame, the network latency is probably already higher than that. This increase in efficiency not only saves speed, but also reduces costs. Developers do not need to be retrained, to be able to work with a more efficient language.
  • Quarkus makes it possible to change a piece of code and see the result immediately. Some programming languages already supported such a live coding feature, but Java lagged behind in this respect. As a result, developers sometimes had to wait minutes to see the effect of modifications. With the framework, it is a matter of saving code, and the changes have been implemented.
  • The framework brings imperative and reactive programming together. An application can, therefore, use both programming methods, so that the desired user application is supported. Imperative development is useful, for example, when developers want to prepare things in advance and go through everything step by step. However, reactive programming is becoming more and more relevant, as developers react more frequently to an event to proceed immediately.
  • Finally, as mentioned earlier, Quarkus can work with various industry standards and frameworks. Quarkus integrates with all common frameworks, Hodzelmans assures us.

Community helps with development

Meanwhile, Quarkus is in an interim period: the general 1.0 version was launched in November, but support from Red Hat on top of the framework is still pending. Red Hat is, of course, hoping for feedback during this interim period, as companies are already working on it and the idea is open source. Community-initiated changes can then be implemented. Hodzelmans indicates that new innovations are already taking place on the basis of feedback.

By the way, it seems logical to us that Red Hat will come on top of Quarkus with support sometime in the coming months. Open-source companies usually wait a few months before adding this extra support, experience shows.

Java suitable for cloud-native development

It should be clear that Java is currently a highly desirable programming language for many user applications. Nevertheless, as a company you want your Java developers to be widely deployable. Programming disciplines such as serverless have become standards within the industry, and an established language such as Java must be able to handle this. According to Hodzelmans, in the end, it is even wise to embrace a mix: monolithic applications, microservices, serverless, etc.

From this point of view, it is good to see that Red Hat with Quarkus achieves a simplification that makes the language more relevant in certain areas. We are curious to see how Red Hat will further develop the framework.

Tip: Red Hat sees itself as the only open-source hybrid cloud enabler