𝔖 Scriptorium
✦   LIBER   ✦

📁

Payara Micro Revealed: Cloud-Native Application Development with Java

✍ Scribed by David R. Heffelfinger


Publisher
Apress
Year
2022
Tongue
English
Leaves
238
Edition
1
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


Develop, configure, and deploy Java cloud-native applications using Payara Micro. This book demystifies Java cloud-native application development using standard Microprofile APIs and covers Payara-specific features such as automatic clustering and application initialization performance improvements. You will learn how to improve startup performance by taking advantage of class data sharing, and configure cloud-native applications via standard development tools such as Maven and Gradle. The book also clarifies how to develop functionality necessary in a cloud environment, such as health checks and request tracing, using MicroProfile APIs.

The book begins by showing how to develop microservices using RESTful web services, followed by how to create microservice clients using MicroProfile and the REST client API. Dependency Injection via Jakarta Context and Dependency Injection (CDI) is also covered. Various approaches to application configuration are covered as well, including property files, environment variables, and system properties. You will learn to configure fault tolerance and high availability, generate system and custom application metrics, and generate health checks to automatically improve overall application health. You will know how to trace the flow of a request across service boundaries with OpenTracing. You will be able to make future maintenance easily through generating documentation, including how to automatically update documentation as your code is updated. Additionally, you will learn how to secure cloud applications and to automatically cluster applications and improve application startup performance.

What You Will Learn

  • Develop microservices using standard Java APIs
  • Implement cloud functionality such as request tracing and health checks
  • Deploy applications as thin archives and as uber archives
  • Configure applications via Maven and Gradle
  • Generate custom metrics for capacity planning and proactive discovery of issues
  • Implement features in support of high availability and fault tolerance
  • Secure your applications with Jason Web Tokens
  • Take advantage of Payara’s own cloud platform for easy deployment

Who This Book Is For

Java developers who wish to develop cloud-native applications and microservices, and Java EE application developers who wish to transition to developing cloud-native applications that are lightweight and easily deployed

✦ Table of Contents


Table of Contents
About the Author
About the Technical Reviewer
Acknowledgments
Chapter 1: Jakarta EE, MicroProfile, Payara, and the Cloud
Brief Server-Side Java History
J2EE
Java EE
MicroProfile
Jakarta EE
Payara
Chapter 2: Developing Microservices Using Payara Micro
Setting Up Your Environment
Payara Micro Maven Plug-in
Payara BOM
Payara Maven Repository
Jakarta EE and MicroProfile Dependencies
Specifying the Base URI for Our Web Services
Running Our Application
Developing RESTful Web Services
Handling HTTP GET Requests
Handling HTTP POST Requests
Handling HTTP PUT Requests
Handling HTTP DELETE Requests
Handling HTTP PATCH Requests
Path and Query Parameters
Path Parameters
Query Parameters
Parsing JSON Data
Summary
Chapter 3: Developing Microservice Clients
MicroProfile REST Client API Overview
Generating HTTP GET Requests
Generating HTTP POST Requests
Generating HTTP PUT Requests
Generating HTTP DELETE Requests
Path and Query Parameters
Path Parameters
Query Parameters
Generating JSON from Java Objects
Summary
Chapter 4: Contexts and Dependency Injection
CDI Scopes
Life Cycle of CDI Beans
Dependency Injection
CDI Events
Firing Events
Listening for Events
Qualifiers
Observing CDI Scopes
Summary
Chapter 5: Application Configuration
Configuration Sources
Configuration via Property Files
Configuration via Environment Variables
Configuration via System Properties
Payara Specific Config Sources
Directory Configuration Source
Password Configuration Source
Domain Configuration Source
JNDI Configuration Source
Config Configuration Source
Server Configuration Source
Application Configuration Source
Module Configuration Source
Cluster Configuration Source
JDBC Configuration Source
LDAP Configuration Source
Cloud Provider Specific Configuration Sources
Custom Configuration Sources
Dynamic Properties
Converters
Standard Converters
Payara Micro Specific Converters
Custom Converters
Summary
Chapter 6: Metrics
Base Metrics
Vendor Metrics
Application Metrics
@Counted
@Gauge
@ConcurrentGauge
@Metered
@Timed
@SimplyTimed
Programmatic Application Metrics
Configuring MicroProfile Metrics in Payara Micro
Disabling Metrics
Securing Metrics
Customizing the Metrics Endpoint
Static Metrics
Summary
Chapter 7: High Availability and Fault Tolerance
Asynchronously Calling RESTful Web Service Endpoints
Limit Concurrent Execution to Avoid Overloading the System
Using Semaphores for Synchronous Endpoints
Using Thread Pools for Asynchronous Endpoints
Stop Invoking Repeatedly Failing Endpoints
Providing an Alternative Solution When Execution Fails
Retrying Execution in Case of Failure
Defining a Maximum Duration for Execution
Summary
Chapter 8: Health Checks
Free Health Check Functionality
Determining If a Service Is Live
Determining If a Service Is Ready
Configuring MicroProfile Health
Disabling MicroProfile Health
Securing MicroProfile Health
Customizing the MicroProfile Health Endpoint
Summary
Chapter 9: Request Tracing
Enabling Request Tracing in Payara Micro
Spans and Traces
Customizing Request Tracing
Tracing Additional Methods
Disabling Request Tracing
Customizing the Operation Name
Adding Additional Information to Spans
Creating Additional Spans
Summary
Chapter 10: Documenting Web Services
Automatically Generating Documentation
Customizing Documentation via Code Annotations
Customizing HTTP Responses
Customizing Documentation for Operations
Customizing Documentation for Path or Query Parameters
Configuring OpenAPI
Configuring OpenAPI via MicroProfile Config
Configuring OpenAPI via a Payara Micro Command File
Disabling OpenAPI
Enabling CORS Headers
Securing OpenAPI
Customizing the OpenAPI Endpoint
Summary
Chapter 11: Security with JSON Web Tokens
Obtaining a Token
Securing Microservices with JSON Web Tokens
MicroProfile Config JWT Properties
MicroProfile JWT Annotations
Invoking Secured Microservices with MicroProfile REST Client API
Obtaining Information from a Token
Summary
Chapter 12: Payara Micro Specific Features
Automatic Clustering
Clustered Application Scoped CDI Beans
Remote CDI Events
Uber Jars
Creating Uber Jars
Embedding Payara Micro
Summary
Chapter 13: Payara Cloud
Signing Up for Payara Cloud
Developing Applications for Payara Cloud
Deploying Applications to Payara Cloud
Creating a Namespace
Uploading Applications
Running Applications in Payara Cloud
Default Domains
Custom Domains
Summary
Index


📜 SIMILAR VOLUMES


Payara Micro Revealed: Cloud-Native Appl
✍ David R. Heffelfinger 📂 Library 📅 2022 🏛 Apress 🌐 English

<span>Develop, configure, and deploy Java cloud-native applications using Payara Micro. This book demystifies Java cloud-native application development using standard Microprofile APIs and covers Payara-specific features such as automatic clustering and application initialization performance improve

Practical Cloud-Native Java Development
✍ Emily Jiang, Andrew McCright, John Alcorn, David Chan, Alasdair Nottingham 📂 Library 📅 2021 🏛 Packt Publishing 🌐 English

<p><b>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</b></p><h4>Key Features</h4><ul><li>Apply your knowledge of Mic

Practical Cloud-Native Java Development
✍ Emily Jiang, Andrew McCright, John Alcorn, David Chan, Alasdair Nottingham 📂 Library 📅 2021 🏛 Packt Publishing 🌐 English

<p><b>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</b></p><h4>Key Features</h4><ul><li>Apply your knowledge of Mic

Cloud-Native Applications in Java
✍ Shyam Sundar & Munish Kumar Gupta & Ajay Mahajan [Shyam Sundar] 📂 Library 📅 2018 🏛 Packt Publishing 🌐 English

<span><p><b>Highly available microservice-based web apps for Cloud with Java</b></p><p><b>About This Book</b></p><ul><li>Take advantage of the simplicity of Spring to build a full-fledged application</li><li>Let your applications run faster while generating smaller cloud service bills</li><li>Integr

Hands-On Cloud-Native Applications with
✍ Francesco Marchioni; Mark Little 📂 Library 📅 2019 🏛 Packt Publishing 🌐 English

<p><b>Build robust and reliable Java applications that works on modern infrastructure, such as containers and cloud, using the new features in Quarkus 1.0</b></p> Key Features <li>Build apps with faster boot time and low RSS memory using the latest Quarkus 1.0 features </li> <li>Seamlessly integrate

Cloud Architecture Patterns: Develop clo
✍ Bill Wilder 📂 Library 📅 2012 🏛 O'Reilly Media 🌐 English

If your team is investigating ways to design applications for the cloud, this concise book introduces 11 architecture patterns that can help you take advantage of cloud-platform services. You'll learn how each of these platform-agnostic patterns work, when they might be useful in the cloud, and what