Nebrass Lamouchi
Pro Java Microservices with Quarkus and Kubernetes
A Hands-on Guide
1st ed.
Logo of the publisher
Nebrass Lamouchi
Paris, France
ISBN 978-1-4842-7169-8 e-ISBN 978-1-4842-7170-4
https://doi.org/10.1007/978-1-4842-7170-4
Nebrass Lamouchi 2021
This work is subject to copyright. All rights are solely and exclusively licensed by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed.
The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use.
The publisher, the authors and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, expressed or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
This Apress imprint is published by the registered company APress Media, LLC part of Springer Nature.
The registered company address is: 1 New York Plaza, New York, NY 10004, U.S.A.
To Mom, its impossible to thank you adequately for everything youve done.
To the soul of Dad, I miss you every day
To Firass, you are the best, may God bless you
To my sweetheart, since youve come into my life, there are so many new emotions and feelings begging to come out
Preface
Pro Java Microservices with Quarkus and Kubernetes will teach you how to build and design microservices using Java and the Quarkus platform.
This book covers topics related to developing Java microservices and deploying them to Kubernetes.
Traditionally, Java developers are used to developing large, complex, monolithic applications. The process of developing and deploying monoliths has always been slow and painful. This book will help Java developers quickly get started with the features and concerns of the microservices architecture. It will introduce Docker and Kubernetes for the deployment in the cloud.
This book is aimed at Java developers who want to build microservices using the new stack and who want to deploy them to Kubernetes.
You will be guided on how to install the appropriate tools, and for those who are new to enterprise development using Quarkus, you will be introduced to its core principles and main features through a deep step-by-step tutorial of its many components. For those who have prior experience using Quarkus for enterprise development, this book offers some recipes that illustrate how to split monoliths and implement microservices and deploy them as containers to Kubernetes.
Here are some of the key challenges that I address in this book:
Introducing containerization with Docker
Introducing Quarkus for beginners
Implementing a sample monolithic application
Splitting a monolith using the domain driven design (DDD) approach
Implementing the cloud patterns
Rethinking the deployment process
Introducing the Kubernetes world
Introducing best practices and the recommended patterns while creating cloud-native applications
By the end of this book, you will have practical hands-on experience building microservices using Quarkus and you will be able to deploy them as containers to Kubernetes.
What This Book Covers
Chapter , Getting Started with Containerization, presents containerization with Docker and Podman.
Chapter , Introduction to the Monolithic Architecture, provides an introduction to monolithic architecture with a focus on its advantages and drawbacks.
Chapter , Coding a Monolithic Application, includes a step-by-step tutorial for modeling and creating a monolith using Maven, Java 11, and Quarkus.
Chapter , Upgrading a Monolithic Application, lists some upgrades for our monolithic application, such as adding tests and most-wanted features.
Chapter , Building and Deploying a Monolithic Application, covers how to build and package the example application before showing how to deploy it in the runtime environment.
Chapter , Adding Anti-Disaster Layers, introduces how to implement the security and monitoring layers to help the application avoid disasters.
Chapter , Microservices Architecture Pattern, presents the drawbacks that can be faced in a typical monolithic architecture and illustrates the need something new, like the Microservices Architecture Pattern.
Chapter , Splitting the Monolith: Bombarding the Domain, presents domain driven design concepts to help you understand the business domain of a monolithic application, and to be able to split it into subdomains.
Chapter , Applying DDD to the Code, shows how to apply all the DDD concepts to the monolithic application source code and to successfully split the monolith into bounded contexts.
Chapter , Meeting the Microservices Concerns and Patterns, offers a deep presentation of the concerns and cloud patterns related to the Microservices Architecture Pattern.
Chapter , Getting Started with Kubernetes, covers how to build real standalone business microservices.
Chapter , Implementing Cloud Patterns, presents an in-depth examination of the most efficient container orchestrator: Kubernetes.
Chapter , Building Kubernetized Microservices, shows how to migrate a monoliths code to build microservices while applying Kubernetes concepts and features.
Chapter , Flying all Over the Sky with Quarkus and Kubernetes, explains how implement additional cloud patterns using Quarkus and Kubernetes.
And more
The source code of this book is available via the Download Source Code link located at www.apress.com/9781484271698 .
Reader Feedback
I always welcome feedback from my great readers. Please let me know what you thought about this bookwhat you liked or disliked.
If you have any questions or inquiries, feel free to get in touch by emailing me at lnibrass@gmail.com .
Introduction
Quarkus is the latest Java Framework project in the long list of frameworks created by Red Hat. First released in 2018, its the successor to the WildFly Swarm and Thorntail frameworks. These two frameworks came to market in the golden age of the Spring Boot Framework. This is why they were defeated and didnt win the battle. After test-running WildFly Swarm on my own projects, I decided not to adopt it.