Cloud Computing Pattern – Titelseite

To my little ballerina Alexandra and my grandsons Leonardo and Max! – Walter

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ….1

1.1 Essential Cloud Computing Properties . . . . . . . . . . . . . . . . . . . .  3
1.2 Essential Cloud Application Properties . . . . . . . . . . . . . . . . . . . . 5
1.3 Use of Patterns for Cloud Computing . . . . . . . . . . . . . . . . . . . . .  7
1.4 Pattern Format Used in This Book . . . . . . . . . . . . . . . . . . . . . . . . 9
1.5 Overview of This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11
1.6 How to Read This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13

2 Cloud Computing Fundamentals . . . . . . . . . . . . . . . . . . . . . . .. . . . 21
2.1 Overview of Fundamental Cloud Computing Patterns . . . .  . . . 22
2.2 Application Workloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  23
2.2.1 Static Workload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . .26
2.2.2 Periodic Workload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.2.3 Once-in-a-Lifetime Workload . . . . . . . . . . . . . . . . . . . . . 33
2.2.4 Unpredictable Workload . . . . . . . . . . . . . . . . . . . . . . . . . 36
2.2.5 Continuously Changing Workload . . . . . . . . . . . . . . . . . . 40
2.3 Cloud Service Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
2.3.1 Infrastructure as a Service (IaaS) . . . . . . . . . . . . . . . . . . . 45
2.3.2 Platform as a Service (PaaS) . . . . . . . . . . . . . . . . . . . . . . 49
2.3.3 Software as a Service (SaaS) . . . . . . . . . . . . . . . . . . . . . . 55
2.4 Cloud Deployment Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
2.4.1 Public Cloud . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
2.4.2 Private Cloud . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
2.4.3 Community Cloud . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
2.4.4 Hybrid Cloud . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

3 Cloud Offering Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
3.1 Overview of Cloud Offering Patterns . . . . . . . . . . . . . . . . . . . . . 80
3.2 Impact of Cloud Computing Properties on Offering Behavior 81
3.3 Cloud Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
3.3.1 Elastic Infrastructure . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
3.3.2 Elastic Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
3.3.3 Node-Based Availability . . . . . . . . . . . . . . . . . . . . . . . . . 95
3.3.4 Environment-Based Availability . . . . . . . . . . . . . . . . . . . 98
3.4 Processing Offerings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
3.4.1 Hypervisor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
3.4.2 Execution Environment . . . . . . . . . . . . . . . . . . . . . . . . . . 104
3.4.3 Map Reduce . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
3.5 Storage Offerings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
3.5.1 Block Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
3.5.2 Blob Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
3.5.3 Relational Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
3.5.4 Key-Value Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
3.5.5 Strict Consistency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
3.5.6 Eventual Consistency . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
3.6 Communication Offerings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
3.6.1 Virtual Networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
3.6.2 Message-Oriented Middleware . . . . . . . . . . . . . . . . . . . . 136
3.6.3 Exactly-Once Delivery . . . . . . . . . . . . . . . . . . . . . . . . . . 141
3.6.4 At-Least-Once Delivery . . . . . . . . . . . . . . . . . . . . . . . . . 144
3.6.5 Transaction-Based Delivery . . . . . . . . . . . . . . . . . . . . . . 146
3.6.6 Timeout-Based Delivery . . . . . . . . . . . . . . . . . . . . . . . . . 149

4 Cloud Application Architecture Patterns . . . . . . . . . . . . . . . . . 151
4.1 Overview of Cloud Application Architecture Patterns . . . . . 152
4.2 Fundamental Cloud Architectures . . . . . . . . . . . . . . . . . . . . . 155
4.2.1 Loose Coupling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
4.2.2 Distributed Application . . . . . . . . . . . . . . . . . . . . . . . . . . 160
4.3 Cloud Application Components . . . . . . . . . . . . . . . . . . . . . . . . . 166
4.3.1 Stateful Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
4.3.2 Stateless Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
4.3.3 User Interface Component . . . . . . . . . . . . . . . . . . . . . . . . 175
4.3.4 Processing Component . . . . . . . . . . . . . . . . . . . . . . . . . . 180
4.3.5 Batch Processing Component . . . . . . . . . . . . . . . . . . . . . 185
4.3.6 Data Access Component . . . . . . . . . . . . . . . . . . . . . . . . . 188
4.3.7 Data Abstractor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
4.3.8 Idempotent Processor . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
4.3.9 Transaction-Based Processor . . . . . . . . . . . . . . . . . . . . . . 201
4.3.10 Timeout-Based Message Processor . . . . . . . . . . . . . . . . 204
4.3.11 Multi-Component Image . . . . . . . . . . . . . . . . . . . . . . . . 206
4.4 Multi-Tenancy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
4.4.1 Shared Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
4.4.2 Tenant-Isolated Component . . . . . . . . . . . . . . . . . . . . . . . 214
4.4.3 Dedicated Component . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
4.5 Cloud Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
4.5.1 Restricted Data Access Component . . . . . . . . . . . . . . . . . 222
4.5.2 Message Mover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
4.5.3 Application Component Proxy . . . . . . . . . . . . . . . . . . . . . 228
4.5.4 Compliant Data Replication . . . . . . . . . . . . . . . . . . . . . . 231
4.5.5 Integration Provider . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234

5 Cloud Application Management Patterns . . . . . . . . . . . . . . . . . 239
5.1 Overview of Application Management Patterns . . . . . . .. . . . 240
5.2 Management Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
5.2.1 Provider Adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
5.2.2 Managed Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . 247
5.2.3 Elasticity Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
5.2.4 Elastic Load Balancer . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
5.2.5 Elastic Queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
5.2.6 Watchdog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
5.3 Management Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
5.3.1 Elasticity Management Process . . . . . . . . . . . . . . . . . . . . 267
5.3.2 Feature Flag Management Process . . . . . . . . . . . . . . . . . . 271
5.3.3 Update Transition Process . . . . . . . . . . . . . . . . . . . . . . . . 275
5.3.4 Standby Pooling Process . . . . . . . . . . . . . . . . . . . . . . . . . 279
5.3.5 Resiliency Management Process . . . . . . . . . . . . . . . . . . . 283

6 Composite Cloud Application Patterns . . . . . . . . . . . . . . . . . . 287
6.1 Overview of Cloud Application Patterns . . . . . . .. . . . . . . . 288
6.2 Native Cloud Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
6.2.1 Two-Tier Cloud Application . . . . . . . . . . . . . . . . . . . . . . 290
6.2.2 Three-Tier Cloud Application . . . . . . . . . . . . . . . . . . . . . 294
6.2.3 Content Distribution Network . . . . . . . . . . . . . . . . . . . . . 300
6.3 Hybrid Cloud Applications . . . . . . . . . . . . . .. . . . . . . . . . 303
6.3.1 Hybrid User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
6.3.2 Hybrid Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
6.3.3 Hybrid Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
6.3.4 Hybrid Backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
6.3.5 Hybrid Backend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
6.3.6 Hybrid Application Functions . . . . . . . . . . . . . . . . . . . . . 320
6.3.7 Hybrid Multimedia Web Application . . . . . . . . . . . . . . . 323
6.3.8 Hybrid Development Environment . . . . . . . . . . . . . . . . . . 326

7 Impact of Cloud Computing Properties . . . . . . . . . . . . . . . . . 331
7.1 Cloud Computing Properties on Levels of the Appl.- Stack  332
7.1.1 Downwards-Propagation of Requirements . . . . . . . . . . . . 334
7.1.2 Upwards-Propagation of Properties . . . . . . . . . . . . . . . . . 335
7.1.3 Meet-in-the-Middle for Cloud Properties & Requirements  335
7.2 Impact of Core Cloud Properties . . . . . . . . . . . . . . . . . . . . . . . . 336
7.2.1 Pay-Per-Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
7.2.2 Rapid Elasticity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
7.2.3 Homogenization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
7.2.4 Resource Sharing/Multi-Tenancy . . . . . . . . . . . . . . . . . . . 342
7.3 Impact of Other Common Cloud Offering Properties . . .. . . . 345
7.3.1 Environment-Based Availability . . . . . . . . . . . . . . . . . . . 346
7.3.2 Eventual Consistency . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
7.3.3 At-Least-Once Messaging . . . . . . . . . . . . . . . . . . . . . . . . 351

References . . . . . . . . . . . . . . . . . . . . . . . .  . . . . . . . . . . . . . . . . . . 353
Index . . . . . . . . . . . . . . . . . . . . . . . .  . . . . . . . . . . . . . . . . . . . . 363