
Zen of Cloud : Learning Cloud Computing by Examples on Microsoft Azure
[BOOK DESCRIPTION]
Zen of Cloudprovides comprehensive coverage of the essential theories behind cloud computing and the Windows Azure cloud platform. Sharing the author's insights gained while working at Microsoft's headquarters, it presents nearly 70 end-to-end examples with step-by-step guidance on implementing typical cloud-based scenarios. The book is organized into four sections: cloud service fundamentals, cloud solutions, devices and cloud, and system integration and project management. Each chapter contains detailed exercises that provide readers with the opportunity to develop valuable hands-on skills in cloud service development. * Explains how to prepare for Microsoft Azure development and how to use Microsoft Azure Management Portal * Provides best practices for designing cloud-based applications * Includes online access to updated examples and answers to the exercises Beginners can use this book as a guide in their journey through cloud computing. Experienced cloud developers will benefit from the specific examples and detailed guidance on implementing typical cloud-based scenarios.The examples cover a range of application types and technologies with varying levels of difficulties. Supplying comprehensive coverage of the Windows Azure cloud platform, the book provides a practical understanding and powerful tips that readers can immediately apply to their own work-making it ideal for cloud system developers, architects, and IT professionals. Organized into easily digestible sessions, it is also ideal for use in instructional settings.
[TABLE OF CONTENTS]
Foreword xiii
Section I Cloud Computing Fundamentals
1 Overview of Cloud Computing 3 (18)
1.1 History 3 (2)
1.2 Essence of Cloud Computing 5 (6)
1.2.1 Elasticity 6 (1)
1.2.1.1 On and Off Mode 7 (1)
1.2.1.2 Rapid-Growth Mode 8 (1)
1.2.2 Availability 8 (1)
1.2.2.1 Fault Domain 9 (1)
1.2.2.2 Update Domain 10 (1)
1.2.3 Scalability 10 (1)
1.3 Microsoft Azure Overview 11 (5)
1.3.1 IaaS (Infrastructure as a Service) 11 (1)
1.3.2 PaaS (Platform as a Service) 12 (1)
1.3.3 SaaS (Software as a Service) 13 (2)
1.3.4 Cost Calculation 15 (1)
1.4 Preparing the Development Environment 16 (1)
for Microsoft Azure
1.4.1 Subscribe to Microsoft Azure 16 (1)
1.4.2 Install Software Development Kit 16 (1)
1.5 Introduction of Microsoft Azure 16 (3)
Management Portal
1.5.1 Sign In 17 (1)
1.5.2 Page Layout 17 (2)
1.6 Summary 19 (2)
2 Building Websites on the Cloud 21 (36)
2.1 Microsoft Azure Websites 21 (4)
2.2 Website Deployment and Upgrade 25 (7)
2.3 Integration with Source Control 32 (5)
Systems
2.4 Scaling of Websites 37 (3)
2.4.1 Vertical Scaling 37 (2)
2.4.2 Horizontal Scaling 39 (1)
2.4.3 Autoscaling 39 (1)
2.5 Migrating Existing ASP.NET Websites 40 (1)
2.5.1 Azure Websites Runtime Environment 40 (1)
2.5.2 Data Storage 41 (1)
2.5.3 Session States 41 (1)
2.6 Website Gallery 41 (1)
2.7 Website Configuration 42 (7)
2.8 Website Diagnostics and Monitoring 49 (6)
2.8.1 Website Diagnostics 49 (3)
2.8.2 Website Monitoring 52 (2)
2.8.3 Custom Domain Names 54 (1)
2.9 Summary 55 (2)
3 Cloud Service Fundamentals 57 (28)
3.1 Microsoft Azure Cloud Services 57 (4)
3.2 Cloud Services and Roles 61 (3)
3.2.1 Role 63 (1)
3.2.2 Cloud Service 63 (1)
3.3 Basic Steps of Cloud Service 64 (5)
Deployment
3.4 Cloud Service Deployments and Upgrades 69 (5)
3.4.1 Incremental Updates (Update 70 (1)
Domain Walk)
3.4.2 Simultaneous Updates 70 (1)
3.4.3 Multiple Deployment Environments 70 (4)
3.5 Instances and Load Balancing 74 (5)
3.5.1 Instances 75 (1)
3.5.2 Load Balancing 76 (3)
3.6 Configuration File and Definition File 79 (5)
3.6.1 Cloud Service Definition File 80 (1)
(.csdef)
3.6.2 Cloud Service Configuration File 81 (3)
(.cscfg)
3.7 Summary 84 (1)
4 Advanced Cloud Service 85 (42)
4.1 Endpoint Types 85 (3)
4.1.1 Input Endpoint 85 (1)
4.1.2 Internal Endpoint 85 (1)
4.1.3 InstanceInput Endpoint 86 (2)
4.2 Worker Role 88 (8)
4.2.1 Worker Role Application Scenarios 90 (6)
4.3 Inter-Role Communications 96 (4)
4.3.1 Options for Inter-Role 96 (4)
Communication
4.4 Role Lifecycle 100 (2)
4.4.1 Process of Deploying and 100 (1)
Launching a Role Instance
4.4.2 Role Instance Statuses 101 (1)
4.5 Startup Tasks 102 (7)
4.5.1 Defining Startup Tasks 102 (1)
4.5.2 Startup Task Properties 103 (6)
4.6 Diagnostics and Debug 109 (14)
4.6.1 Debugging Locally 109 (1)
4.6.2 Microsoft Azure Diagnostics 109 (5)
4.6.3 IntelliTrace 114 (5)
4.6.4 Monitoring Cloud Service 119 (4)
4.7 Developer Community 123 (2)
4.8 Summary 125 (2)
5 Data storage: Relational Database 127 (36)
5.1 Microsoft Azure Data Storage Solutions 127 (2)
5.2 SQL Database Overview 129 (10)
5.2.1 Differences between an SQL 129 (10)
Database and an SQL Server
5.3 SQL Database Management and 139 (10)
Optimization
5.3.1 SQL Server Management Studio 139 (5)
5.3.2 Microsoft SQL Server Data Tools 144 (1)
5.3.3 Dynamic Management Views 145 (1)
5.3.4 Query Optimization 146 (3)
5.4 Data Sync and Migration 149 (8)
5.4.1 Data-Tier Application 149 (3)
5.4.2 Data Sync 152 (5)
5.5 Periodically Backup Your SQL Databases 157 (2)
5.6 Use MySQL Database 159 (2)
5.6.1 Microsoft Azure Store 159 (1)
5.6.2 Purchasing MySQL Service 160 (1)
5.6.3 Other Means to Run MySQL 161 (1)
5.7 Summary 161 (2)
6 Data Storage: Storage Services 163 (50)
6.1 Local Storage 163 (1)
6.2 Overview of Microsoft Azure Storage 164 (6)
Services
6.2.1 Microsoft Azure Storage Account 165 (2)
6.2.2 Provisioning a Windows Storage 167 (1)
Account
6.2.3 Storage Account Access Keys 168 (2)
6.3 Using BLOB Storage 170 (20)
6.3.1 BLOB Storage Overview 170 (14)
6.3.2 Block BLOB and Page BLOB 184 (3)
6.3.3 ETag and Snapshots 187 (1)
6.3.4 Rest API 187 (1)
6.3.5 Shared Access Signature and 188 (2)
Stored Access Policies
6.3.6 BLOB Update, Copy, and Lease 190 (1)
6.3.7 Error Handling 190 (1)
6.4 Using Table Storage 190 (16)
6.4.1 Table Storage Overview 190 (1)
6.4.2 Optimizing Data Partition 191 (13)
6.4.3 Query Table Data 204 (1)
6.4.4 Other Operations 204 (1)
6.4.5 Batch Operations 205 (1)
6.4.6 Dynamic Table Entities 205 (1)
6.4.7 Shared Access Signatures 206 (1)
6.5 Use Queue Storage 206 (3)
6.5.1 Queue Storage Overview 206 (1)
6.5.2 Programmatically Operate Queues 207 (2)
6.6 Monitor Storage Accounts 209 (2)
6.6.1 Configure Storage Service 210 (1)
Monitoring
6.6.2 Cost of Service Monitoring 211 (1)
6.7 Summary 211 (2)
7 Virtual Machines and Virtual Networks 213 (34)
7.1 Microsoft Azure IaaS 213 (7)
7.2 Disk Images and Virtual Disks 220 (8)
7.3 Virtual Machine Communications 228 (6)
7.3.1 Virtual Machine Endpoints 228 (2)
7.3.2 Virtual Machines under the Same 230 (4)
Cloud Service
7.4 Virtual Networks 234 (9)
7.4.1 Virtual Networks Overview 235 (2)
7.4.2 Point-to-Site Virtual Network 237 (6)
7.4.3 Site-to-Site Virtual Network 243 (1)
7.4.4 ExpressRoute 243 (1)
7.5 Summary 243 (4)
Section II Cloud Solutions
8 Cloud Solution Architecture 247 (54)
8.1 Client/Server 247 (7)
8.1.1 Characteristics of Client/Server 247 (1)
Architecture
8.1.1.1 Benefits 247 (2)
8.1.1.2 Shortcomings 249 (1)
8.1.2 Client/Server Architecture on 249 (2)
Cloud
8.1.3 Multitenant System Design 251 (2)
8.1.4 Migrating Client/Server Systems 253 (1)
to Cloud
8.1.5 Client/Server Systems on 253 (1)
Microsoft Azure
8.1.6 Mobile Clients 254 (1)
8.2 Browser/Server 254 (15)
8.2.1 Characteristics of Browser/Server 255 (1)
Architecture
8.2.2 Browser/Server Architecture on 256
Cloud
8.2.3 Difficulties of Adapting an 264 (3)
Existing Single-Tenant Browser/Server
Application for Multitenancy
8.2.4 Host Single-Tenant Systems on 267 (2)
Microsoft Azure for Multiple Tenants
8.3 n-Tiered Architecture 269 (15)
8.3.1 Characteristics of n-Tiered 269 (1)
Architecture
8.3.2 n-Tier, MVC, and MVVM 270 (3)
8.3.3 Microsoft Azure Service Bus Queue 273 (4)
8.3.4 Implementing n-Tiered Services on 277 (7)
Microsoft Azure
8.4 Distributed System 284 (15)
8.4.1 Message-Based Connections 287 (4)
8.4.2 Relayed Connections 291 (8)
8.5 Summary 299 (2)
9 High-Availability Design 301 (18)
9.1 Availability 301 (1)
9.2 High-Availability Techniques 302 (6)
9.2.1 Redundancy 303 (1)
9.2.2 Load Balancing 303 (1)
9.2.3 Failover 303 (5)
9.3 Load Balancing and Health Probe 308 (2)
9.4 Competing Consumers 310 (2)
9.4.1 Loose Coupling 310 (1)
9.4.2 Dynamic Load Balancing 311 (1)
9.4.3 Dynamic Scaling 311 (1)
9.4.4 Failover 311 (1)
9.5 Case Study: High-Availability Service 312 (5)
Bus Entities
9.5.1 Background 315 (1)
9.5.2 Segmented Message Pipelines 316 (1)
9.5.3 Paired Namespaces 317 (1)
9.5.4 Conclusion 317 (1)
9.6 Summary 317 (2)
10 High-Reliability Design 319 (14)
10.1 Reliability, Availability, and 319 (2)
Maintainability
10.1.1 Reliability 319 (1)
10.1.2 Maintainability 320 (1)
10.1.3 Relationships between 320 (1)
Availability, Reliability, and
Maintainability
10.2 Embracing Failures 321 (1)
10.2.1 Failures in Operation 321 (1)
10.2.2 Failures in State Management 321 (1)
10.2.3 Failures in System Design and 322 (1)
Implementation
10.3 Transient Errors 322 (4)
10.3.1 Transient Fault Handling 323 (3)
Application Block
10.4 Design for Reliability 326 (5)
10.4.1 Single Point of Failure 327 (1)
10.4.2 Writing Reliable Code 328 (3)
10.5 Summary 331 (2)
11 High-Performance Design 333 (18)
11.1 Microsoft Azure In-Role Cache 333 (12)
11.1.1 Overview 334 (1)
11.1.2 Deployment Options 334 (4)
11.1.3 Cache Features 338 (1)
11.1.4 Concurrency Modes 339 (2)
11.1.5 Local Cache 341 (1)
11.1.6 Session State 341 (4)
11.2 Microsoft Azure Cache Service 345 (3)
11.2.1 Overview 346 (1)
11.2.2 Cache Service versus In-Role 346 (1)
Cache
11.2.3 Managing Cache Clusters on 346 (1)
Microsoft Azure Management Portal
11.2.4 Memcache Support 347 (1)
11.2.5 Future of Azure Cache 348 (1)
11.3 Microsoft Azure CDN 348 (1)
11.4 Asynchronous Operations and Parallel 349 (1)
Operations
11.5 Summary 350 (1)
12 Claim-Based Architecture 351 (26)
12.1 Claim-Based Authentication and 352 (4)
Authorization
12.1.1 Basic Authentication and 353 (1)
Authorization Process
12.1.2 Authentication and WIF 354 (1)
12.1.3 Authentication Broker 354 (2)
12.2 Introduction to Microsoft Azure AD 356 (16)
12.2.1 Managing Microsoft Azure Tenants 357 (10)
and Users
12.2.2 Graph API 367 (5)
12.3 Microsoft Azure AD New Features 372 (1)
12.3.1 Azure Authentication Library 372 (1)
12.3.2 Microsoft Azure Active Directory 372 (1)
Premium
12.4 Summary 373 (4)
Section III Devices and Cloud
13 Mobile Service 377 (20)
13.1 Mobile Service Overview 377 (9)
13.2 Push Notifications 386 (7)
13.2.1 Push Notification Overview 386 (7)
13.3 Scheduler and API 393 (3)
13.4 Summary 396 (1)
14 Internet of Things 397 (22)
14.1 IoT Overview 397 (2)
14.1.1 Radio Frequency Identification 398 (1)
14.1.2 Artificial Intelligence Equipment 398 (1)
14.1.3 Wearable Devices 398 (1)
14.1.4 Wireless Sensor Network 399 (1)
14.2 Devices and Cloud 399 (2)
14.2.1 Importance of Devices for Cloud 399 (1)
14.2.2 Importance of Cloud for Devices 400 (1)
14.3 Challenges of IoT 401 (1)
14.4 NET Micro Framework 402 (14)
14.4.1 NET Micro Framework Overview 402 (3)
14.4.2 NET Gadgeteer Overview 405 (4)
14.4.3 Device Integration Sample 409 (7)
Scenario
14.5 Summary 416 (3)
Section IV System Integration and Project
Management
15 Message-Based System Integration 419 (26)
15.1 System Integration 419 (3)
15.1.1 Integration by Data 420 (1)
15.1.2 Shared Business Functions 420 (1)
15.1.3 Enterprise Service Bus 420 (2)
15.2 Message-Based System Integration 422 (11)
15.2.1 Content-Based Routing 422 (1)
15.2.2 Priority Queue 423 (3)
15.2.3 Request/Response 426 (1)
15.2.4 Dead Letter Queue 427 (3)
15.2.5 Event-Driven Consumer 430 (3)
15.3 Advanced Message Queuing Protocol 433 (5)
15.3.1 AMQP Overview 434 (2)
15.3.2 AMQP Adoption 436 (2)
15.4 Advantages of Message-Based 438 (6)
Integration
15.4.1 Loose Coupling 438 (3)
15.4.2 Dynamic Extension 441 (1)
15.4.3 Asynchronous Communication 441 (1)
15.4.4 Centralized Management 441 (3)
15.5 Summary 444 (1)
16 Source Control and Tests with Visual 445 (22)
Studio Online
16.1 Create a Visual Studio Online Account 446 (1)
16.2 Source Control with Visual Studio 446 (6)
Online
16.3 Create and Use Unit Tests 452 (7)
16.4 Create and Use Load Tests 459 (6)
16.5 Summary 465 (2)
17 Scripting and Automation 467 (14)
17.1 Microsoft Azure PowerShell Cmdlets 467 (5)
17.1.1 Preparing a Microsoft Azure 467 (2)
PowerShell Cmdlets Environment
17.1.2 Managing Virtual Machines 469 (3)
17.1.3 Managing Cloud Services 472 (1)
17.1.4 Managing Microsoft Azure Websites 472 (1)
17.1.5 Other Cmdlets 472 (1)
17.2 Microsoft Azure Cross-Platform 472 (5)
Command Line Tools
17.2.1 Installing the Command Line Tools 474 (2)
17.2.2 Getting Started with the Command 476 (1)
Line Tools
17.3 Microsoft Azure Management API 477 (3)
17.4 Summary 480 (1)
18 Azure and DevOps 481 (8)
18.1 DevOps Overview 481 (2)
18.1.1 Everything Is Code 481 (1)
18.1.2 Everyone Is a Developer 482 (1)
18.1.3 Every Day Is Release Day 482 (1)
18.2 VM Agent and VM Extensions 483 (3)
18.2.1 VM Agent 483 (1)
18.2.2 VM Extensions 483 (1)
18.2.3 Custom Script Extension 484 (1)
18.2.4 DSC, Puppet, and Chef 485 (1)
18.3 New Portal 486 (1)
18.4 Zen of Cloud 487 (2)
Bibliography 489 (2)
Index 491