Java

Migrating Java applications to Quarkus: Lessons learned

Migrating Java applications to Quarkus: Lessons learned

Migrating applications from a well-grounded framework to a completely new framework just a few days after its public release sounds crazy, right? Before doing so, I asked myself several questions, such as: Why should I do that? Is this new framework stable? What would be the gain? To me, the most important of these is: Why?

To help answer that question, I started thinking about my application’s performance—in this case, the bootstrap time—and asked myself whether I was happy with the actual time my application took to start up. The answer was no. And, nowadays, this is one of the most important metrics to be considered when working with microservices, mainly on a serverless architecture.

The goal of this article is to provide a point of reference for a basic migration of an existing Java EE application to Quarkus. For this reason, I’ll save a few lines of the article by not introducing Quarkus and focus mostly on the migration part. If you don’t know what Quarkus is, then I recommend reading this article and visiting the Quarkus homepage.

In this article, I’ll try to illustrate all the changes, or at least the most important changes, that I had to do on my existing application to make it run well with Quarkus.

Continue reading “Migrating Java applications to Quarkus: Lessons learned”

Share
From zero to Quarkus and Knative: The easy way

From zero to Quarkus and Knative: The easy way

You’ve probably already read about Quarkus, but you may not know that the superfast startup speed of Quarkus makes it the best candidate for working with Knative and serverless for your Function-as-a-Service (FaaS) projects.

Quarkus, also known as Supersonic, Subatomic Java, is a Kubernetes native Java stack tailored for GraalVM and OpenJDK HotSpot, crafted from the best-of-breed Java libraries and standards. Knative is a Kubernetes-based platform to build, deploy, and manage modern serverless workloads. You can learn more in this article series.

This article does not provide a full deep dive on Knative or Quarkus. Instead, I aim to give you a quick and easy way to start playing with both technologies so you can further explore on your own.

Continue reading “From zero to Quarkus and Knative: The easy way”

Share
10 things developers need to know about JShell

10 things developers need to know about JShell

JShell was introduced in JDK 9 as part of Java Enhancement Proposal (JEP) 222 under project Kulla. Many programming languages, such as JavaScript, Python, Ruby, etc., provide easy-to-use, command-line tools for their execution, but Java was still missing such a utility. So, JDK 9 introduced the Java shell (JShell) tool.

I discussed the basics of JShell (which is a Read-Evaluate-Print-Loop; REPL) in a previous article. In this article, I’ll cover advanced concepts in JShell that users should know for rapid development.

Continue reading “10 things developers need to know about JShell”

Share
Announcing Red Hat CodeReady Studio, the latest evolution of Red Hat Developer Studio

Announcing Red Hat CodeReady Studio, the latest evolution of Red Hat Developer Studio

Red Hat has been shipping a distribution of Eclipse IDE for years now, including all of the great features of Eclipse along with the add-ons, plugins, and tooling that make working with our products easy and enjoyable. These distributions have gone by different names over the years to indicate how they fit into the Red Hat ecosystem, and to tap into the trust that developers have when they think about Red Hat and what a Red Hat product means for them: it’ll be reliable; it’ll have a published lifecycle; it’s built from source; and if you submit a bug, we’ll fix it (and give the fix to the community). This change is no different.

Red Hat CodeReady Studio is the latest evolution of Red Hat Developer Studio, which itself was an evolution of JBoss Developer Studio. We’re proud to include our distribution of Eclipse IDE in the expanding CodeReady portfolio. Based on the latest Eclipse 4.11, with the latest additions of JBoss Tools and end-to-end testing that ensures everything works as expected, developers can count on the same great experience they’ve grown used to. With tools for working with Fuse and other middleware products and connectors for Red Hat OpenShift that enable super-fast, container-native “inner loop” development cycles, CodeReady Studio is absolutely one of the best desktop IDEs an enterprise JavaTM developer can use.

Continue reading “Announcing Red Hat CodeReady Studio, the latest evolution of Red Hat Developer Studio”

Share
Modern business logic tooling workshop, lab 2: Create a new project

Modern business logic tooling workshop, lab 2: Create a new project

This article series shows how to get started using modern business logic tooling. These updates start with moving from JBoss BPM to Red Hat Decision Manager and from JBoss BPM Suite to Red Hat Process Automation Manager.

The first lab update showed how to install Red Hat Decision Manager on your laptop. This article highlights the second lab update for Red Hat Process Automation Manager, which shows how to create a new project.

Let’s take a look at the lab, shall we?

Continue reading “Modern business logic tooling workshop, lab 2: Create a new project”

Share
Quarkus 0.12.0 released

Quarkus 0.12.0 released

Quarkus, a next-generation Kubernetes native Java framework, was announced in early March, and now Quarkus 0.12.0 has been released and is available from the Maven repository. The quickstarts, guides, and website also have been updated, and 213 issues and PRs are included in this release. That’s quite a few updates, but in particular check out the new metrics, health check, and Kafka guides. Also, this release requires GraalVM 1.0.0-RC13 for Building a Native Executable.

Continue reading “Quarkus 0.12.0 released”

Share
Init Container Build Pattern: Knative build with plain old Kubernetes deployment

Init Container Build Pattern: Knative build with plain old Kubernetes deployment

With Kubernetes evolving at supersonic speed and seeing a lot of adoption in the enterprise world, the developer community is now looking for solutions to common Kubernetes problems, such as patterns. In this article, I will explore a new Kubernetes pattern using Init Containers.

Let’s start with the use case that gave birth to this problem: Quarkus—Supersonic and Subatomic Java—has excited the Java developer community with its amazing speed and all new native build artifact for Java applications. As one of those excited developers, I want to quickly build and deploy a Quarkus application on to Kubernetes.

Continue reading “Init Container Build Pattern: Knative build with plain old Kubernetes deployment”

Share
Set up JDK Mission Control with Red Hat Build of OpenJDK

Set up JDK Mission Control with Red Hat Build of OpenJDK

JDK Mission Control is now the newest member of the Red Hat Software Collections (RHSCL). JDK Mission Control is a powerful profiler for HotSpot Java virtual machines (JVMs) and has an advanced set of tools that enable efficient and detailed analysis of the extensive data collected by JDK Flight Recorder. The toolchain enables developers and administrators to collect and analyze data from Java applications running locally or deployed in production environments using OpenJDK 11.

In this article, I will go through a primary example of setting up JDK Mission Control. For Linux, JDK Mission Control is part of the RHSCL and, for Windows, it is available as part of the OpenJDK zip distribution on the Red Hat Customer Portal.  For Linux, these instructions assume that Red Hat Build of OpenJDK 11 is already installed. I will show how to set up the system to install software from RHSCL, which provides the latest development technologies for Red Hat Enterprise Linux. Then, I will install the JDK Mission Control and run a simple sample application. The whole tutorial should take fewer than 10 minutes to complete.

Continue reading “Set up JDK Mission Control with Red Hat Build of OpenJDK”

Share
Quarking Drools: How we turned a 13-year-old Java project into a first-class serverless component

Quarking Drools: How we turned a 13-year-old Java project into a first-class serverless component

“The question of whether a computer can think is no more interesting than the question of whether a submarine can swim.” (Edsger W. Dijkstra)

Rule-based artificial intelligence (AI) is often overlooked, possibly because people think it’s only useful in heavyweight enterprise software products. However, that’s not necessarily true. Simply put, a rule engine is just a piece of software that allows you to separate domain and business-specific constraint from the main application flow. We are part of the team developing and maintaining Drools—the world’s most popular open source rule engine and part of Red Hat—and, in this article, we will describe how we are changing Drools to make it part of the cloud and serverless revolution.

Continue reading “Quarking Drools: How we turned a 13-year-old Java project into a first-class serverless component”

Share