Understanding Quarkus: Quarkus 1. x
معرفی کتاب «Understanding Quarkus: Quarkus 1. x» نوشتهٔ 江城(华文出版社) و Antonio Goncalves، منتشرشده توسط نشر agoncal fascicle در سال 2020. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است.
Microservices is an architectural style that structures an application as a collection of distributed services. Microservices are certainly appealing but there are many questions that should be asked prior to diving into this architectural style: How do I deal with an unreliable network in a distributed architecture? How do I test my services? How do I monitor them? How do I package and execute them? That’s when Quarkus comes into play. In this fascicle, you will learn Quarkus but also its ecosystem. You will discover Quarkus internals and how you can use it to build REST and reactive microservices, bind and process JSON or access datastores in a transactional way. With Cloud Native and GraalVM in mind, Quarkus makes packaging and orchestrating your microservices with Docker and Kubernetes easy. This fascicle has a good mix of theory and practical examples. It is the companion book of Practising Quarkus 2.x where you learn how to develop an entire microservice architecture. Understanding Quarkus : Quarkus Table of Contents Foreword About the Author Acknowledgments Introduction Where Does This Fascicle Come From? Who Is This Fascicle For? How Is This Fascicle Structured? Conventions The Sample Application Downloading and Running the Code Getting Help Contacting the Author Chapter 1. First Step with Quarkus Chapter 2. Understanding Quarkus 2.1. Understanding Microservices 2.1.1. Monolith 2.1.2. Microservices 2.1.3. Pros and Cons 2.2. Understanding Reactive 2.2.1. Reactive Manifesto 2.2.2. Reactive Systems 2.2.3. Reactive Streams 2.3. Understanding MicroProfile 2.3.1. Eclipse Foundation 2.3.2. SmallRye 2.3.3. MicroProfile Specifications CDI JAX-RS JSON-B JSON-P Common Annotations Configuration Fault Tolerance Health Metrics OpenAPI REST Client JWT OpenTracing 2.3.4. Standalone Releases Context Propagation Reactive Messaging Mutiny 2.4. Understanding Cloud Native Computing 2.4.1. Docker 2.4.2. Kubernetes 2.5. Understanding GraalVM 2.5.1. Architecture 2.5.2. A Brief History of GraalVM 2.5.3. Mandrel 2.6. Quarkus Overview 2.6.1. A Brief History of Quarkus 2.6.2. Architecture 2.6.3. Imperative and Reactive Programming 2.6.4. Augmentation 2.6.5. Extensions 2.7. Summary Chapter 3. Getting Started 3.1. Developing Your First Quarkus Application 3.2. Bootstrapping the Application 3.2.1. Web Interface 3.2.2. IntelliJ IDEA Plugin 3.2.3. Maven Plugin 3.2.4. Generating Some Code Generated Classes and Directory Structure Generated Maven POM 3.3. Developing the Application 3.3.1. The Artist Resource 3.3.2. The Artist Class 3.3.3. Running the Application 3.3.4. Live Reload 3.3.5. Configuring the Application 3.3.6. Testing the Application 3.3.7. Debugging the Application 3.4. Running the Application 3.4.1. Building an Executable JAR 3.4.2. Executing the Executable JAR 3.5. Going Native 3.5.1. Building a Native Executable 3.5.2. Executing the Native Executable 3.5.3. Testing the Native Executable 3.6. Containerising the Application 3.6.1. Building the Native Executable Image 3.6.2. Executing the Container Image 3.7. Summary Chapter 4. Core Quarkus 4.1. Context and Dependency Injection 4.1.1. Understanding Beans 4.1.2. Injecting Beans Injection Points Default Injection Injecting Qualified Beans Injecting Alternative Beans 4.1.3. Scopes 4.1.4. Events 4.1.5. Configuring ArC 4.2. Eclipse MicroProfile Configuration 4.2.1. Understanding Configuration 4.2.2. Configuring Data Injecting Configuration Programmatic Configuration Multiple Configuration Properties 4.2.3. YAML Support 4.2.4. Configuration Sources 4.2.5. Configuring Quarkus 4.3. Profiles 4.3.1. Configuring Profiles 4.4. Logging 4.4.1. Log Levels 4.4.2. Configuring Logging 4.4.3. Logging Categories 4.4.4. Logging Format 4.4.5. JSON Format 4.5. Application Initialisation and Termination 4.5.1. Entry Point 4.5.2. Application Life Cycle 4.6. Summary Chapter 5. Data, Transactions and ORM 5.1. Bean Validation 5.1.1. Understanding Constraints 5.1.2. Constraining Data Built-in Constraints Applying Built-in Constraints Constraining Attributes Constraining Methods 5.1.3. Validating Data Validating Beans Cascading Validation 5.1.4. Configuring Hibernate Validator 5.2. Java Persistence API 5.2.1. Understanding Object-Relational Mapping Relational Databases Entities 5.2.2. Mapping Entities Customising Mappings Advanced Mapping 5.2.3. Managing Entities Persisting an Entity Finding by Id Removing an Entity 5.2.4. Querying Entities Java Persistence Query Language Dynamic Queries 5.2.5. Configuring Hibernate ORM 5.3. Java Transaction API 5.3.1. Understanding Transactions 5.3.2. Declarative Transaction Management Exceptions and Transactions 5.3.3. Programmatic Transaction Management 5.3.4. Configuring Transactions 5.4. DataSource 5.4.1. Configuring DataSources 5.5. Hibernate ORM with Panache 5.5.1. Panache Entities Mapping Panache Entities Managing Panache Entities Querying Panache Entities State and Behaviour on Panache Entities 5.5.2. Panache Repositories 5.5.3. Transactions Using Panache Entities Using Panache Repositories 5.6. Summary Chapter 6. HTTP Microservices 6.1. Java API for RESTful Web Services 6.1.1. Understanding RESTful Web Services 6.1.2. Exposing RESTful Web Services HTTP Method Matching URI Definition and Binding URIs Extracting Parameters Consuming and Producing Content Types Returned Types 6.1.3. Invoking RESTful Web Services Bootstrapping the Client Targets and Invocations 6.1.4. Configuring RESTEasy 6.2. Eclipse MicroProfile OpenAPI 6.2.1. Understanding OpenAPI v3 Specification 6.2.2. Exposing OpenAPI Contracts Customising OpenAPI Contracts Advanced Customisation 6.2.3. Swagger UI 6.2.4. Configuring SmallRye OpenAPI 6.3. JSON Binding 6.3.1. Understanding Binding 6.3.2. Binding POJOs Default Binding Customising Binding Advanced Customisation 6.3.3. Serialising and Deserialising Programmatic Serialisation and Deserialisation Automatic Serialisation and Deserialisation 6.4. JSON Processing 6.4.1. Understanding Processing 6.4.2. Building JSON 6.4.3. Reading and Writing JSON 6.4.4. Streaming JSON 6.5. Summary Chapter 7. Communication and Fault Tolerance 7.1. CORS 7.1.1. Understanding CORS 7.1.2. Configuring CORS 7.2. Eclipse MicroProfile REST Client 7.2.1. Understanding RESTful Web Services Invocation 7.2.2. Invoking RESTful Web Services Client Proxies Programmatic Invocation Declarative Invocation 7.2.3. Configuring RestEasy Client Microprofile 7.3. Eclipse MicroProfile Fault Tolerance 7.3.1. Understanding Fault Tolerance 7.3.2. Falling Back 7.3.3. Timing Out 7.3.4. Circuit Breaker 7.4. Summary Chapter 8. Event-Driven Microservices 8.1. Reactive Programming 8.1.1. Uni and Multi 8.1.2. Events 8.2. Reactive Messaging 8.2.1. Understanding Messaging Synchronous Programming Asynchronous Messages Broker Architecture 8.2.2. Sending Messages 8.2.3. Receiving Messages 8.2.4. Connectors 8.2.5. Configuring Reactive Messages 8.3. Summary Chapter 9. Observability 9.1. Eclipse MicroProfile Health 9.1.1. Understanding Health Checks 9.1.2. Checks Liveness Checks Readiness Checks Built-In Quarkus Checks 9.1.3. Constructing a Response 9.1.4. Visualising Health Checks with Health-UI 9.1.5. Configuring SmallRye Health 9.2. Eclipse MicroProfile Metrics 9.2.1. Understanding Measures 9.2.2. Metrics Base Metrics Vendor Metrics Application Metrics 9.2.3. Metrics Format 9.2.4. Visualising Metrics with Prometheus 9.2.5. Configuring SmallRye Metrics 9.3. Summary Chapter 10. Cloud Native 10.1. Packaging Quarkus Applications 10.1.1. JVM Mode JAR Fast-JAR Uber-JAR 10.1.2. Native Mode Native Executable Linux Native Executable 10.1.3. Performances Build and Execute Executable Size Time to First Request Pros and Cons 10.1.4. Configuring Packaging 10.2. Docker 10.2.1. Dockerfiles JVM Mode Linux Native Executable 10.2.2. Building Docker Images Building Manually with Docker Building with the Docker Extension Building with the Jib Extension 10.2.3. Running Docker Images 10.2.4. Pushing Docker Images 10.2.5. Configuring Containers 10.3. Kubernetes 10.3.1. Kubernetes Manifest Files 10.3.2. Building Kubernetes Manifest Files Building with the Kubernetes Extension Building with the Minikube Extension 10.3.3. Deploying to a Minikube Cluster Recap 10.3.4. Configuring Kubernetes 10.4. Summary Chapter 11. Tests 11.1. Quarkus Tests 11.1.1. JUnit 5 Test Class Fixtures Test Methods JUnit Assertions 11.1.2. JVM Mode Tests 11.1.3. Native Mode Tests 11.1.4. Transactional Tests 11.1.5. Configuring Quarkus Tests 11.2. Testing Frameworks 11.2.1. REST Assured 11.2.2. Hamcrest 11.2.3. Testing Resources TestContainers Quarkus Test Resource 11.3. Mocking 11.4. Quarkus Test Profiles 11.5. Summary Chapter 12. Putting It All Together 12.1. Developing the REST ISBN Number Microservice 12.1.1. Bootstrapping the ISBN Number Microservice 12.1.2. Maven Dependencies 12.1.3. Directories and Files 12.1.4. ISBN Number REST Endpoint 12.1.5. Injecting Configuration Value 12.1.6. Customising the JSON Output 12.1.7. OpenAPI Customising the OpenAPI Contract of the Number REST Endpoint Customising the IsbnNumbers POJO Customising the OpenAPI Contract of the Application The Customised OpenAPI Contract Swagger UI 12.1.8. Adding Liveness Health Check 12.1.9. Running the ISBN Number Microservice Live Reload Configuring Quarkus Listening Port 12.1.10. Testing the ISBN Number Microservice 12.2. Developing the REST Book Microservice 12.2.1. Bootstrapping the Book Microservice 12.2.2. Maven Dependencies 12.2.3. Directories and Files 12.2.4. Book REST Endpoint 12.2.5. Book Microservice Invoking the Number Microservice 12.2.6. Falling Back 12.2.7. Adding Metrics 12.2.8. Running the Book Microservice 12.2.9. Testing the Book Microservice 12.3. Summary Chapter 13. Summary Appendix A: Setting up the Development Environment on macOS A.1. Homebrew A.1.1. A Brief History of Homebrew A.1.2. Installing Homebrew on macOS A.1.3. Checking for Homebrew Installation A.1.4. Some Homebrew Commands A.2. Java 11 A.2.1. Architecture A.2.2. A Brief History of Java A.2.3. Installing the JDK on macOS A.2.4. Checking for Java Installation A.3. GraalVM 20.2.0 A.3.1. Installing GraalVM on macOS A.3.2. Installing the Native Image Generator A.3.3. Checking for GraalVM Installation A.4. Maven 3.6.x A.4.1. A Brief History of Maven A.4.2. Project Descriptor A.4.3. Managing Artifacts A.4.4. Installing Maven on macOS A.4.5. Checking for Maven Installation A.4.6. Some Maven Commands A.5. cURL 7.x A.5.1. A Brief History of cURL A.5.2. Installing cURL on macOS A.5.3. Checking for cURL Installation A.5.4. Some cURL Commands A.5.5. Formatting the cURL JSON Output with JQ A.6. Docker A.6.1. A Brief History of Docker A.6.2. Installing Docker on macOS A.6.3. Checking for Docker Installation A.6.4. Building, Running, Pushing and Pulling Images Remote Docker Repository Dockerfile Building the Docker Image Running the Docker Image Pushing to a Docker Registry Pulling from a Docker Registry A.6.5. Some Docker Commands A.7. VirtualBox A.7.1. A Brief History of VirtualBox A.7.2. Installing VirtualBox on macOS A.7.3. Checking for VirtualBox Installation A.8. Kubernetes A.8.1. A Brief History of Kubernetes A.8.2. Different Kubernetes Flavours A.8.3. Installing Minikube on macOS Installing Kubectl Installing Minikube A.8.4. Checking for Kubernetes Installation A.8.5. Deploying a Docker Image to a Kubernetes Cluster Starting the Kubernetes Cluster Creating a Deployment Creating a Service Running the Docker Image Cleaning Up A.8.6. Kubernetes Manifest Files A.8.7. Some Kubernetes Commands A.9. Kafka A.9.1. A Brief History of Kafka A.9.2. Installing Kafka on macOS A.9.3. Checking for Kafka Installation A.9.4. Publishing and Receiving Events Starting Kafka Creating Topics Publishing Events Receiving Events Cleaning Up Stopping Kafka A.9.5. Some Kafka Commands A.10. Git A.10.1. A Brief History of Git A.10.2. Installing Git on macOS A.10.3. Checking for Git Installation A.10.4. Cloning Repository Appendix B: Quarkus Versions B.1. Quarkus 1.9 (October 2020) B.2. Quarkus 1.8 (September 2020) B.3. Quarkus 1.7 (August 2020) B.4. Quarkus 1.6 (July 2020) B.5. Quarkus 1.5 (June 2020) B.6. Quarkus 1.4 (April 2020) B.7. Quarkus 1.3 (March 2020) B.8. Quarkus 1.2 (January 2020) B.9. Quarkus 1.1 (December 2019) B.10. Quarkus 1.0 (November 2019) B.11. Quarkus 0.0.1 (November 2018) Appendix C: Eclipse MicroProfile Specification Versions C.1. MicroProfile 3.3 (February 2020) C.2. MicroProfile 3.2 (November 2019) C.3. MicroProfile 3.1 (October 2019) C.4. MicroProfile 3.0 (June 2019) C.5. MicroProfile 2.2 (February 2019) C.6. MicroProfile 2.1 (October 2018) C.7. MicroProfile 2.0.1 (July 2018) C.8. MicroProfile 2.0 (June 2018) C.9. MicroProfile 1.4 (June 2018) C.10. MicroProfile 1.3 (January 2018) C.11. MicroProfile 1.2 (September 2017) C.12. MicroProfile 1.1 (August 2017) C.13. MicroProfile 1.0 Appendix D: References Appendix E: Fascicles by the Same Author E.1. Understanding Bean Validation 2.0 E.2. Understanding JPA 2.2 E.3. Understanding Quarkus E.4. Practising Quarkus Appendix F: Printed Back Cover
دانلود کتاب Understanding Quarkus: Quarkus 1. x