www.it-ebooks.info Windows Azure™ Step by Step www.it-ebooks.info www.it-ebooks.info Windows Azure™ Step by Step Roberto Brunetti www.it-ebooks.info Pub shed w th the author zat on of M crosoft Corporat on by O’Re y Med a, Inc 1005 Gravenste n H ghway North Sebastopo , Ca forn a 95472 Copyr ght © 2011 by Roberto Brunett A r ghts reserved No part of the contents of th s book may be reproduced or transm tted n any form or by any means w thout the wr tten perm ss on of the pub sher ISBN 978-0-7356-4972-9 1 2 3 4 5 6 7 8 9 M 6 5 4 3 2 1 Pr nted and bound n the Un ted States of Amer ca M crosoft Press books are ava ab e through bookse ers and d str butors wor dw de If you need support re ated to th s book, ema M crosoft Press Book Support at mspinput@microsoft.com P ease te us what you th nk of th s book at http://www.microsoft.com/learning/booksurvey M crosoft and the trademarks sted at http://www.microsoft.com/about/legal/en/us/IntellectualProperty/ Trademarks/EN-US.aspx are trademarks of the M crosoft group of compan es A other marks are property of the r respect ve owners The examp e compan es, organ zat ons, products, doma n names, ema addresses, ogos, peop e, p aces, and events dep cted here n are ct t ous No assoc at on w th any rea company, organ zat on, product, doma n name, ema address, ogo, person, p ace, or event s ntended or shou d be nferred Th s book expresses the author’s v ews and op n ons The nformat on conta ned n th s book s prov ded w thout any express, statutory, or mp ed warrant es Ne ther the authors, O’Re y Med a, Inc , M crosoft Corporat on, nor ts rese ers, or d str butors w be he d ab e for any damages caused or a eged to be caused e ther d rect y or nd rect y by th s book Russe Jones Teresa E sey On ne Tra n ng So ut ons, Inc Br an Ke er G nny Munroe Tw st Creat ve • Seatt e Karen Montgomery www.it-ebooks.info This book is dedicated to Barbara for her support in every important step of my life. —Roberto www.it-ebooks.info www.it-ebooks.info Contents at a Glance Introduction to Cloud Computing 1 Introduction to the Windows Azure Platform 15 Creating a Web Role Project 41 Windows Azure Storage 79 Tables, Queues, and Worker Roles 111 Windows Azure Operating System Details 137 Building an AppFabric Solution 161 WCF Data Services and OData 193 Using SQL Azure 233 Accessing Azure Services from Everywhere 259 Application Architecture 281 www.it-ebooks.info www.it-ebooks.info Table of Contents Acknowledgments xiii Foreword xv Introduction xvii Introduction to Cloud Computing 1 Approaches to Cloud Computing 1 Infrastructure as a Service 2 Software as a Service 2 Platform as a Service 3 Cloud Services Dened 4 Long-Term Vision 5 Windows Azure as a PaaS Solution 6 Great Opportunity for Small Businesses 7 Great Opportunity for Big Businesses 10 Windows Azure and Cloud Computing 12 Summary 14 Introduction to the Windows Azure Platform 15 The Operating System 16 Service Creation 19 Windows Azure Storage 27 The Worker Role 31 The Virtual Machine Role 32 Windows Azure AppFabric 32 The Service Bus 33 The Access Control Service 35 SQL Azure 39 Summary 40 What do you think of this book? We want to hear from you! M crosoft s nterested n hear ng your feedback so we can cont nua y mprove our books and earn ng resources for you To part c pate n a br ef on ne survey, p ease v s t: microsoftcom/learning/booksurvey www.it-ebooks.info [...]... cloud strategy ■ Understand the basics of the Windows Azure platform This book is based on my personal experience in learning about, teaching, and developing cloud-based solutions that take advantage of the various components of the Windows Azure platform, which consists of Windows Azure Compute, Windows Azure Storage, Windows Azure AppFabric, and Microsoft SQL Azure This chapter introduces the cloud computing... ITPro Evangelist Manager Microsoft Italy www.it-ebooks.info Introduction Windows Azure is the Microsoft cloud computing platform that lets developers leverage its powerful, scalable, and fault-tolerant infrastructure to build successful applications Windows Azure Step by Step provides an organized walkthrough of the Windows Azure platform and its related technologies The text is decidedly introductory;... environment running on a Windows CE device with 256 MB of RAM—even though the garbage collector works very differently between the two devices I’m not saying that the same code can work everywhere; I’m saying that there are many differences between Windows and Windows CE, and some of those are made transparent to the developer by the NET Framework www.it-ebooks.info 6 Windows Azure Step by Step Today s compilers... Microsoft SQL Azure This chapter introduces the cloud computing philosophy that is the basis for any cloud-based project The home page for Windows Azure (Microsoft Corporation, Windows Azure website, 2011, http://www.microsoft.com/windowsazure/ ) states: Microsoft Windows Azure provides a scalable and fault-tolerant environment that lets developers create powerful applications without the need to purchase... dedicated to Windows Azure AppFabric, one of the platform components built on the Windows Azure Operating System ■ Chapter 8 focuses on WCF Data Services and guides you through the creation of an Entity Data Model and the use of the “Astoria” project to expose this model with REST and OData protocols ■ Chapter 9 is dedicated to SQL Azure, the SQL Server cloud brother ■ Chapter 10 leverages the Windows Azure. .. or configure ■ There are no skills required to secure the underlying system www.it-ebooks.info 10 Windows Azure Step by Step ■ There is no cost for the staging environment ■ There are no licenses to buy As the preceding list reveals, all the initial effort usually required by any on-premises solution is bypassed completely You start paying only when you deploy your solution, and then you can adjust... (SaaS), and Platform as a Service (PaaS) www.it-ebooks.info 1 2 Windows Azure Step by Step Infrastructure as a Service Some vendors provide the infrastructure to build solutions, and you rent the hardware such as servers, load balancers, a firewall, and cables You then configure these remotely and install your solutions on them You can scale up by requesting more servers and reconfiguring the load balancer... 77 Quick Reference 77 4 Windows Azure Storage 79 Local Storage 80 The Windows Azure Storage Account 85 Windows Azure Management Tool 90 Blob APIs ... The Windows Azure platform hides these technical details completely, and instead provides APIs for managing resources in a logical way You need only to create storage, choose a name, and then use an endpoint provided by the system to manage resources The idea behind Windows Azure is to provide a distributed operating system where you can deploy and run applications without dealing with the classic Windows. .. contains the step- by -step procedure to recreate the sample so you do not need any of the code samples to complete the exercises To complete an exercise, follow the list of procedure steps in sequence Each chapter contains all the necessary steps for its exercises; in other words, you do not have to have completed the exercises in previous chapters How to Access Your Online Edition Hosted by Safari The . www.it-ebooks.info Windows Azure Step by Step www.it-ebooks.info www.it-ebooks.info Windows Azure Step by Step Roberto Brunetti www.it-ebooks.info Pub. infrastructure to build successful applications. Windows Azure Step by Step provides an organized walkthrough of the Windows Azure platform and its related technologies.