Payara Micro Revealed: Cloud-Native Application Development with Java
- Length: 249 pages
- Edition: 1
- Language: English
- Publisher: Apress
- Publication Date: 2022-05-06
- ISBN-10: 1484281608
- ISBN-13: 9781484281604
- Sales Rank: #0 (See Top 100 Books)
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 About the Author About the Technical Reviewer Acknowledgments 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
Donate to keep this site alive
How to download source code?
1. Go to: https://github.com/Apress
2. In the Find a repository… box, search the book title: Payara Micro Revealed: Cloud-Native Application Development with Java
, 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.