Hands-On Cloud-Native Applications with Java and Quarkus
Build high performance, Kubernetes-native Java serverless applications
Francesco Marchioni
- 314 pages
- English
- ePUB (mobile friendly)
- Available on iOS & Android
Hands-On Cloud-Native Applications with Java and Quarkus
Build high performance, Kubernetes-native Java serverless applications
Francesco Marchioni
About This Book
Build robust and reliable Java applications that works on modern infrastructure, such as containers and cloud, using the new features in Quarkus 1.0
Key Features
- Build apps with faster boot time and low RSS memory using the latest Quarkus 1.0 features
- Seamlessly integrate imperative and reactive programming models to build modern Java applications
- Discover effective solutions for running Java on serverless apps, microservices, containers, FaaS, and the cloud
Book Description
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.
What you will learn
- Build a native application using Quarkus and GraalVM
- Secure your applications using Elytron and the MicroProfile JWT extension
- Manage data persistence with Quarkus using PostgreSQL
- Use a non-blocking programming model with Quarkus
- Learn how to get Camel and Infinispan working in native mode
- Deploy an application in a Kubernetes-native environment using Minishift
- Discover Reactive Programming with Vert.x
Who this book is for
The book is for Java developers and software architects who are interested in learning a promising microservice architecture for building reliable and robust applications. Knowledge of Java, Spring Framework, and REST APIs is assumed.
Frequently asked questions
Information
Section 1: Getting Started with Quarkus
- Chapter 1, Introduction to Quarkus Core Concepts
- Chapter 2, Developing Your First Application with Quarkus
- Chapter 3, Creating a Container Image of Your Application
Introduction to Quarkus Core Concepts
- An overview of the IT landscape, showing the benefits of cloud-native applications and microservices
- The basics of the Quarkus architecture
- Installing the required software (GraalVM to compile code natively and a development environment)
Technical requirements
From the big data hype to Kubernetes
The Kubernetes architecture in a nutshell
- API Server: This synchronizes and validates the information running in Pods and services.
- etcd: This provides consistent and highly available storage for the cluster data. You can think of etcd as the brain's shared memory.
- Controller Manager server: This checks for changes in the etcd service and uses its API to enforce the desired state.
- HAProxy: This can be added when we're configuring HA masters to balance loads between several master endpoints.
- Pod: This allows us to logically group containers and pieces of our application stacks together. A Pod acts as the logical boundary for such containers with shared resources and contexts. Pods can be scaled at runtime by creating Replica sets. This, in turn, ensures that the required number of Pods is always run by the deployment.
- Kubelet: This is an agent that runs on each node in the Kubernetes cluster. It makes sure that the containers are running in a Pod.
- Kube-Proxy: This maintains network rules on nodes to allow network communication between Pods.
- Container Runtime: This is the software that is responsible for running containers. Kubernetes supports multiple container runtimes (such as Docker, containerd, cri-o, and rktlet).
Benefits of using Kubernetes
- Kubernetes greatly simplifies container management. As you have learned, when using Kubernetes, there's no need to manage conta...