Book Image

Practical Cloud-Native Java Development with MicroProfile

By : Emily Jiang, Andrew McCright, John Alcorn, David Chan, Alasdair Nottingham
Book Image

Practical Cloud-Native Java Development with MicroProfile

By: Emily Jiang, Andrew McCright, John Alcorn, David Chan, Alasdair Nottingham

Overview of this book

In this cloud-native era, most applications are deployed in a cloud environment that is public, private, or a combination of both. To ensure that your application performs well in the cloud, you need to build an application that is cloud native. MicroProfile is one of the most popular frameworks for building cloud-native applications, and fits well with Kubernetes. As an open standard technology, MicroProfile helps improve application portability across all of MicroProfile's implementations. Practical Cloud-Native Java Development with MicroProfile is a comprehensive guide that helps you explore the advanced features and use cases of a variety of Jakarta and MicroProfile specifications. You'll start by learning how to develop a real-world stock trader application, and then move on to enhancing the application and adding day-2 operation considerations. You'll gradually advance to packaging and deploying the application. The book demonstrates the complete process of development through to deployment and concludes by showing you how to monitor the application's performance in the cloud. By the end of this book, you will master MicroProfile's latest features and be able to build fast and efficient cloud-native applications.
Table of Contents (18 chapters)
Section 1: Cloud-Native Applications
Section 2: MicroProfile 4.1 Deep Dive
Section 3: End-to-End Project Using MicroProfile
Section 4: MicroProfile Standalone Specifications and the Future

Introducing distributed computing

Most cloud-native architectures involve splitting an application into several discrete services that communicate over a network link rather than an in-process method invocation. This makes cloud-native applications implicitly distributed applications, and while distributed computing is nothing new, it does increase the need to understand the benefits and pitfalls of distributed computing. When building distributed applications, it is important to consider and understand the eight fallacies of distributed computing. These are as follows:

  • The network is reliable.
  • Latency is zero.
  • Bandwidth is infinite.
  • The network is secure.
  • Topology doesn't change.
  • There is one administrator.
  • Transport cost is zero.
  • The network is homogeneous.

In essence, what these fallacies mean is that a network call is slower, less secure, less reliable, and harder to fix than invoking a Java method call or a C procedure. When creating cloud-native applications, care needs to be taken to ensure these fallacies are correctly accounted for, otherwise, the application will be slow, unreliable, insecure, and impossible to debug.

An application consisting of multiple services interacting across the network can produce many benefits, such as the ability to individually scale and update services, but care must be taken to design services to minimize the number of network interactions required to deliver the ultimate business solution.

As a result, several cloud-native architectures can be used to build cloud-native applications that present different tradeoffs between the benefits and challenges of distributed computing.