Practical Cloud-Native Java Development with MicroProfile: Develop and deploy scalable, resilient, and reactive cloud-native applications using MicroProfile 4.1
- Length: 404 pages
- Edition: 1
- Language: English
- Publisher: Packt Publishing
- Publication Date: 2021-09-22
- ISBN-10: 1801078807
- ISBN-13: 9781801078801
- Sales Rank: #8300891 (See Top 100 Books)
Written by leading MicroProfile experts, this book provides you with best practices for building enterprise-grade cloud-native applications using MicroProfile 4.1 and running them on Open Liberty with Docker, Kubernetes, and Istio
Key Features
- Apply your knowledge of MicroProfile APIs to develop cloud-native applications
- Use MicroProfile Health to provide the startup, liveness, and readiness status of your enterprise application
- Build an end-to-end stock trader project and containerize it to deploy to the cloud with Istio interaction
Book Description
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.
What you will learn
- Understand best practices for applying the 12-Factor methodology while building cloud-native applications
- Create client-server architecture using MicroProfile Rest Client and JAX-RS
- Configure your cloud-native application using MicroProfile Config
- Secure your cloud-native application with MicroProfile JWT
- Become well-versed with running your cloud-native applications in Open Liberty
- Grasp MicroProfile Open Tracing and learn how to use Jaeger to view trace spans
- Deploy Docker containers to Kubernetes and understand how to use ConfigMap and Secrets from Kubernetes
Who this book is for
This book is for Java application developers and architects looking to build efficient applications using an open standard framework that performs well in the cloud. DevOps engineers who want to understand how cloud-native applications work will also find this book useful. A basic understanding of Java, Docker, Kubernetes, and cloud is needed to get the most out of this book.
Table of Contents
- What is Cloud-Native Application
- How does MicroProfile fit in?
- Introduce the stock trader cloud-native application
- Building Cloud-Native Applications
- Enhancing Cloud-Native Applications
- Observing and Monitoring the Cloud-Native Applications
- MicroProfile Ecosystem with Docker, Kubernetes and Istio
- Step by Step Stock Trader Development
- Deployment and Day 2 operations
- Reactive Cloud-Native Applications
- MicroProfile GraphQL
- MicroProfile Future
Practical Cloud-Native Java Development with MicroProfile Foreword Contributors About the authors About the reviewers Preface Who this book is for What this book covers To get the most out of this book Download the example code files Download the color images Conventions used Get in touch Share Your Thoughts Section 1: Cloud-Native Applications Chapter 1: Cloud-Native Applications What is a cloud-native application? Introducing distributed computing Exploring cloud-native application architectures Microservices Monoliths Macroservices Function as a Service Event sourcing Cloud-native development best practices Twelve-Factor App Other best practices Summary Chapter 2: How Does MicroProfile Fit into Cloud-Native Application Development? MicroProfile overview History of MicroProfile Characteristics of MicroProfile MicroProfile specifications Platform release Standalone releases MicroProfile Starter Accessing MicroProfile Starter via the web Accessing MicroProfile Starter via the command line Accessing MicroProfile Starter via an IDE plugin IntelliJ IDEA plugin Summary Chapter 3: Introducing the IBM Stock Trader Cloud-Native Application Overview of the IBM Stock Trader application UIs Architectural diagram Mandatory microservices and external services Trader Broker Portfolio Stock Quote Optional microservices and external services Tradr Account Trade History Messaging Notifications Collector Looper Summary Section 2: MicroProfile 4.1 Deep Dive Chapter 4: Developing Cloud-Native Applications Technical requirements Developing a RESTful service with JAX-RS Hello World! A more real-world example Entity providers and ParamConverter Intercepting requests and responses Dynamic providers Async Context injection Managing the payload with JSON-P and JSON-B JSON-P JSON-B Consuming RESTful services with the MicroProfile Rest Client JAX-RS Client APIs MicroProfile Rest Client Client-side providers Async Propagating HTTP headers from server to client Managing life cycle and DI with CDI Scopes Injection Summary Chapter 5: Enhancing Cloud-Native Applications Configuring cloud-native applications using MicroProfile Config Storing configuration Removing properties Converters Config lookup Building a Config instance yourself Making the MicroProfile Config API available Making a cloud application resilient using MicroProfile Fault tolerance @Asynchronous @Retry @Timeout @CircuitBreaker The Bulkhead pattern Fallback Using Fault Tolerance annotations together Fault Tolerance configuration Making the MicroProfile Fault Tolerance API available Documenting cloud native applications using MicroProfile OpenAPI Applying MicroProfile OpenAPI annotations on JAX-RS operations Using a programming model to generate documentation Using pre-generated OpenAPI documents Applying filters to the OpenAPI document MicroProfile OpenAPI configuration Viewing an OpenAPI document Making MicroProfile OpenAPI APIs available Securing cloud-native applications using MicroProfile JWT JWT format How does MicroProfile JWT work? Where to find the public key and private key How to make MicroProfile JWT available to applications? Summary Chapter 6: Observing and Monitoring Cloud-Native Applications Technical requirements Determining the health of your cloud-native application using MicroProfile Health The importance of MicroProfile Health in a cloud-native application MicroProfile Health technology overview Instrumenting health check procedures Retrieving health check data MicroProfile health checks with Kubernetes' liveness, readiness, and startup probes Instrumenting metrics on your cloud-native application using MicroProfile Metrics The importance of MicroProfile Metrics in a cloud-native application MicroProfile Metrics technology overview The seven metric types The metric model Instrumenting metrics Visualizing metric data with Prometheus and Grafana Tracing your cloud-native application using MicroProfile OpenTracing The importance of and an overview of MicroProfile OpenTracing in a cloud-native application Auto-instrumenting JAX-RS requests Instrumenting the @Traced annotation and injecting a tracer Visualizing traces with Jaeger Summary Chapter 7: MicroProfile Ecosystem with Open Liberty, Docker, and Kubernetes Technical requirements Deploying cloud-native applications to Open Liberty Containerizing cloud-native applications using Docker The container image Deploying cloud-native applications to Kubernetes MicroProfile Health in Kubernetes MicroProfile Config in Kubernetes MicroProfile and Service Mesh Summary Section 3: End-to-End Project Using MicroProfile Chapter 8: Building and Testing Your Cloud-Native Application Technical requirements Compiling the Stock Trader microservices GitHub Maven Building the Stock Trader container images Open Liberty Docker Testing the Stock Trader microservices Testing the frontend microservice Testing a backend microservice Using MicroProfile features in Stock Trader Implicit usage of MicroProfile features Summary Chapter 9: Deployment and Day 2 Operations Technical requirements Understanding the role of operators Installing the operator via the OpenShift console OperatorHub Installing the operator Deploying the application via the operator form UI Deploying the application via the CLI Understanding day 2 operations Scaling a microservice Upgrading a microservice Performing problem determination Summary Section 4: MicroProfile Standalone Specifications and the Future Chapter 10: Reactive Cloud-Native Applications Differentiating between imperative and reactive applications Using MicroProfile Context Propagation to manage context Using ManagedExecutor to propagate context Using ThreadContext to propagate context Using MicroProfile Reactive Messaging to build a reactive application Message Message acknowledgment Channel Message consumption using @Incoming Message production using @Outgoing Message processing using both @Incoming and @Outgoing Using Emitter to publish messages Using a connector to bridge to an external messaging technology Summary Chapter 11: MicroProfile GraphQL Technical requirements Understanding GraphQL basics and when to use it Building services with MP GraphQL Developing queries Developing mutations Writing entities Outsourcing Sending partial results using GraphQLException Consuming GraphQL services with client APIs Dynamic client Type-safe client Summary Chapter 12: MicroProfile LRA and the Future of MicroProfile Cloud-native application transactions Using MicroProfile LRA for cloud-native application transactions Making MicroProfile LRA available Using the latest MicroProfile platform release MicroProfile's technical roadmap Adopting OpenTelemetry in MicroProfile What is the future of MicroProfile Metrics? Adopting gPRC MicroProfile and Jakarta EE alignment Aligning MicroProfile 5.0 with Jakarta EE 9.1 Summary Why subscribe? Other Books You May Enjoy Packt is searching for authors like you Share Your Thoughts
Donate to keep this site alive
How to download source code?
1. Go to: https://github.com/PacktPublishing
2. In the Find a repository… box, search the book title: Practical Cloud-Native Java Development with MicroProfile: Develop and deploy scalable, resilient, and reactive cloud-native applications using MicroProfile 4.1
, sometime you may not get the results, please search the main title.
3. Click the book title in the search results.
3. Click Code to download.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.