Book Image

Hands-On Cloud-Native Applications with Java and Quarkus

By : Francesco Marchioni
Book Image

Hands-On Cloud-Native Applications with Java and Quarkus

By: Francesco Marchioni

Overview of this book

Quarkus is a new Kubernetes-native framework that allows Java developers to combine the power of containers, microservices, and cloud-native to build reliable applications. The book is a development guide that will teach you how to build Java-native applications using Quarkus and GraalVM. We start by learning about the basic concepts of a cloud-native application and its advantages over standard enterprise applications. Then we will quickly move on to application development, by installing the tooling required to build our first application on Quarkus. Next, we’ll learn how to create a container-native image of our application and execute it in a Platform-as-a-Service environment such as Minishift. Later, we will build a complete real-world application that will use REST and the Contexts and Dependency injection stack with a web frontend. We will also learn how to add database persistence to our application using PostgreSQL. We will learn how to work with various APIs available to?Quarkus?such as Camel, Eclipse MicroProfile, and Spring DI. Towards the end, we will learn advanced development techniques such as securing applications, application configuration, and working with non-blocking programming models using Vert.x. By the end of this book, you will be proficient with all the components of Quarkus and develop-blazing fast applications leveraging modern technology infrastructure.
Table of Contents (15 chapters)
Free Chapter
1
Section 1: Getting Started with Quarkus
5
Section 2: Building Applications with Quarkus
10
Section 3: Advanced Development Tactics

Quarkus architecture

Now that we know about some of the highlights of Quarkus, let's have a more in-depth look at the architecture of this framework.

At the heart of Quarkus, there is the core component that does the hard work of rewriting our application in the build phase so that super-optimized native executable and Java-runnable applications can be generated. To do that, Quarkus core requires the cooperation of a set of tools:

  • Jandex: This is a space-efficient Java annotation indexer and offline reflection library that's able to index all runtime visible Java annotations and class hierarchies for a set of classes into a memory-efficient representation.
  • Gizmo: This is a bytecode generation library used by Quarkus to produce Java bytecode.
  • GraalVM: This is a set of components. Every component has a specific function, such as a compiler, an SDK API for the integration...