Programming Windows Azure

Book description

Learn the nuts and bolts of cloud computing with Windows Azure, Microsoft's new Internet services platform. Written by a key member of the product development team, this book shows you how to build, deploy, host, and manage applications using Windows Azure's programming model and essential storage services.

Chapters in Programming Windows Azure are organized to reflect the platform's buffet of services. The book's first half focuses on how to write and host application code on Windows Azure, while the second half explains all of the options you have for storing and accessing data on the platform with high scalability and reliability. Lots of code samples and screenshots are available to help you along the way.

  • Learn how to build applications using the Windows Azure toolset
  • Discover how Windows Azure works under the hood, and learn the how and the why behind several features
  • Choose to write application code in .NET or other languages such as C/C++, PHP, or Ruby
  • Understand the various options for managing your service
  • Get up to speed on Azure's storage services, including blobs, queues, and tables
  • Build a secure backup system, and learn about cloud application security, cryptography, and performance

Publisher resources

View/Submit Errata

Table of contents

  1. Programming Windows Azure
  2. Dedication
  3. SPECIAL OFFER: Upgrade this ebook with O’Reilly
  4. Preface
    1. How This Book Is Organized
    2. Conventions Used in This Book
    3. Using Code Examples
    4. How to Contact Us
    5. Safari® Books Online
    6. Acknowledgments
  5. 1. Cloud Computing
    1. Understanding Cloud Computing
      1. History of Cloud Computing
        1. Time-sharing systems
        2. Mainframe computing
        3. Transactional computing
        4. Grid computing
      2. Understanding the Characteristics of Cloud Computing
      3. Understanding Cloud Services
    2. The Windows Azure Platform
      1. Azure AppFabric
      2. SQL Azure
    3. Windows Azure
      1. Understanding the Origins of Windows Azure
      2. Understanding Windows Azure Features
      3. Virtualization
      4. The Fabric Controller
      5. Storage
        1. Blob storage
        2. Queue service
        3. Table storage
    4. When Not to Use the Cloud
      1. Service Availability
      2. Custom Infrastructure Requirements
      3. Security, Confidentiality, and Audits
      4. Capacity Planning and Limits
      5. Unpredictable Performance
      6. Migration and Interoperability
    5. Summary
  6. 2. Under the Hood
    1. Inside the Cloud
    2. The Data Centers
      1. Security
      2. Compliance
    3. The Hypervisor
      1. Hypervisor Architecture
      2. Hypercalls and Enlightenments
      3. Windows Azure Hypervisor Architecture
      4. Windows Azure Hypervisor Features
        1. Performance features
        2. Image-based deployment
    4. The Fabric
      1. The Fabric Controller
      2. Coding and Modeling
        1. Service configuration files and service models
        2. Update domains
        3. Fault domain
      3. Provisioning and Deployment
      4. Management and Monitoring
    5. Summary
  7. 3. Your First Cloud App
    1. Signing Up for Windows Azure
    2. The Windows Azure Tool Set
      1. Getting and Installing the Tools
      2. Satisfying the Prerequisites
      3. Getting to Know the SDK and Tools
      4. Understanding the Development Fabric
        1. Differentiating between the cloud and the Dev Fabric
      5. Development Storage
    3. Developing Your First Cloud Application
      1. Writing the Code
      2. Packing the Code for the Dev Fabric
      3. Running the Code in the Dev Fabric
      4. Running the Code in the Cloud
        1. Packaging code for the cloud
        2. Creating a new hosted service project
        3. Uploading packages
    4. Using the Visual Studio Tools
    5. Summary
  8. 4. Service Model
    1. Understanding Windows Azure Roles
      1. Role Instances
        1. Role instances and the load balancer
        2. Controlling the number of instances
      2. Role Size
    2. Service Definition and Configuration
      1. Service Definition
      2. Service Configuration
    3. Introducing the Service Runtime API
    4. Accessing Configuration Settings
    5. Understanding Endpoints
    6. Understanding Inter-Role Communication
    7. Subscribing to Changes
    8. Looking at Worker Roles in Depth
      1. Creating Worker Roles
      2. Understanding the Worker Role Life Cycle
      3. Understanding Worker Role Patterns
        1. Queue-based, asynchronous processing
        2. Caching layer
    9. Summary
  9. 5. Managing Your Service
    1. Common Themes Across Windows Azure Services
    2. Windows Azure Developer Portal
    3. Service Management API
      1. Operations
      2. API Authentication
      3. Creating an X.509 Certificate
      4. Uploading the X.509 Certificate
      5. Making API Requests
      6. Using Csmanage
    4. Dealing with Upgrades
      1. In-Place Upgrade
      2. VIP Swap
    5. Summary
  10. 6. Native and Non-.NET Code
    1. The Windows Azure Sandbox
      1. Hypervisor and Standard User Privileges
      2. Windows Azure Partial Trust
      3. Full Trust and Native Code
    2. Peeking Under the Hood with a Command Shell
      1. Building the Command Shell Proxy
      2. Enabling Native Code Execution
      3. Running the Command Proxy
    3. Running Non-.NET Languages
    4. Understanding FastCGI and PHP
      1. What Is FastCGI?
      2. FastCGI on Windows Azure
        1. Enabling FastCGI mode
      3. PHP on Windows Azure
        1. Finding and adding a PHP FastCGI implementation
        2. Hooking up the PHP support
        3. Writing and running PHP
    5. “Gotchas” with Running Native Code
    6. Summary
  11. 7. Storage Fundamentals
    1. Accepting the New Storage System
    2. Windows Azure Storage Characteristics
      1. Lots and Lots of Space
      2. Distribution
      3. Scalability
      4. Replication
      5. Consistency
      6. RESTful HTTP APIs
      7. Geodistribution
      8. Pay for Play
    3. Windows Azure Storage Services
      1. Blob Storage
      2. Queue Storage
      3. Table Storage
      4. SQL Azure
    4. Getting Started with a Storage Account
      1. Signing Up for a Storage Account
      2. Picking a Geographic Location
      3. Affinity Groups
      4. Pricing
    5. Working with the REST API
      1. Understanding the RESTful API Resources
      2. HTTP Requests and Responses
        1. URL
        2. Headers
        3. HTTP method
        4. Status codes
    6. Building a Storage Client
      1. Understanding Authentication and Request Signing
      2. Using the Signing Algorithm
      3. Creating and Uploading Stuff
    7. Using the SDK and Development Storage
      1. Installation and Prerequisites
      2. Using Cloud Drive
      3. Using the Development Storage
    8. Summary
  12. 8. Blobs
    1. Understanding the Blob Service
      1. Using Blobs
        1. Filesystem replacement
        2. Heavily accessed data
        3. Backup server
        4. File-share in the cloud
      2. Pricing
      3. Data Model
        1. Blob
        2. Container
        3. Storage account
    2. Usage Considerations
      1. Requests Could Fail
      2. Changes Are Reflected Instantly
      3. Compressed Content
    3. Using the Blob Storage API
    4. Using the Storage Client Library
    5. Using Containers
      1. Understanding Names and URIs
      2. Creating a Container
      3. Using an Access Policy
      4. Listing Containers
      5. Using Metadata
      6. Deleting Containers
    6. Using Blobs
      1. Names and Paths
      2. Creating and Deleting a Block Blob
        1. MD5 hashes
        2. Content-Type and Content-Encoding
        3. Deleting a blob
        4. Viewing a blob
      3. Compressed Content
      4. Reading Blobs
      5. Conditional Reads
      6. Listing, Filtering, and Searching for Blobs
      7. Copying Blob
    7. Understanding Block Blobs
      1. Using Blocks
      2. PUT Block
      3. Block ID
      4. Put BlockList
    8. Understanding Page Blobs
      1. Pages
    9. Windows Azure XDrive
      1. XDrive Internals
    10. CDN Access and Custom Domain Names
      1. Using Custom Domains
    11. Summary
  13. 9. Queues
    1. Understanding the Value of Queues
      1. Decoupling Components
      2. Scaling Out
      3. Load Leveling
    2. Windows Azure Queue Overview
      1. Architecture and Data Model
      2. The Life of a Message
      3. Queue Usage Considerations
        1. Messages can be repeated (idempotency)
        2. Messages can show up out of order
        3. Time skew/late delivery
    3. Understanding Queue Operations
      1. Creating a Queue
      2. Using Queue Metadata
      3. Counting Queue Messages
      4. Listing Queues
      5. Deleting Queues
    4. Understanding Message Operations
      1. Enqueuing a Message
      2. Understanding Message TTL
      3. Peeking at a Message
      4. Getting Messages
      5. Deleting Messages
      6. Deleting and Using PopReceipts
    5. Summary
  14. 10. Tables
    1. Windows Azure Table Overview
      1. Core Concepts
        1. Understanding tables
        2. Understanding entities
        3. Understanding properties
        4. Correlating to database terminology
      2. Azure Tables Versus Traditional Databases
        1. Denormalized data
        2. No schema
        3. No distributed transactions
        4. Black box
        5. Row size limits
        6. Lack of support for familiar tools
    2. ADO.NET Data Services Primer
      1. Exposing Data Services
      2. Consuming Data Services
        1. DataServiceContext and DataServiceQuery
        2. LINQ support
    3. Table Operations
      1. Creating Tables
      2. Creating Entities
      3. Querying Data
      4. Using Partitioning
        1. Picking the right partition key
        2. Testing the theory
      5. Understanding Pagination
      6. Updating Entities
      7. Deleting Tables
      8. Deleting Entities
    4. Summary
  15. 11. Common Storage Tasks
    1. Exploring Full-Text Search
      1. Understanding Full-Text Search
      2. Indexing
        1. Documents and terms
        2. Case folding and stemming
        3. Inverted indexes
      3. Building an FTS Engine on Azure
        1. Picking a data source
        2. Setting up the project
        3. Modeling the data
        4. Adding a mini console
        5. Creating the tables
        6. Stemming
        7. Indexing
        8. Searching for a single term
        9. Searching multiple terms
        10. Ideas for improvement
    2. Modeling Data
      1. One-to-Many
      2. Many-to-Many
    3. Making Things Fast
      1. Secondary Indexes
      2. Entity Group Transactions
        1. Using entity group transactions
    4. Utilizing Concurrent Updates
    5. Summary
  16. 12. Building a Secure Backup System
    1. Developing a Secure Backup System
    2. Understanding Security
    3. Protecting Data in Motion
    4. Protecting Data at Rest
      1. Understanding the Basics of Cryptography
        1. Encryption/decryption
        2. Symmetric key algorithms
        3. Asymmetric key algorithms (public key cryptography)
        4. Cryptographic hash
      2. Determining the Encryption Technique
      3. Generating Keys
      4. Compressing Backup Data
      5. Encrypting Data
        1. Generating a unique Ksym
        2. Encrypting using AES-256
        3. Encrypting Ksym using Kenc
      6. Decrypting Data
      7. Signing and Validating Data
      8. Putting the Cryptography Together
      9. Uploading Efficiently Using Blocks
    5. Usage
    6. Summary
  17. 13. SQL Azure
    1. Creating and Using a SQL Azure Database
      1. Creating a Database
      2. Adding Firewall Rules
      3. Using SQL Server Management Studio
      4. Using ADO.NET
    2. Differences Between SQL Azure and SQL Server
      1. Resource Restrictions
      2. Language/Feature Differences
    3. Tips and Tricks
    4. Summary
  18. Index
  19. About the Author
  20. Colophon
  21. SPECIAL OFFER: Upgrade this ebook with O’Reilly
  22. Copyright

Product information

  • Title: Programming Windows Azure
  • Author(s): Sriram Krishnan
  • Release date: May 2010
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781449390600