Design Patterns for Cloud Native Applications: Patterns in Practice Using APIs, Data, Events, and Streams

Design Patterns for Cloud Native Applications: Patterns in Practice Using APIs, Data, Events, and Streams

Design Patterns for Cloud Native Applications: Patterns in Practice Using APIs, Data, Events, and Streams

Design Patterns for Cloud Native Applications: Patterns in Practice Using APIs, Data, Events, and Streams

Paperback

$65.99 
  • SHIP THIS ITEM
    Qualifies for Free Shipping
  • PICK UP IN STORE
    Check Availability at Nearby Stores

Related collections and offers


Overview

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 learn about the most commonly used design patterns for 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 Kasun Indrasiri and Sriskandarajah Suhothayan highlight use cases that effectively demonstrate the challenges you might encounter at each step.

  • Learn the fundamentals of cloud native applications
  • Explore key cloud native communication, connectivity, and composition patterns
  • Learn decentralized data management techniques
  • Use event-driven architecture to build distributed and scalable cloud native applications
  • Explore the most commonly used patterns for API management and consumption
  • Examine some of the tools and technologies you'll need for building cloud native systems

Product Details

ISBN-13: 9781492090717
Publisher: O'Reilly Media, Incorporated
Publication date: 06/15/2021
Pages: 311
Sales rank: 1,057,951
Product dimensions: 6.80(w) x 9.00(h) x 0.70(d)

About the Author

Kasun Indrasiri is a software architect with extensive experience in microservices, cloud native, and enterprise integration architecture. He's the author of gRPC: Up and Running (O'Reilly, 2019), Microservices for Enterprise (Apress, 2018), and Beginning WSO2 ESB (Apress, 2017). Kasun has spoken at several conferences, including O'Reilly Software Architecture Conference 2019 San Jose, GOTO Con 2019 Chicago, and WSO2 Conferences in San Francisco, London, and Barcelona. He also founded the Silicon Valley Microservices, APIs and Integration Meetup, which is one of the largest microservices meetups in the San Francisco Bay area.

Sriskandarajah (Suho) Suhothayan is a software architect with over nine years of experience in architecting and developing data processing platforms, and event driven systems. He was the founder of Siddhi - a cloud-native stream processor that can perform scalable data processing using microservices and the Kubernetes ecosystem. As a visiting lecturer Suho has conducted postgraduate courses on Big Data, Distributed Systems, and Data Science. He has presented at several conferences including O'Reilly’s Strata Data Conference 2017 London, Structure Data Conference 2016 San Francisco, BigData Days 2019 Moscow and at many WSO2 User Conferences in San Francisco, London, Barcelona, and Colombo.

Table of Contents

Preface ix

1 Introduction to Cloud Native 1

What Is Cloud Native? 1

Designed as a Collection of Microservices 2

Use Containerization and Container Orchestration 6

Automate the Development Life Cycle 10

Dynamic Management 12

Methodology for Building Cloud Native Apps 13

Designing the Application 13

Developing the Application 14

Connectivity, Compositions, and APIs 16

Automating the Development, Release, and Deployment 18

Running in a Dynamic Environment 18

Control Plane for Dynamic Management 19

Observability and Monitoring 19

Design Patterns for Building Cloud Native Apps 19

Communication Patterns 20

Connectivity and Composition Patterns 21

Data Management Patterns 22

Event-Driven Architecture Patterns 22

Stream-Processing Patterns 22

API Management and Consumption Patterns 23

Reference Architecture for Cloud Native Apps 23

Summary 25

2 Communication Patterns 27

Synchronous Messaging Patterns 28

Request-Response Pattern 28

Remote Procedure Calls Pattern 30

Summary of Synchronous Messaging Patterns 33

Asynchronous Messaging Patterns 34

Single-Receiver Pattern 34

Multiple-Receiver Pattern 36

Asynchronous Request-Reply Pattern 38

Summary of Asynchronous Messaging Patterns 40

Service Definition Patterns 41

Service Definitions in Synchronous Communication 41

Service Definition in Asynchronous Communication 43

Technologies to Implement Synchronous Messaging Patterns 46

RESTful Services 46

GraphQL 48

WebSocket 49

gRPC 50

Summary of Synchronous Messaging Technologies 51

Technologies to Implement Asynchronous Messaging Patterns 51

AMQP 51

Kafka 52

NATS 52

Testing 53

Security 54

Observability and Monitoring 54

DevOps 55

Summary 55

3 Connectivity and Composition Patterns 57

Connectivity Patterns 57

Service Connectivity Pattern 58

Service Abstraction Pattern 61

Service Registry and Discovery Pattern 64

Resilient Connectivity Pattern 68

Sidecar Pattern 73

Service Mesh Pattern 77

Sidecarless Service Mesh Pattern 81

Technologies for Implementing Service Connectivity Patterns 84

Summary of Connectivity Patterns 85

Service Composition Patterns 86

Service Orchestration Pattern 86

Service Choreography Pattern 89

Saga Pattern 92

Technologies for Implementing Service Composition Patterns 96

Summary of Service Composition Patterns 97

Summary 97

4 Data Management Patterns 99

Data Architecture 99

Types and Forms of Data 101

Data Stores 102

Relational Databases 102

NoSQL Databases 103

Filesystem Storage 106

Data Store Summary 106

Data Management 107

Centralized Data Management 107

Decentralized Data Management 107

Hybrid Data Management 108

Data Management Summary 109

Data Composition Patterns 110

Data Service Pattern 111

Composite Data Services Pattern 114

Client-Side Mashup Pattern 115

Summary of Data Composition Patterns 117

Data Scaling Patterns 118

Data Sharding Pattern 118

Command and Query Responsibility Segregation Pattern 124

Summary of Data Scaling Patterns 126

Performance Optimization Patterns 127

Materialized View Pattern 128

Data Locality Pattern 130

Caching Pattern 133

Static Content Hosting Pattern 139

Summary of Performance Optimization Patterns 141

Reliability Patterns 142

Transaction Pattern 143

Summary of Transaction Reliability Pattern 146

Security: Vault Key Pattern 146

How it works 146

Summary of the Vault Key Pattern 148

Technologies for Implementing Data Management Patterns 148

Relational Database Management Systems 148

Apache Cassandra 149

Apache HBase 150

MongoDB 150

Redis 151

Amazon DynamoDB 151

Apache HDFS 152

Amazon S3 152

Azure Cosmos DB 152

Google Cloud Spanner 153

Summary of Technologies 153

Testing 154

Security 155

Observability and Monitoring 156

DevOps 157

Summary 159

5 Event-Driven Architecture Patterns 161

Event-Driven Architecture 162

Exactly Once Processing 163

Message Broker Categories 163

CloudEvents 164

Event Schema 164

Event-Delivery Patterns 164

Producer-Consumer Pattern 165

Publisher-Subscriber Pattern 168

Fire and Forget Pattern 171

Store and Forward Pattern 173

Polling Pattern 174

Request Callback Pattern 176

Summary of Event-Delivery Patterns 179

State Management Patterns 181

Event Sourcing Pattern 181

Summary of State Management Pattern 185

Orchestration Patterns 185

Mediator Pattern 185

Pipe and Filter Pattern 188

Priority Queue Pattern 190

Summary of Orchestration Patterns 192

Technologies for Event-Driven Architecture 193

Apache ActiveMQ 193

RabbitMQ 194

Amazon SQS 194

Amazon SNS 195

Azure Event Grid 195

Azure Service Bus Queues 195

Google Cloud Pub/Sub 196

Summary of Message Broker Technologies 196

Testing 197

Security 199

Observability and Monitoring 199

DevOps 200

Summary 201

6 Stream-Processing Patterns 203

What Is a Stream? 203

What Is Stream Processing? 203

Streaming Data Processing Patterns 204

Transformation Pattern 204

Filters and Thresholds Pattern 207

Windowed Aggregation Pattern 209

Stream Join Pattern 214

Temporal Event Ordering Pattern 218

Machine Learner Pattern 221

Summary of Streaming Data Processing Patterns 224

Scaling and Performance Optimization Patterns 225

Sequential Convoy Pattern 225

Buffered Event Ordering Pattern 230

Course Correction Pattern 233

Watermark Pattern 235

Summary of Scaling and Performance Optimization Patterns 239

Reliability Patterns 240

Replay Pattern 240

Periodic Snapshot State Persistence Pattern 243

Two-Node Failover Pattern 248

Summary of Reliability Patterns 250

Technologies 251

Esper 251

Siddhi 252

ksqlDB 252

Apache Spark 252

Apache Flink 253

Amazon Kinesis 253

Azure Stream Analytics 253

Google Dataflow 254

Summary of Stream-Processing Technologies 254

Testing 255

Security 256

Observability and Monitoring 256

DevOps 257

Summary 258

7 API Management and Consumption Patterns 259

API Management Patterns 259

API Gateway Pattern 260

API Microgateway Pattern 265

Service Mesh Sidecar as an API Gateway Pattern 268

Technologies for Implementing API Management Patterns 269

Summary of API Management Patterns 270

API Consumption Patterns 270

Direct Frontend-to-Microservices Communication Pattern 270

Frontends Consuming Services Through API Gateway Pattern 272

Backend for Frontends Pattern 273

Summary of API Consumption Patterns 275

Summary 276

8 Cloud Native Patterns in Practice 277

Building an Online Retail System 277

Product Catalog 277

Order Management 278

Order Tracking and Prediction 278

Product Recommendations 278

Customer and Partner Management 279

Building the High-Level Architecture 279

Building External APIs 280

Connecting Services 282

Performing Data Management 283

Using Event-Driven Architecture 284

Using Stream Processing 286

Implementing Dynamic Management in a Cloud Environment 287

Summary 288

Index 289

From the B&N Reads Blog

Customer Reviews