Beginning Helidon: Building Cloud-Native Microservices and Applications

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Learn how to build cloud-native microservices with Helidon - an open-source Java framework from Oracle. This book will show you how to take full advantage of the cloud by optimizing applications with fast start times, low memory consumption, and a small disk footprint. The open-source Helidon framework provides all that, and more. It’s based on Java 17, giving you full access to new code features. This book reveals how Helidon also supports modern enterprise Java standards such as MicroProfile. Plus, you'll see how Helidon lets you use GraalVM to build lightning-fast native executables, and its unique reactive layer allows you to develop efficient low-level APIs. Each chapter in the book teaches a new Helidon concept through practical examples based on real-life use-cases. You’ll learn how to add observability and security to your microservices, how to work with databases, and call other services. You'll also look at all MicroProfile 5.0 platform specifications as well as some stand-alone specs such as Messaging and Long Running Actions. Best of all, everything covered in this book makes it a great study guide for the upcoming Oracle Helidon certification - the perfect way to prove your new skills to a prospective employer! What You'll Learn Package microservices using JLink and GraalVM Deploy microservices to Kubernetes Review MicroProfile 5.0 specifications in detail Understand the basics of Helidon Reactive APIs Who This Book Is For Developers and architects who want to start developing cloud-native applications; developers who already use different Java framework and want to learn about Helidon; those interested in developing portable applications using MicroProfile and Jakarta EE

Author(s): Dmitry Komilov, Daniel Kec, Dmitry Aleksandrov
Publisher: Apress
Year: 2023

Language: English
Pages: 480

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
df-Capture.PNG