Book Image

Mastering Microservices with Java - Third Edition

By : Sourabh Sharma
Book Image

Mastering Microservices with Java - Third Edition

By: Sourabh Sharma

Overview of this book

Microservices are key to designing scalable, easy-to-maintain applications. This latest edition of Mastering Microservices with Java, works on Java 11. It covers a wide range of exciting new developments in the world of microservices, including microservices patterns, interprocess communication with gRPC, and service orchestration. This book will help you understand how to implement microservice-based systems from scratch. You'll start off by understanding the core concepts and framework, before focusing on the high-level design of large software projects. You'll then use Spring Security to secure microservices and test them effectively using REST Java clients and other tools. You will also gain experience of using the Netflix OSS suite, comprising the API Gateway, service discovery and registration, and Circuit Breaker. Additionally, you'll be introduced to the best patterns, practices, and common principles of microservice design that will help you to understand how to troubleshoot and debug the issues faced during development. By the end of this book, you'll have learned how to build smaller, lighter, and faster services that can be implemented easily in a production environment.
Table of Contents (22 chapters)
Free Chapter
1
Section 1: Fundamentals
6
Section 2: Microservice Patterns, Security, and UI
11
Section 3: Inter-Process Communication
15
Section 4: Common Problems and Best Practices

To get the most out of this book

You need to have a basic knowledge of Java and Spring Framework. You can explore the reference links given at the end of each chapter to get the more out of this book.

For this book, you can use any operating system (out of Linux, Windows, or macOS) with a minimum of 4 GB RAM. You will also require NetBeans with Java, Maven, Spring Boot, Spring Cloud, Eureka Server, Docker, and a continuous integration/continuous deployment application. For Docker containers, you may need a separate virtual machine or cloud host, preferably with 16 GB or more of RAM.

Download the example code files

You can download the example code files for this book from your account at www.packt.com. If you purchased this book elsewhere, you can visit www.packt.com/support and register to have the files emailed directly to you.

You can download the code files by following these steps:

  1. Log in or register at www.packt.com.
  2. Select the SUPPORT tab.
  3. Click on Code Downloads & Errata.
  4. Enter the name of the book in the Search box and follow the onscreen instructions.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR/7-Zip for Windows
  • Zipeg/iZip/UnRarX for Mac
  • 7-Zip/PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Mastering-Microservices-with-Java-Third-Edition. In case there's an update to the code, it will be updated on the existing GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Download the color images

Conventions used

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: " First, we'll add Spring Cloud dependencies, as shown in pom.xml."

A block of code is set as follows:

logging:
level:
ROOT: INFO
org.springframework.web: INFO

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

endpoints:
restart:
enabled: true
shutdown:
enabled: true

Any command-line input or output is written as follows:

Chapter6> mvn clean package

Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "After the values are updated, click on the Save and Test button."

Warnings or important notes appear like this.
Tips and tricks appear like this.