Design Patterns for Cloud Native Applications: Patterns in Practice Using APIs, Data, Events, and Streams
- Length: 250 pages
- Edition: 1
- Language: English
- Publisher: O'Reilly Media
- Publication Date: 2021-06-15
- ISBN-10: 1492090719
- ISBN-13: 9781492090717
- Sales Rank: #1407630 (See Top 100 Books)
With the immense cost savings and scalability the cloud provides, the rationale for building cloud native applications is no longer in question. The real issue is how. With this practical guide, developers will gain experience building cloud native applications using APIs, data, events, and streams in both greenfield and brownfield development.
You’ll learn how to incrementally design, develop, and deploy large and effective cloud native applications that you can manage and maintain at scale with minimal cost, time, and effort. Authors Sriskandarajah Suhothayan and Kasun Indrasiri highlight use cases that effectively demonstrate the challenges you could encounter at each step.
- Explore the issues you’re likely to deal with when building highly scalable cloud native applications
- Learn design patterns for addressing these issues–and best practices to help you apply them
- Examine the tools and technologies essential for building cloud native systems
- Implement scalable cloud native applications that are manageable and maintainable
- Use patterns for building applications that are appropriate for specific use cases
Table of Contents
1. Introduction to Cloud Native
2. Communication Patterns
3. Connectivity and Composition Patterns
4. Data Management Patterns
5. Event-Driven Architecture Patterns
6. Stream-Processing Patterns
7. API Management and Consumption Patterns
8. Cloud Native Patterns in Practice
Preface Conventions Used in This Book O’Reilly Online Learning How to Contact Us Acknowledgments 1. Introduction to Cloud Native What Is Cloud Native? Designed as a Collection of Microservices Use Containerization and Container Orchestration What are containers? Why container orchestration? Kubernetes Serverless functions Virtual machines Automate the Development Life Cycle Dynamic Management Methodology for Building Cloud Native Apps Designing the Application Developing the Application Independent codebase Explicit dependencies Decoupled configurations Independent testing Containerization Connectivity, Compositions, and APIs Service-led interactions Interservice communication and compositions Exposing capabilities as managed APIs Automating the Development, Release, and Deployment Running in a Dynamic Environment Control Plane for Dynamic Management Observability and Monitoring Design Patterns for Building Cloud Native Apps Communication Patterns Connectivity and Composition Patterns Connectivity Compositions Data Management Patterns Event-Driven Architecture Patterns Stream-Processing Patterns API Management and Consumption Patterns Reference Architecture for Cloud Native Apps Summary 2. Communication Patterns Synchronous Messaging Patterns Request-Response Pattern How it works How it’s used in practice Considerations Related patterns Remote Procedure Calls Pattern How it works How it’s used in practice Considerations Related patterns Summary of Synchronous Messaging Patterns Asynchronous Messaging Patterns Single-Receiver Pattern How it works How it’s used in practice Considerations Related patterns Multiple-Receiver Pattern How it works How it’s used in practice Considerations Related patterns Asynchronous Request-Reply Pattern How it works How it’s used in practice Considerations Related patterns Summary of Asynchronous Messaging Patterns Service Definition Patterns Service Definitions in Synchronous Communication How it works How it’s used in practice Service definitions for RESTful services with OpenAPI and Consul Considerations Related patterns Service Definition in Asynchronous Communication How it works How it’s used in practice Schema definitions with Kafka Schema Registry Service definitions with AsyncAPI Considerations Related patterns Technologies to Implement Synchronous Messaging Patterns RESTful Services GraphQL WebSocket gRPC Summary of Synchronous Messaging Technologies Technologies to Implement Asynchronous Messaging Patterns AMQP Kafka NATS Testing Security Observability and Monitoring DevOps Summary 3. Connectivity and Composition Patterns Connectivity Patterns Service Connectivity Pattern How it works How it’s used in practice Considerations Related patterns Service Abstraction Pattern How it works How it’s used in practice Kubernetes services Considerations Related patterns Service Registry and Discovery Pattern How it works How it’s used in practice Service discovery in Kubernetes Considerations Related patterns Resilient Connectivity Pattern How it works How it’s used in practice Time-out Retry Deadlines Circuit breaker Fail-fast Considerations Related patterns Sidecar Pattern How it works How it’s used in practice Sidecar proxy Sidecar bridge Considerations Related patterns Service Mesh Pattern How it works How it’s used in practice Considerations Related patterns Sidecarless Service Mesh Pattern How it works How it’s used in practice Sidecarless gRPC services in Google Traffic Director Considerations Related patterns Technologies for Implementing Service Connectivity Patterns Summary of Connectivity Patterns Service Composition Patterns Service Orchestration Pattern How it works How it’s used in practice Considerations Related patterns Service Choreography Pattern How it works How it’s used in practice Considerations Related patterns Saga Pattern How it works How it’s used in practice Considerations Related patterns Technologies for Implementing Service Composition Patterns Summary of Service Composition Patterns Summary 4. Data Management Patterns Data Architecture Types and Forms of Data Data Stores Relational Databases NoSQL Databases Filesystem Storage Data Store Summary Data Management Centralized Data Management Decentralized Data Management Hybrid Data Management Data Management Summary Data Composition Patterns Data Service Pattern How it works How it’s used in practice Allow multiple microservices to access the same data Expose abstract legacy/proprietary data stores Considerations Related patterns Composite Data Services Pattern How it works How it’s used in practice Considerations Related patterns Client-Side Mashup Pattern How it works How it’s used in practice Present critical data with low latency Give a perception that the web page is loading faster Considerations Related patterns Summary of Data Composition Patterns Data Scaling Patterns Data Sharding Pattern How it works How it’s used in practice Scale beyond a single node Segregate data to improve data-retrieval time Geographically distribute data Considerations Related patterns Command and Query Responsibility Segregation Pattern How it works How it’s used in practice Use different domain models for command and query Distribute operations and reduce data contention Considerations Related patterns Summary of Data Scaling Patterns Performance Optimization Patterns Materialized View Pattern How it works How it’s used in practice Improve data-retrieval efficiency Provide access to nonsensitive data hosted in secure systems Considerations Related patterns Data Locality Pattern How it works How it’s used in practice Reduce latency when retrieving data Reduce bandwidth usage when retrieving data Considerations Related patterns Caching Pattern How it works How it’s used in practice Improve time to retrieve data Improve static content loading Reduce data store contention Prefetch data to improve data-retrieval time Achieve high availability by relaxing the data store dependency Cache more data than a single node can hold Considerations Related patterns Static Content Hosting Pattern How it works How it’s used in practice Provide faster static content delivery Reduce resource utilization on rendering services Considerations Related patterns Summary of Performance Optimization Patterns Reliability Patterns Transaction Pattern How it works How it’s used in practice Combine multiple operations as a single unit of work Combine operations across multiple systems Considerations Related pattern Summary of Transaction Reliability Pattern Security: Vault Key Pattern How it works How it’s used in practice Considerations Related pattern Summary of the Vault Key Pattern Technologies for Implementing Data Management Patterns Relational Database Management Systems Apache Cassandra Apache HBase MongoDB Redis Amazon DynamoDB Apache HDFS Amazon S3 Azure Cosmos DB Google Cloud Spanner Summary of Technologies Testing Security Observability and Monitoring DevOps Summary 5. Event-Driven Architecture Patterns Event-Driven Architecture Exactly Once Processing Message Broker Categories CloudEvents Event Schema Event-Delivery Patterns Producer-Consumer Pattern How it works How it’s used in practice Provide asynchronous event delivery Process each event by a single application Ensure event delivery Handle sudden bursts of events Share workload with fairness Considerations Related patterns Publisher-Subscriber Pattern How it works How it’s used in practice Broadcast events Deliver events with best effort Make sure all events are delivered to all subscribers Selectively deliver events to subscribers Share workloads Considerations Related pattern Fire and Forget Pattern How it works How it’s used in practice Deliver events with best effort Deliver events to systems that do not support subscription Considerations Related patterns Store and Forward Pattern How it works How it’s used in practice Deliver events to services that do not support subscription Ensure event delivery during service unavailability Considerations Related patterns Polling Pattern How it works How it’s used in practice Retrieve results from a long-running process that cannot notify of job completion Deliver events to a client that cannot initiate subscription or callbacks Considerations Related patterns Request Callback Pattern How it works WebSockets Webhooks How it’s used in practice Deliver response asynchronously Deliver updates continuously Considerations Related patterns Summary of Event-Delivery Patterns State Management Patterns Event Sourcing Pattern How it works How it’s used in practice Re-create application state Build different domain models Run temporal queries Replay events Considerations Related patterns Summary of State Management Pattern Orchestration Patterns Mediator Pattern How it works How it’s used in practice Sort and distribute events Split events into multiple subevents Ensure task execution order Considerations Related patterns Pipe and Filter Pattern How it works How it’s used in practice Build large-scale decoupled systems Seamlessly add and remove functionality Provide segregation of duties Considerations Related patterns Priority Queue Pattern How it works How it’s used in practice Process some events quicker than others Optimize resource utilization Considerations Related patterns Summary of Orchestration Patterns Technologies for Event-Driven Architecture Apache ActiveMQ RabbitMQ Amazon SQS Amazon SNS Azure Event Grid Azure Service Bus Queues Google Cloud Pub/Sub Summary of Message Broker Technologies Testing Security Observability and Monitoring DevOps Summary 6. Stream-Processing Patterns What Is a Stream? What Is Stream Processing? Streaming Data Processing Patterns Transformation Pattern How it works How it’s used in practice Message transformation Protocol switching Considerations Related patterns Filters and Thresholds Pattern How it works How it’s used in practice Filter events by category Scenario: Apply a threshold for alerting Considerations Related patterns Windowed Aggregation Pattern How it works How it’s used in practice Aggregate events over time Aggregate events over length Considerations Related patterns Stream Join Pattern How it works How it’s used in practice Scatter and gather Join various types of events Considerations Related patterns Temporal Event Ordering Pattern How it works How it’s used in practice Detect sequence of event occurrence Detect nonoccurrence of event Considerations Related patterns Machine Learner Pattern How it works Prebuilt machine learning models Online machine learning models How it’s used in practice Predict based on prebuilt machine learning models Continuous learning with data Considerations Related patterns Summary of Streaming Data Processing Patterns Scaling and Performance Optimization Patterns Sequential Convoy Pattern How it works How it’s used in practice Scale stream-processing applications Partition the stream processing Considerations Related patterns Buffered Event Ordering Pattern How it works How it’s used in practice Order events generated on distributed event sources Reorder events generated from the same event sources Considerations Related patterns Course Correction Pattern How it works How it’s used in practice Update results with new information Correct previous decisions Considerations Related patterns Watermark Pattern How it works How it’s used in practice Synchronize events generated from event sources that are time synchronized Synchronize events generated from nonsynchronized sources Considerations Related patterns Summary of Scaling and Performance Optimization Patterns Reliability Patterns Replay Pattern How it works How it’s used in practice Replay events when system state is not persisted Replay events when the system persists its state Considerations Related patterns Periodic Snapshot State Persistence Pattern How it works How it’s used in practice Considerations Related patterns Two-Node Failover Pattern How it works How it’s used in practice Considerations Related patterns Summary of Reliability Patterns Technologies Esper Siddhi ksqlDB Apache Spark Apache Flink Amazon Kinesis Azure Stream Analytics Google Dataflow Summary of Stream-Processing Technologies Testing Security Observability and Monitoring DevOps Summary 7. API Management and Consumption Patterns API Management Patterns API Gateway Pattern How it works API gateway API management plane API developer portal How it’s used in practice Considerations Related patterns API Microgateway Pattern How it works How it’s used in practice Considerations Related patterns Service Mesh Sidecar as an API Gateway Pattern How it works How it’s used in practice Considerations Related patterns Technologies for Implementing API Management Patterns Summary of API Management Patterns API Consumption Patterns Direct Frontend-to-Microservices Communication Pattern How it works How it’s used in practice Considerations Related patterns Frontends Consuming Services Through API Gateway Pattern How it works How it’s used in practice Considerations Related patterns Backend for Frontends Pattern How it works How it’s used in practice Considerations Related patterns Summary of API Consumption Patterns Summary 8. Cloud Native Patterns in Practice Building an Online Retail System Product Catalog Order Management Order Tracking and Prediction Product Recommendations Customer and Partner Management Building the High-Level Architecture Building External APIs Connecting Services Performing Data Management Using Event-Driven Architecture Using Stream Processing Implementing Dynamic Management in a Cloud Environment Summary Index
Donate to keep this site alive
How to download source code?
1. Go to: https://www.oreilly.com/
2. Search the book title: Design Patterns for Cloud Native Applications: Patterns in Practice Using APIs, Data, Events, and Streams
, sometime you may not get the results, please search the main title
3. Click the book title in the search results
3. Publisher resources
section, click Download Example Code
.
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.