You are previewing Windows Azure Platform.
O'Reilly logo
Windows Azure Platform

Book Description

Learn to build flawless cloud services using the four components of the Azure Services Platform. Best practices and techniques for using Windows Azure, .NET Services, SQL Services, and Live Services are supported by a thorough overview of architectural concepts to ensure you make use of the platform to its full potential.

Table of Contents

  1. Copyright
  2. About the Author
  3. About the Technical Reviewer
  4. Acknowledgments
  5. 1. Introducing Cloud Services
    1. 1.1. Defining Our Terms
    2. 1.2. Evolution of Cloud Services
      1. 1.2.1. Planning
      2. 1.2.2. Developing
      3. 1.2.3. Stabilizing
      4. 1.2.4. Deploying
      5. 1.2.5. Operating
    3. 1.3. Modeling Cloud Service Offerings
      1. 1.3.1. Consumer Services Layer
      2. 1.3.2. Enterprise Services Layer
      3. 1.3.3. Middleware Layer
      4. 1.3.4. Platform Layer
    4. 1.4. Shifting to the Cloud Paradigm
    5. 1.5. Understanding the Cloud Services Ecosystem
      1. 1.5.1. Service Providers
      2. 1.5.2. Software Vendors
      3. 1.5.3. Independent Software Vendors
      4. 1.5.4. Enablers
      5. 1.5.5. Businesses
    6. 1.6. Cloud Services Drivers and Barriers
      1. 1.6.1. Security
      2. 1.6.2. Total Cost of Ownership
      3. 1.6.3. Control
      4. 1.6.4. Culture
      5. 1.6.5. Competition
      6. 1.6.6. Time to Market
      7. 1.6.7. Reliability
      8. 1.6.8. Service Level Agreement
    7. 1.7. Understanding Cloud Architecture
    8. 1.8. Getting to Know Some Cloud Services Vendors
      1. 1.8.1. Amazon Web Services
        1. 1.8.1.1. Amazon EC2
        2. 1.8.1.2. Amazon SimpleDB
        3. 1.8.1.3. Amazon Simple Storage Service (S3)
        4. 1.8.1.4. Amazon CloudFront
        5. 1.8.1.5. Amazon Simple Queue Service
        6. 1.8.1.6. Amazon Elastic MapReduce
      2. 1.8.2. Google
        1. 1.8.2.1. Google Apps
        2. 1.8.2.2. Google App Engine
      3. 1.8.3. SalesForce.com and Force.com
      4. 1.8.4. GoGrid
      5. 1.8.5. 3Tera
      6. 1.8.6. Microsoft
    9. 1.9. Summary
    10. 1.10. Bibliography
  6. 2. Windows Azure platform Overview
    1. 2.1. Windows Azure Platform Overview
      1. 2.1.1. Windows Azure Platform Architecture
        1. 2.1.1.1. The Windows Azure Operating System
        2. 2.1.1.2. SQL Azure
        3. 2.1.1.3. .NET Services
        4. 2.1.1.4. Live Services
    2. 2.2. Basic Azure Scenarios
      1. 2.2.1. Scenario 1: Azure Software Development
      2. 2.2.2. Scenario 2: Cross-Enterprise Application Integration
      3. 2.2.3. Scenario 3: Enterprise Process Offloading
      4. 2.2.4. Scenario 4: Consumer Services (Live Mesh Synchronization)
    3. 2.3. Windows Azure Platform for Developers
      1. 2.3.1. Developer Roles
      2. 2.3.2. Developer Readiness
    4. 2.4. Getting Started
      1. 2.4.1. Windows Azure Developer Portal
      2. 2.4.2. AppFabricDeveloper Portal
      3. 2.4.3. SQL Azure Developer Portal
    5. 2.5. Building the Development Platform
      1. 2.5.1. Operating System
      2. 2.5.2. Software
    6. 2.6. Getting Started with Windows Azure Platform Development
      1. 2.6.1. Setting the Objectives
      2. 2.6.2. Understanding the Service Architecture
      3. 2.6.3. Understanding the Developer Workflow
      4. 2.6.4. Developing the Service
      5. 2.6.5. Deploying the Service
      6. 2.6.6. Example Summary
    7. 2.7. Summary
    8. 2.8. Bibliography
  7. 3. Windows Azure
    1. 3.1. Windows Azure Architecture
      1. 3.1.1. The Compute Service
        1. 3.1.1.1. Web Role
        2. 3.1.1.2. Worker Role
      2. 3.1.2. Windows Azure API Structure
    2. 3.2. Developer Environment
      1. 3.2.1. Windows Azure Tools for Visual Studio
        1. 3.2.1.1. Visual Studio Project Types
        2. 3.2.1.2. Role Settings and Configuration
        3. 3.2.1.3. Visual Studio Project Actions
          1. 3.2.1.3.1. Working with Cloud Service Roles
          2. 3.2.1.3.2. Working with Storage Services
        4. 3.2.1.4. Debugging in Visual Studio .NET
        5. 3.2.1.5. Packaging the Service
      2. 3.2.2. Windows Azure SDK Tools
      3. 3.2.3. Service Models
        1. 3.2.3.1. ServiceDefinition.csdef
          1. 3.2.3.1.1. Endpoints
          2. 3.2.3.1.2. Local Storage
          3. 3.2.3.1.3. Full Trust Execution
        2. 3.2.3.2. Certificate Management
        3. 3.2.3.3. ServiceConfiguration.cscfg
          1. 3.2.3.3.1. Configuration Settings
      4. 3.2.4. Development Fabric
      5. 3.2.5. Development Storage
    3. 3.3. Diagnostics
      1. 3.3.1. Logging
        1. 3.3.1.1. Configuring the Trace Listener
        2. 3.3.1.2. Defining the Storage Location for the Diagnostics Service
        3. 3.3.1.3. Starting the Diagnostics Service
    4. 3.4. Developing Windows Azure Services with Inter-role Communication
      1. 3.4.1. Objectives
      2. 3.4.2. Adding Diagnostics and Inter-role Communication
        1. 3.4.2.1. Service Model
        2. 3.4.2.2. Worker Role
        3. 3.4.2.3. Web Role
      3. 3.4.3. Running the HelloAzureCloud Service
    5. 3.5. Developing a Web Role to Worker Role Message Exchange
      1. 3.5.1. Objectives
      2. 3.5.2. Service Architecture
      3. 3.5.3. System Information Message
      4. 3.5.4. The Components of the Solution
        1. 3.5.4.1. Creating the ProAzureCommonLib Class Library Project
          1. 3.5.4.1.1. Logging
          2. 3.5.4.1.2. Configuration
        2. 3.5.4.2. Local Storage
        3. 3.5.4.3. System Information
        4. 3.5.4.4. WebWorkerExchange Cloud Service Project
          1. 3.5.4.4.1. ServiceDefinition.csdef
          2. 3.5.4.4.2. ServiceConfiguration.cscfg
        5. 3.5.4.5. Creating the WebWorkerExchange_WebRole Web Role Project
          1. 3.5.4.5.1. SystemInfo.svc
          2. 3.5.4.5.2. Default.aspx
        6. 3.5.4.6. Creating the WebWorkerExchange_WorkerRole Worker Role Project
    6. 3.6. Geolocation
      1. 3.6.1. Enabling Geographic Affinity
    7. 3.7. Content Delivery Network
    8. 3.8. Windows Azure Service Management
      1. 3.8.1. Service Management API Structure
      2. 3.8.2. Programming with the Service Management API
    9. 3.9. Windows Azure Service Life Cycle
    10. 3.10. Architectural Advice
    11. 3.11. Summary
    12. 3.12. Bibliography
  8. 4. Windows Azure Storage Part I – Blobs
    1. 4.1. Storage Service Architecture
    2. 4.2. The Blob Service
      1. 4.2.1. Blob Limitations and Constraints
      2. 4.2.2. Blob Architecture
        1. 4.2.2.1. Windows Azure Storage Account
        2. 4.2.2.2. Containers
        3. 4.2.2.3. Blobs
        4. 4.2.2.4. Types of Blobs
          1. 4.2.2.4.1. Page Blobs
          2. 4.2.2.4.2. Block Blobs
      3. 4.2.3. REST API
        1. 4.2.3.1. Request
          1. 4.2.3.1.1. HTTP Verb
          2. 4.2.3.1.2. Request URI
          3. 4.2.3.1.3. URI Parameters
          4. 4.2.3.1.4. Request Headers
          5. 4.2.3.1.5. Request Body
        2. 4.2.3.2. Response
          1. 4.2.3.2.1. Status Code
          2. 4.2.3.2.2. Response Headers
          3. 4.2.3.2.3. Response Body
        3. 4.2.3.3. Storage Client APIs
          1. 4.2.3.3.1. Windows Azure Storage Client Blob API
          2. 4.2.3.3.2. Storage Client Code Sample: Blob API
      4. 4.2.4. Account Operations
      5. 4.2.5. Programming Example
      6. 4.2.6. Container Operations
        1. 4.2.6.1. Create Container
        2. 4.2.6.2. Set Container Metadata
        3. 4.2.6.3. List Blobs
      7. 4.2.7. Blob Operations
        1. 4.2.7.1. Put Blob
          1. 4.2.7.1.1. Put Block and Put Block list Operations
        2. 4.2.7.2. Get Blob
        3. 4.2.7.3. Copy Blob
    3. 4.3. Blob Summary
    4. 4.4. Bibliography
  9. 5. Windows Azure Storage Part II – Queues
    1. 5.1. Queue Limitations and Constraints
    2. 5.2. Queue Service Architecture
      1. 5.2.1. Windows Azure Storage Account
      2. 5.2.2. Queues
      3. 5.2.3. Messages
    3. 5.3. REST API
      1. 5.3.1. Request
        1. 5.3.1.1. HTTP Verb
        2. 5.3.1.2. Request URI
        3. 5.3.1.3. URI Parameters
        4. 5.3.1.4. Request Headers
        5. 5.3.1.5. Request Body
      2. 5.3.2. Response
        1. 5.3.2.1. Status Code
        2. 5.3.2.2. Response Headers
        3. 5.3.2.3. Response Body
      3. 5.3.3. Storage Client APIs
        1. 5.3.3.1. Windows Azure Storage Client Queue API
        2. 5.3.3.2. Storage Client Code Sample Queue API
    4. 5.4. Account Operations
    5. 5.5. Queue Operations
      1. 5.5.1. Create Queue
      2. 5.5.2. Set Queue Metadata
    6. 5.6. Message Operations
      1. 5.6.1. Put Message
      2. 5.6.2. Get Messages
        1. 5.6.2.1. Message Event
    7. 5.7. Queue Scenarios
      1. 5.7.1. Scenario 1: Windows Azure Web and Worker Role Communications
      2. 5.7.2. Scenario 2: Worker Role Load Distribution
      3. 5.7.3. Scenario 3: Interoperable Messaging
        1. 5.7.3.1. Scenario 4: Guaranteed Processing
    8. 5.8. Queue Summary
    9. 5.9. Bibliography
  10. 6. Windows Azure Storage Part III – Tables
    1. 6.1.
      1. 6.1.1. Table Service Architecture
        1. 6.1.1.1. Windows Azure Storage Account
        2. 6.1.1.2. Table
        3. 6.1.1.3. Entity
        4. 6.1.1.4. Property
      2. 6.1.2. REST API
        1. 6.1.2.1. Request
          1. 6.1.2.1.1. HTTP Verb
          2. 6.1.2.1.2. Request URI
          3. 6.1.2.1.3. URI Parameters
          4. 6.1.2.1.4. Request Headers
          5. 6.1.2.1.5. Request Body
        2. 6.1.2.2. Response
          1. 6.1.2.2.1. Status Code
          2. 6.1.2.2.2. Response Headers
          3. 6.1.2.2.3. Response Body
        3. 6.1.2.3. ADO.NET Data Services Library (.NET Client Library)
        4. 6.1.2.4. Storage Client APIs
          1. 6.1.2.4.1. Windows Azure StorageClient Table API
        5. 6.1.2.5. StorageClient Table Service API
      3. 6.1.3. Example Table Model
      4. 6.1.4. Account Operations
      5. 6.1.5. Table Operations
        1. 6.1.5.1. Create Table
        2. 6.1.5.2. Query Tables
      6. 6.1.6. Entity Operations
        1. 6.1.6.1. Query Entities
        2. 6.1.6.2. Insert Entity
        3. 6.1.6.3. Merge Entity
      7. 6.1.7. Table Service Summary
    2. 6.2. Windows Azure Storage Summary
    3. 6.3. Bibliography
  11. 7. AppFabric: Access Control Service
    1. 7.1. Concepts and Terminology
      1. 7.1.1. Identity Provider
      2. 7.1.2. Relying Party
      3. 7.1.3. Security Token (SAML token)
      4. 7.1.4. Secure Token Service (STS)
      5. 7.1.5. Request for Security Token (RST)
      6. 7.1.6. Request Security Token Response (RSTR)
      7. 7.1.7. Claim
      8. 7.1.8. Identity Federation
      9. 7.1.9. Windows Identity Foundation (Geneva Framework)
      10. 7.1.10. Active Directory Federation Server (ADFS 2.0) (Geneva Server)
      11. 7.1.11. Web Resource Authorization Protocol (WRAP) and Simple Web Token (SWT)
    2. 7.2. Claims-Based Identity Model
    3. 7.3. Access Control Service Usage Scenarios
      1. 7.3.1. Scenario 1: Enterprise Cloud Application
      2. 7.3.2. Scenario 2: Cross-Enterprise Application
      3. 7.3.3. Scenario 3: ISV Cloud Service
      4. 7.3.4. Retrieving Tokens from ACS
    4. 7.4. Access Control Service Management Portal
    5. 7.5. Managing Access Control Service Resources
      1. 7.5.1. Service Namespace
      2. 7.5.2. Token Policy
      3. 7.5.3. Scope
      4. 7.5.4. Issuer
      5. 7.5.5. Ruleset
      6. 7.5.6. Rule
    6. 7.6. Programming Access Control Service
      1. 7.6.1. Creating an ACS solution Using SWT
        1. 7.6.1.1. Provisioning Your ACS Account
        2. 7.6.1.2. Creating a Service Namespace
        3. 7.6.1.3. Designing the Relying Party Claims
        4. 7.6.1.4. Designing ACS Rules to Map Input Claims to Output Claims
        5. 7.6.1.5. Creating ACS Resources (Token Policy, Scope, Issuer, and Rules)
          1. 7.6.1.5.1. Creating a Token Policy
          2. 7.6.1.5.2. Creating a scope
          3. 7.6.1.5.3. Creating an Issuer
          4. 7.6.1.5.4. Creating Rules
          5. 7.6.1.5.5. Creating or Modifying the Relying Party to Accept an SWT from ACS
          6. 7.6.1.5.6. Creating the Web Service Consumer
          7. 7.6.1.5.7. Running the Examples
      2. 7.6.2. Integrating ACS with a SAML Token Provider
        1. 7.6.2.1. Configuring ACS to Accept SAML Tokens
        2. 7.6.2.2. Configuring a Web Service Client to Acquire and Send SAML Tokens
      3. 7.6.3. Deploying the Web Service in Windows Azure
    7. 7.7. Summary
    8. 7.8. Bibliography
  12. 8. AppFabric Service Bus
    1. 8.1. Enterprise Service Bus (ESB)
      1. 8.1.1. Security and Access Control
      2. 8.1.2. Connectivity Infrastructure
      3. 8.1.3. Enterprise Naming Scheme
      4. 8.1.4. Interface Contracts
    2. 8.2. Evolution of the Internet Service Bus (ISB)
      1. 8.2.1. Relay Service
    3. 8.3. Introduction to the AppFabric Service Bus
      1. 8.3.1. Security
        1. 8.3.1.1. ACS Integration (Relay Authentication)
        2. 8.3.1.2. Message Security
      2. 8.3.2. Naming Service
      3. 8.3.3. Service Registry
      4. 8.3.4. Messaging Fabric
        1. 8.3.4.1. AppFabric Service Bus Bindings
        2. 8.3.4.2. Message Buffer
    4. 8.4. Programming with the AppFabric Service Bus
      1. 8.4.1. ProAzure Energy Service Example
      2. 8.4.2. NetOnewayRelayBinding
        1. 8.4.2.1. AppFabric Contract
        2. 8.4.2.2. Service Implementation
        3. 8.4.2.3. Service Binding
        4. 8.4.2.4. Relay Security
        5. 8.4.2.5. Message Security
        6. 8.4.2.6. Service Endpoints
        7. 8.4.2.7. Service Hosting
        8. 8.4.2.8. Client Design
        9. 8.4.2.9. Running the Application
      3. 8.4.3. netEventRelayBinding
        1. 8.4.3.1. AppFabric Contract
        2. 8.4.3.2. Service Implementation
        3. 8.4.3.3. Service Binding
        4. 8.4.3.4. Relay Security
        5. 8.4.3.5. Message Security
        6. 8.4.3.6. Service Endpoints
        7. 8.4.3.7. Service Hosting
        8. 8.4.3.8. Client Design
        9. 8.4.3.9. Running the Application
      4. 8.4.4. NetTcpRelayBinding
        1. 8.4.4.1. AppFabric Contract
        2. 8.4.4.2. Service Implementation
        3. 8.4.4.3. Service Binding
        4. 8.4.4.4. Relay Security
        5. 8.4.4.5. Message Security
        6. 8.4.4.6. Service Endpoints
        7. 8.4.4.7. Service Hosting
        8. 8.4.4.8. Client Design
        9. 8.4.4.9. Running the Application
      5. 8.4.5. HTTP Relay Bindings
        1. 8.4.5.1. WS2007HttpRelayBinding
        2. 8.4.5.2. WebHttpRelayBinding
    5. 8.5. Message Buffer
      1. 8.5.1. Programming Message Buffer Applications
        1. 8.5.1.1. Creating a Message Buffer Policy
        2. 8.5.1.2. Creating and Deleting a message buffer
        3. 8.5.1.3. Sending Messages to a Message Buffer
        4. 8.5.1.4. Retrieving Message from a Message Buffer
        5. 8.5.1.5. Message Buffer Sample Application
    6. 8.6. Summary
    7. 8.7. Bibliography
  13. 9. SQL Azure
    1. 9.1. SQL Azure Architecture
      1. 9.1.1. Infrastructure Layer
      2. 9.1.2. Platform Layer
      3. 9.1.3. Services Layer
      4. 9.1.4. Client Layer
    2. 9.2. SQL Azure Limitations and Supported Features
      1. 9.2.1. Database Features
      2. 9.2.2. Application Features
      3. 9.2.3. Administration Features
    3. 9.3. SQL Azure Data Access
      1. 9.3.1. Code-Near Connectivity
      2. 9.3.2. Code-Far Connectivity
    4. 9.4. Getting Started with SQL Azure
      1. 9.4.1. Creating a SQL Azure Database
      2. 9.4.2. Connecting to a SQL Azure Database
        1. 9.4.2.1. Connecting Using SQL Server Management Studio
          1. 9.4.2.1.1. Creating Logins
        2. 9.4.2.2. Connecting Using SQLCMD
        3. 9.4.2.3. Connecting Using ADO.NET
    5. 9.5. Developing Windows Azure Services that Use SQL Azure
      1. 9.5.1. Service Description
      2. 9.5.2. Processes for Curtailment
      3. 9.5.3. Technical Architecture
        1. 9.5.3.1. Pricing and Gateway Database Design
          1. 9.5.3.1.1. Creating the proazuredemres Database
          2. 9.5.3.1.2. Creating Database Tables
          3. 9.5.3.1.3. Creating Stored Procedures
          4. 9.5.3.1.4. Uploading Sample Data
          5. 9.5.3.1.5. Optimizing SELECT Queries
          6. 9.5.3.1.6. Pricing Table Synchronization
        2. 9.5.3.2. Gateway Listener Design
        3. 9.5.3.3. Gateway Application Design
        4. 9.5.3.4. Running the ProAzure Demand-Response Service
    6. 9.6. Database-Migration Strategies
      1. 9.6.1. Data Definition Migration
      2. 9.6.2. Data Migration
      3. 9.6.3. Business Logic Migration
      4. 9.6.4. Application Migration
    7. 9.7. Database Growth-Management Strategies
    8. 9.8. Summary
    9. 9.9. Bibliography