{"id":343,"date":"2020-08-18T09:15:55","date_gmt":"2020-08-18T09:15:55","guid":{"rendered":"https:\/\/www.javaindia.in\/blog\/?p=343"},"modified":"2020-08-18T09:47:00","modified_gmt":"2020-08-18T09:47:00","slug":"java-framework-quarkus","status":"publish","type":"post","link":"https:\/\/www.javaindia.in\/blog\/java-framework-quarkus\/","title":{"rendered":"What is Java Framework Quarkus &#038; How It is Helping Web Application Development?"},"content":{"rendered":"<p style=\"text-align: justify;\"><span style=\"color: #000000;\">Java is over two decades old, the features it offers makes it the most recommended programming language and has changed a lot from its initial release. The JVM fixed several problems and offers freedom of code reusability making it run on multiple platforms. With the usage of containers apps, libs and OS resources can be packaged into a single container that is free to run anywhere. JVM portability has become less important. Earlier, the additional cost was needed to pay for the portability, but not anymore. Now it is possible to build fast, low latency and reactive web applications that are always responsive. This has lead to a huge growth in the <a href=\"https:\/\/www.javaindia.in\/\" target=\"_blank\" rel=\"noopener\">Java development services<\/a> and enterprises are openly investing in web application development.<br \/>\n<\/span><br \/>\n<span style=\"color: #000000;\">However, the problem that comes across with Java is the multiple threads and long-running process, but people want short-lived processes that can boot very quickly. This problem has been resolved by the introduction of the Quarkus framework.<\/span><br \/>\n<span style=\"color: #000000;\"><br \/>\nQuarkus aims to address the bloated problem of Java head-on. Quarkus framework leverages GraalVM and HotSpot to offer developers a platform to build applications from Java code with fast boot times and reduced RSS memory. The stats from quarkus.io give a clear picture regarding its good job illustrating the benefits. The major point of difference to note is regarding both RSS memory and boot time between Quarkus native and the traditional cloud-native stack.<\/span><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_81 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.javaindia.in\/blog\/java-framework-quarkus\/#What_is_Quarkus_Framework\" >What is Quarkus Framework?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.javaindia.in\/blog\/java-framework-quarkus\/#What_is_the_Quarkus_Development_Process\" >What is the Quarkus Development Process?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.javaindia.in\/blog\/java-framework-quarkus\/#What_are_the_features_of_Quarkus\" >What are the features of Quarkus?<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.javaindia.in\/blog\/java-framework-quarkus\/#Docker-friendliness\" >Docker-friendliness<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.javaindia.in\/blog\/java-framework-quarkus\/#Quickstart_Guide\" >Quickstart Guide<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.javaindia.in\/blog\/java-framework-quarkus\/#Quarkus_Example\" >Quarkus Example<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.javaindia.in\/blog\/java-framework-quarkus\/#Whats_new_in_Quarkus_100Final\" >What\u2019s new in Quarkus 1.0.0.Final?<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.javaindia.in\/blog\/java-framework-quarkus\/#Fixes_and_upgrades\" >Fixes and upgrades<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.javaindia.in\/blog\/java-framework-quarkus\/#Whats_next_for_the_Quarkus_Framework\" >What\u2019s next for the Quarkus Framework?<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.javaindia.in\/blog\/java-framework-quarkus\/#1_Is_Quarkus_open_source\" >1. Is Quarkus open source?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.javaindia.in\/blog\/java-framework-quarkus\/#2_Is_Quarkus_the_future_of_Java\" >2. Is Quarkus the future of Java?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.javaindia.in\/blog\/java-framework-quarkus\/#3_What_is_the_goal_of_the_Quarkus_Framework\" >3. What is the goal of the Quarkus Framework?<\/a><\/li><\/ul><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"What_is_Quarkus_Framework\"><\/span><span style=\"color: #000000;\">What is Quarkus Framework?<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">Quarkus, the Java Framework is a product of renowned software company Red Hat. This framework has experienced multiple updates since its first release. The latest version is Quarkus 1.0.0, before that Red Hat, released over 30 updates if calculated one release every nine days.<\/span><br \/>\n<span style=\"color: #000000;\"><br \/>\nThe <a href=\"https:\/\/www.javaindia.in\/blog\/quarkus-framework-for-cloud-native-java-web-development\/\" target=\"_blank\" rel=\"noopener\">Quarkus framework<\/a> is an answer to the question of how to build Java applications that are futuristic and serverless. The Kubernetes native approach with the conventional JVM can trigger problems; therefore a more performing framework Quarkus is being used. Whether you call it a framework, platform or stack, it was developed with a reactive approach, but the imperative programming approach is explicitly supported.<\/span><br \/>\n<span style=\"color: #000000;\"><br \/>\nQuarkus offers an effective solution to run Java in this new world of serverless, microservices, containers, Kubernetes, FaaS, and the cloud because it has been designed keeping these factors in mind. Its container-first method for cloud-native Java applications unifies imperative and reactive programming paradigms for microservices development and provides an extensible set of standards-based enterprise Java libraries and frameworks combined with tremendous developer productivity that promises to transform the way we build in Java.<\/span><\/p>\n<h2 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"What_is_the_Quarkus_Development_Process\"><\/span><span style=\"color: #000000;\">What is the Quarkus Development Process?<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">Quarkus can be executed in dev mode which is very much similar to the Spring Boot, apart from the project can be packaged into fat jars. This is perfect to test your code and debug as it supports the live reload, but for the prod that is futuristic compiling is needed.<\/span><br \/>\n<span style=\"color: #000000;\">\u2022 First build your app in the IDE you prefer, next run it in dev mode<\/span><br \/>\n<span style=\"color: #000000;\">\u2022 Once you are satisfied, get ready to build a Java binary, simply run: \u201cmvnw package -Pnative\u201d, this is time-consuming as it is doing futuristic compiling creating native code<\/span><br \/>\n<span style=\"color: #000000;\">\u2022 Then, if you have the binary, we just have to create an image from the docker file<\/span><br \/>\n<span style=\"color: #000000;\">\u2022 At last, you can run according to your choice whether it in Docker or Kubernetes<\/span><\/p>\n<h2 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"What_are_the_features_of_Quarkus\"><\/span><span style=\"color: #000000;\">What are the features of Quarkus?<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">Quarkus Java Framework offers several features in addition to native code. Some prominent ones are mentioned below:<\/span><br \/>\n<span style=\"color: #000000;\">\u2022 Fast boot time, low RSS memory providing instant scaling of application and high memory utilization in platforms like Kubernetes.<\/span><br \/>\n<span style=\"color: #000000;\">\u2022 Unified configuration, fast reloads in a few seconds, Zero configs, streamlined code, flexible code, no hassle in the execution and, live coding.<\/span><br \/>\n<span style=\"color: #000000;\">\u2022 Quarkus brings a cohesive, simple to implement a full-stack framework by using libraries you love.<\/span><br \/>\n<span style=\"color: #000000;\">\u2022 It supports Kotlin language and different libraries like Hibernate, JPA, REST, JWT, etc.<\/span><br \/>\n<span style=\"color: #000000;\">\u2022 In simple words, a user can <a href=\"https:\/\/www.javaindia.in\/hire-java-developer\" target=\"_blank\" rel=\"noopener\">hire Java developer<\/a> to run conventional JPA\/JTA transactional services in super-fast lightweight containers in multiple environments, or clouds.<\/span><\/p>\n<h3 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Docker-friendliness\"><\/span><strong><span style=\"color: #000000;\"><strong>Docker-friendliness<\/strong><\/span><\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">Quarkus keeps all jar dependencies out of the main jar, which makes it feasible to leverage Docker layer caching. If dependencies don\u2019t change, the layer contains dependencies which can be reused provided your Dockerfile is configured appropriately:<br \/>\n<\/span><\/p>\n<pre class=\"le lf lg lh li hk fj ci\"><span style=\"color: #000000;\"><span class=\"nu mx dx aq ns b ea nv nw l nx\" data-selectable-paragraph=\"\">COPY target\/lib\/* \/deployments\/lib\/\r\nCOPY target\/*-runner.jar \/deployments\/app.jar<\/span><\/span><\/pre>\n<h3 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Quickstart_Guide\"><\/span><strong><span style=\"color: #000000;\"><strong>Quickstart Guide<\/strong><\/span><\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">You can instantly start by leveraging a predefined quarkus-maven-plugin task which creates a skeleton of the project for you:<br \/>\n<\/span><\/p>\n<pre class=\"le lf lg lh li hk fj ci\"><span style=\"color: #000000;\"><span class=\"nu mx dx aq ns b ea nv nw l nx\" data-selectable-paragraph=\"\">mvn io.quarkus:quarkus-maven-plugin:1.2.1.Final:create \\<\/span>\r\n-DprojectGroupId=com.pivovarit \\\r\n-DprojectArtifactId=quarkus-hello \\\r\n-DclassName=\"com.pivovarit.quarkus.HelloResource\" \\\r\n-Dpath=\"\/foo\"<\/span><\/pre>\n<h3 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Quarkus_Example\"><\/span><strong><span style=\"color: #000000;\"><strong>Quarkus Example<\/strong><\/span><\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">The simplest way to build a Quarkus based application is to launch a terminal and run the below-mentioned command:<br \/>\n<\/span><\/p>\n<pre class=\"le lf lg lh li hk fj ci\"><span style=\"color: #000000;\"><span class=\"nu mx dx aq ns b ea nv nw l nx\" data-selectable-paragraph=\"\">mvn io.quarkus:quarkus-maven-plugin:0.12.0:create \\\r\n-DprojectGroupId=org.acme \\\r\n-DprojectArtifactId=getting-started \\\r\n-DclassName=\"org.acme.quickstart.GreetingResource\" \\\r\n-Dpath=\"\/hello\"<\/span><\/span><\/pre>\n<p><span style=\"color: #000000;\">It creates a Maven project having GreetingResuce. It also creates a Dockerfile for the native and jvm docker images. The code is very smooth and easy:<br \/>\n<\/span><\/p>\n<pre class=\"le lf lg lh li hk fj ci\"><span style=\"color: #000000;\"><span class=\"nu mx dx aq ns b ea nv nw l nx\" data-selectable-paragraph=\"\">@Path(\"\/hello\")\r\npublic class GreetingResource { @GET\r\n@Produces(MediaType.TEXT_PLAIN)\r\npublic String hello() {\r\nreturn \"hello\";\r\n}\r\n}<\/span><\/span><\/pre>\n<h2 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Whats_new_in_Quarkus_100Final\"><\/span><span style=\"color: #000000;\">What\u2019s new in Quarkus 1.0.0.Final?<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">The Quarkus 1.0.0.Final is actually comprised of smaller fixes and changes as per the developer experience and research. As per the release, changes have been done to enhance the security and compatibility layers.<\/span><\/p>\n<h3 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Fixes_and_upgrades\"><\/span><strong><span style=\"color: #000000;\"><strong>Fixes and upgrades<\/strong><\/span><\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">A number of errors with Gradle integration and the Kotlin extension have been resolved. This section requires proper attention as they make necessary contributions. Some issues with the documentation have been fixed, and SmallRye OpenAPI and Swagger UI have been upgraded to resolve multiple bugs the community identified.<\/span><\/p>\n<h2 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"Whats_next_for_the_Quarkus_Framework\"><\/span><span style=\"color: #000000;\">What\u2019s next for the Quarkus Framework?<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">As for future planning, the updates will be released at a constant pace without slowing down. In the release notes, Red Hat has made a comment for the just-released GraalVM 19.3.0 support and Quarkus 1.1. They also found that using the framework might lead to some multiple dependency warnings that will be fixed at later stages.<\/span><br \/>\n<span style=\"color: #000000;\"><br \/>\n<strong>Frequently Asked Questions<\/strong><\/span><br \/>\n<span style=\"color: #000000;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-390\" src=\"https:\/\/www.javaindia.in\/blog\/wp-content\/uploads\/2020\/02\/Frequently-asked-questions.jpg\" alt=\"frequently asked questions\" width=\"700\" height=\"350\" srcset=\"https:\/\/www.javaindia.in\/blog\/wp-content\/uploads\/2020\/02\/Frequently-asked-questions.jpg 700w, https:\/\/www.javaindia.in\/blog\/wp-content\/uploads\/2020\/02\/Frequently-asked-questions-300x150.jpg 300w, https:\/\/www.javaindia.in\/blog\/wp-content\/uploads\/2020\/02\/Frequently-asked-questions-360x180.jpg 360w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><br \/>\n<strong><br \/>\n<\/strong><\/span><\/p>\n<h4 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"1_Is_Quarkus_open_source\"><\/span><strong><span style=\"color: #000000;\"><strong>1. Is Quarkus open source?<\/strong><\/span><\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">Quarkus is intended for building lightweight, container-based microservices and serverless applications. Inclusion in Runtimes gives enterprise customers a version of the open source Java stack that is supported by Red Hat. Previously Quarkus had been available just with community support.<\/span><\/p>\n<h4 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"2_Is_Quarkus_the_future_of_Java\"><\/span><strong><span style=\"color: #000000;\"><strong>2. Is Quarkus the future of Java?<\/strong><\/span><\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">Quarkus is the latest addition to the Java world. &#8230; This is why Quarkus was already considered by some to be the future of Java. It was designed to allow the development of so-called cloud-native Java applications, or \u201cKubernetes native\u201d to use their terms.<\/span><\/p>\n<h4 style=\"text-align: justify;\"><span class=\"ez-toc-section\" id=\"3_What_is_the_goal_of_the_Quarkus_Framework\"><\/span><strong><span style=\"color: #000000;\"><strong>3. What is the goal of the Quarkus Framework?<\/strong><\/span><\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">The goal of Quarkus is to make Java a leading platform in Kubernetes and serverless environments while providing developers a unified reactive and imperative programming approach to optimally address a wider range of distributed app architectures.<\/span><\/p>\n<p style=\"text-align: justify;\"><strong><span style=\"color: #000000;\"><strong>Wrapping Up:<\/strong><br \/>\n<\/span><\/strong><span style=\"color: #000000;\">The Quarkus Framework has got a lot of attention since its release. Many enterprises are opting for <a href=\"https:\/\/www.javaindia.in\/services\/java-web-application-development\" target=\"_blank\" rel=\"noopener\">Java web application development<\/a> to get the best results for their business. This has helped many enterprises to migrate to the cloud from regular web applications. If you are looking for a similar kind of services, share your requirements with us. We at Java India offer different services meeting your business needs in the most economical way. Our technical support is always present to ensure web application runs in the most optimized manner.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Java is over two decades old, the features it offers makes it the most recommended programming language and has changed a lot from its initial release. The JVM fixed several problems and offers freedom of code reusability making it run on multiple platforms. With the usage of containers apps, libs and OS resources can be packaged into a single container [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":354,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[53],"tags":[55,54],"class_list":["post-343","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-quarkus-framework","tag-quarkus","tag-quarkus-framework"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.javaindia.in\/blog\/wp-json\/wp\/v2\/posts\/343","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javaindia.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javaindia.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javaindia.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javaindia.in\/blog\/wp-json\/wp\/v2\/comments?post=343"}],"version-history":[{"count":16,"href":"https:\/\/www.javaindia.in\/blog\/wp-json\/wp\/v2\/posts\/343\/revisions"}],"predecessor-version":[{"id":619,"href":"https:\/\/www.javaindia.in\/blog\/wp-json\/wp\/v2\/posts\/343\/revisions\/619"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javaindia.in\/blog\/wp-json\/wp\/v2\/media\/354"}],"wp:attachment":[{"href":"https:\/\/www.javaindia.in\/blog\/wp-json\/wp\/v2\/media?parent=343"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javaindia.in\/blog\/wp-json\/wp\/v2\/categories?post=343"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javaindia.in\/blog\/wp-json\/wp\/v2\/tags?post=343"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}