Hands-On Enterprise Java Microservices with Eclipse MicroProfile
图书信息
| 作者 | Cesar Saavedra |
| 出版社 | Packt Publishing |
| ISBN | 9781838644321 |
| 出版时间 | 2019-08-30 |
| 字数 | 31.8万 |
| 分类 | 进口书,外文原版书,电脑,网络 |
读书简介
An effective guide to designing, building, and deploying enterprise Java microservices with Eclipse MicroProfile Key Features * Create cloud-native microservices with ease using this detailed guide * Avoid vendor lock-in when implementing microservices using Eclipse MicroProfile * Discover why MicroProfile is a great specification for building microservices in multi-cloud environments Book Description Eclipse MicroProfile has gained momentum in the industry as a multi-vendor, interoperable, community-driven specification. It is a major disruptor that allows organizations with large investments in enterprise Java to move to microservices without spending a lot on retraining their workforce. This book is based on MicroProfile 2.2, however, it will guide you in running your applications in MicroProfile 3.0. You'll start by understanding why microservices are important in the digital economy and how MicroProfile addresses the need for enterprise Java microservices. You'll learn about the subprojects that make up a MicroProfile, its value proposition to organizations and developers, and its processes and governance. As you advance, the book takes you through the capabilities and code examples of MicroProfile’s subprojects - Config, Fault Tolerance, Health Check, JWT Propagation, Metrics, and OpenTracing. Finally, you’ll be guided in developing a conference application using Eclipse MicroProfile, and explore possible scenarios of what’s next in MicroProfile with Jakarta EE. By the end of this book, you'll have gained a clear understanding of Eclipse MicroProfile and its role in enterprise Java microservices. What you will learn * Understand why microservices are important in the digital economy * Analyze how MicroProfile addresses the need for enterprise Java microservices * Test and secure your applications with Eclipse MicroProfile * Get to grips with various MicroProfile capabilities such as OpenAPI and Typesafe REST Client * Explore reactive programming with MicroProfile Stream and Messaging candidate APIs * Discover and implement coding best practices using MicroProfile Who this book is for If you’re a Java developer who wants to create enterprise microservices, this book is for you. Familiarity with Java EE and the concept of microservices will help you get the most out of this book.
目录
About Packt
Why subscribe?
Contributors
About the authors
About the reviewers
Packt is searching for authors like you
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
Reviews
Section 1: MicroProfile in the Digital Economy
Introduction to Eclipse MicroProfile
Enterprise Java microservices
Forces that fuel the digital economy
Multi-speed IT
Introducing Eclipse MicroProfile
MicroProfile value proposition
Summary
Questions
Governance and Contributions
Current Eclipse MicroProfile governance
Sandbox approach to open contribution
Umbrella releases versus projects outside the umbrella
MicroProfile Starter
A quick tour of MicroProfile Starter
Summary
Questions
Section 2: MicroProfile's Current Capabilities
MicroProfile Config and Fault Tolerance
Understanding Eclipse MicroProfile Config
Reading configuration from the MicroProfile Config API
The Config object
The @ConfigProperty annotation
Providing sources of configuration
Default ConfigSources
Custom ConfigSources implementations
Using converters for high-level configuration
Built-in converters
Automatic converters
Custom converters
Understanding Eclipse MicroProfile Fault Tolerance
MicroProfile Fault Tolerance in action
The @Asynchronous policy
The @Retry policy
The @Fallback policy
The @Timeout policy
The @CircuitBreaker policy
The @Bulkhead policy
Tolerance with MicroProfile config
Summary
Questions
Further reading
MicroProfile Health Check and JWT Propagation
Technical requirements
Understanding health checks and how MicroProfile handles them
The Health Check protocol and wire format
The Health Check Java API
Integration with the cloud platform
Human operators
Changes in Health Check response messages
Using JSON Web Token Propagation in MicroProfile
Recommendations for interoperability
Required MP-JWT claims
The high-level description of the MP-JWT API
Sample code that uses MP-JWT
Injection of JsonWebToken information
Injection of JWT claim values
Configuring authentication of JWTs
Running the samples
Summary
Questions
MicroProfile Metrics and OpenTracing
MicroProfile Metrics
Metadata
Retrieving metrics from the server
Accessing specific scopes
Supplying application-specific metrics
More types of metric
Gauges
Meter
Histograms
Timers
Tagging
Server-wide tags
Per-metrics tags
Using Prometheus to retrieve metrics
New in MP-Metrics 2.0
Change for counters – introducing ConcurrentGauge
Tagging
Changes in data output format
MicroProfile OpenTracing
OpenTracing project
Configuration properties
Automatic instrumentation
JAX-RS
MicroProfile Rest Client
Explicit instrumentation
@Traced annotation
Tracer injection
Tracing with Jaeger
Summary
Questions
MicroProfile OpenAPI and Type-Safe REST Client
Introduction to MicroProfile OpenAPI and its capabilities
Configuration
Generating the OpenAPI document
MicroProfile OpenAPI annotations
Usage examples
Static OpenAPI files
Programming model
Using a filter for updates
Introduction to the MicroProfile REST Client and its capabilities
Defining the endpoint Interface
MicroProfile REST Client programmatic API usage
MicroProfile REST Client CDI usage
MicroProfile Config integration
Simplifying configuration keys
Dealing with client headers
Provider registration for advanced usage
Provider priority
Feature registration
Default providers
Exception mapping
Default exception mapping
Async support
Summary
Questions
Section 3: MicroProfile Implementations and Roadmap
MicroProfile Implementations, Quarkus, and Interoperability via the Conference Application
Current MicroProfile implementations
Thorntail
Open Liberty
Apache TomEE
Payara Micro
Hammock
KumuluzEE
Launcher
Helidon
Generating sample code for the current implementations
Other projects that implement MicroProfile
Quarkus
How to quark a generated MicroProfile project
MicroProfile interoperability – the conference application
Summary
Questions
Section 4: A Working MicroProfile Example
A Working Eclipse MicroProfile Code Sample
Technical requirements
Sample architecture of a multiservice MicroProfile application
Running the sample application
The Docker shell commands
The Svcs1 shell command
The Svcs2 shell command
The web shell command
Details of the sample application
The Config tab
The Health tab
The Metrics tab
The OpenTracing tab
The OpenAPI tab
The KeyCloak tab
The JWT tab
The RestClient tab
Summary
Questions
Further reading
Section 5: A Peek into the Future
Reactive Programming and Future Developments
Reactive programming work in Eclipse MicroProfile
An overview of Reactive Messaging
MicroProfile reactive messaging architecture
Message shapes
MicroProfile Reactive Streams operators
MicroProfile Context Propagation
MicroProfile reactive messaging examples
MicroProfile future developments
Projects outside the umbrella
Long Running Actions
Context Propagation
GraphQL
Differences between GraphQL and REST
GraphQL and databases
Projects in the sandbox
MicroProfile Boost
Eclipse MicroProfile and Jakarta EE
Summary
Questions
Further reading
Using MicroProfile in Multi-Cloud Environments
Using Eclipse MicroProfile for cloud-native application development
Microservices versus cloud native versus container native
What about 12-factor applications?
What about serverless and FaaS?
Cloud-native application development
Developing and running MicroProfile applications across clouds
Bare-metal machines versus VMs versus containers
Considerations when using MicroProfile in a hybrid cloud deployment
Challenges when using MicroProfile OpenTracing in a multi-cloud deployment
Considerations when using Eclipse MicroProfile in a service mesh
Retry
Fallback
Fault injection in the service mesh
Conclusion
Summary
Questions
Assessments
Chapter 1
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Chapter 7
Chapter 8
Chapter 9
Chapter 10
Other Books You May Enjoy
Leave a review - let other readers know what you think
- 非遗传承:非物质文化遗产保护研究(游珈)
- 转型与变革-大学生就业保障制度体系建设(马廷奇)
- 素描入门基础教程 石膏头像(王恒,洪涛)
- 园林景观设计SketchUp 2014从入门到精通-(含1DVD)(麓山文化)
- 盛世红妆(宓拉)
- 巅峰训练 五合一必刷题 高二(马德高)
- 提高篇-聪明宝宝学前600字(风车文化)
- 刑法评论-2016年 第1卷[总第29卷](赵秉志)
