Beginning Helidon: Building Cloud-Native Microservices and Applications [1 ed.] 1484294726, 9781484294727

Learn how to build cloud-native microservices with Helidon - an open-source Java framework from Oracle. This book will s

283 82 9MB

English Pages 488 Year 2023

Report DMCA / Copyright

DOWNLOAD EPUB FILE

Table of contents :
Table of Contents
About the Authors
About the Technical Reviewers
Introduction
Preface
Chapter 1: Introduction
Introducing Helidon
Helidon Flavors
Helidon MP
Helidon SE
Which Flavor Should You Use?
Summary
Chapter 2: Your First Application
Generating Your First Application
Helidon CLI
Project Starter
Helidon Maven Archetypes
Analyzing Generated Project
Quickstart Application
Maven Project
CDI
RESTful Web Service
Build and Run
Packaging
Executable JAR
jlink Image
Native Image
Local Native Image Build
Docker Native Image Build
Deploying to Kubernetes
Summary
Chapter 3: Configuration
Expressions
Programmatic API
Config Sources
Converters
Automatic Converter
Aggregated Properties
Custom Converter
Profiles
Property Level
Config Source Level
Meta Configuration
YAML Config Source
Custom Config Source
Dynamic Config Source
Kubernetes ConfigMap
Environment Variables
Mounted Volume
Summary
Chapter 4: Observability
What Is Observability?
Health
Kubernetes Probes
MicroProfile Health
Adding Health Checks to Your Helidon Application
Using Project Starter
Using CLI
Adding Dependencies Manually
Built-in Checks
Custom Checks
Metrics
Adding MicroProfile Metrics Support to Your Helidon Application
Using Project Starter
Using CLI
Adding Dependencies Manually
Sample Application
MicroProfile Metrics REST API
Metrics Model
Metric Identity
Metric Scopes
Base Scope
Vendor Scope
Application Scope
Metric Metadata
Metrics Types
Using MicroProfile Metrics API
Counter
Using Annotations
Using Programmatic API
Gauge
Using Annotations
Using Programmatic APIs
Concurrent Gauge
Using Annotations
Using Programmatic API
Histogram
Using Programmatic API
Meter
Using Annotations
Using Programmatic APIs
Simple Timer
Using Annotations
Using Programmatic API
Timer
Using Annotations
Using Programmatic API
Tracing
Distributed Tracing
Adding Tracing to Your Helidon Application
Using Project Starter
Using CLI
Adding Dependencies Manually
Helidon Tracing Implementation
Helidon Built-in Spans
MicroProfile OpenTracing API
Configuration
Enabling/Disabling Tracing
Renaming a Top-Level Span
Logging
Logging in Helidon
Mapped Diagnostic Context (MDC)
MDC with JUL
MDC with Log4j
MDC with SLF4J
Summary
Chapter 5: Communicating with Other Services
MicroProfile Rest Client
Integration with MicroProfile Config
Exception Handling
Modifying Requests and Responses
Handling Headers
Asynchronous Operations
Programmatic APIs
MicroProfile Rest Client Conclusion
JAX-RS Client API
Providers
Asynchronous Operations
JAX-RS Client API Conclusion
CORS
Summary
Chapter 6: Accessing Data
Low-Level Data Access with JDBC
Working with DataSource
Data Access with JPA
Transactions
Summary
Chapter 7: Resiliency
Retry
Fallback
Asynchronous
Timeout
Circuit Breaker
Bulkhead
Fault Tolerance and CDI
Summary
Chapter 8: Security
Serving HTTPS
Helidon Security
Basic Authentication
JSON Web Token
MicroProfile JWT RBAC
OpenID Connect
Token Propagation
Configuration of Secrets
AES-GCM Encryption
RSA Encryption
Plain Text Password Detection
Summary
Chapter 9: Using OpenAPI
About OpenAPI
Basic Usage
Static OpenAPI Files
Automatic Client Generation
Summary
Chapter 10: Testing Your Helidon Application
Testing in Helidon
Testing with JUnit 5
Advanced Usage
Testing with TestNG
Work with Testcontainers
The Other Way Around
Summary
Chapter 11: Scheduling Tasks
Scheduling in Helidon
Simple Scheduling in Helidon
Scheduling in Kubernetes
Summary
Chapter 12: Integration with Other Technologies
Neo4j
Enabling Metrics and Health Checks
Coherence
Integrating with Helidon
Verrazzano
Deploying the Helidon Wizard Application
Summary
Chapter 13: Going Reactive
Reactive Streams
Reactive Operators
Marble Diagrams
MicroProfile Reactive Streams Operators
of
empty
failed
generate
iterate
fromCompletionStage
fromCompletionStageNullable
fromPublisher
concat
map
peek
filter
limit
takeWhile
dropWhile
skip
flatMap
flatMapCompletionStage
flatMapIterable
onComplete
onError
onErrorResume
onErrorResumeWith
onTerminate
cancel
reduce
distinct
findFirst
forEach
ignore
toList
to
via
Helidon Reactive Operators
Reactive Messaging
Channel
Emitter
Message
Acknowledgment
No Acknowledgment
Messaging Health
Messaging Connectors
Kafka Connector
Nack Strategies
JMS Connector
Injected ConnectionFactory
Lookup ConnectionFactory over JNDI
Destination
Message
javax vs. jakarta JMS
WebLogic JMS Connector
WebLogic Destination CDI Syntax
Non-Distributed Destinations
Uniform Distributed Destinations (UDDs)
JNDI Destination
Oracle AQ Connector
Single Consumer Queue
Multi-Consumer Queue
Mock Connector
Summary
Chapter 14: Long Running Actions (LRA)
LRA Transaction
Context Propagation
Participant
Complete
Compensate
Status
Forget
AfterLRA
Leaving LRA
Non-JAX-RS Participant Methods
Asynchronous Compensation
LRA Coordinator
Narayana LRA Coordinator
MicroTx
Experimental Helidon LRA Coordinator
Online Cinema Booking System
Summary
Chapter 15: Helidon SE
Helidon SE Basics
Generating Helidon SE Application
Using Project Starter
Using CLI
Analyzing the Generated Project
Main Method
Creating and Starting a Web Server
Configuration
Routing
RESTful Services
Health Checks
Metrics
Building and Packaging
Other Helidon SE Features
Summary
Index

Beginning Helidon: Building Cloud-Native Microservices and Applications [1 ed.]
 1484294726, 9781484294727

  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
Recommend Papers