Archive for the ‘Windows Azure AppFabric’ Category.

Windows Azure Platform Training Kit, December 2010 Update

I am happy to announce that we have released the December 2010 update to the Windows Azure Platform Training Kit.

The Windows Azure Platform Training Kit includes a comprehensive set of technical content including hands-on labs, presentations, and demos that are designed to help you learn how to use the Windows Azure platform including: Windows Azure, SQL Azure and the Windows Azure AppFabric.

The December update provides new and updated hands-on labs, demo scripts, and presentations for the Windows Azure November 2010 enhancements and the Windows Azure Tools for Microsoft Visual Studio 1.3. These new hands-on labs demonstrate how to use new Windows Azure features such as Virtual Machine Role, Elevated Privileges, Full IIS, and more. This release also includes hands-on labs that were updated in late October and November 2010 to demonstrate some of the new Windows Azure AppFabric services that were announced at the Professional Developers Conference (http://microsoftpdc.com) including the Windows Azure AppFabric Access Control Service, Caching Service, and the Service Bus.

image

Some of the specific changes with the December update of the training kit include:

  • [Updated] All demos were updated to the Azure SDK 1.3
  • [New demo script] Deploying and Managing SQL Azure Databases with Visual Studio 2010 Data-tier Applications
  • [New presentation] Identity and Access Control in the Cloud
  • [New presentation] Introduction to SQL Azure Reporting
  • [New presentation] Advanced SQL Azure
  • [New presentation] Windows Azure Marketplace DataMarket
  • [New presentation] Managing, Debugging, and Monitoring Windows Azure
  • [New presentation] Building Low Latency Web Applications
  • [New presentation] Windows Azure AppFabric Service Bus
  • [New presentation] Windows Azure Connect
  • [New presentation] Moving Applications to the Cloud with VM Role

Give it a try today!

In addition to the training kit, we have updated the Windows Azure Platform Training Courses on MSDN.

The Windows Azure Platform Training Course includes a comprehensive set of hands-on labs and videos that are designed to help you quickly learn how to use Windows Azure, SQL Azure, and the Windows Azure AppFabric. This release provides new and updated hands-on labs for the Windows Azure November 2010 release and the Windows Azure Tools for Microsoft Visual Studio 1.3. Some of these new hands-on labs demonstrate how to use new Windows Azure features such as Virtual Machine Role, Elevated Privileges, Full IIS, and more. This release also includes hands-on labs that were updated in late October 2010 to demonstrate some of the new Windows Azure AppFabric services that were announced at the Professional Developers Conference (http://microsoftpdc.com) including the Windows Azure AppFabric Access Control Service, Caching Service, and the Service Bus.

image

Article: Re-Introducing the Windows Azure AppFabric Access Control Service

I had the great pleasure of co-authoring an article with my teammate Vittorio Bertocci on the September LABS release of the Windows Azure AppFabric Access Control.  This article, entitled Re-Introducing the Windows Azure AppFabric Access Control Service, walks you through the process of authenticating and authorizing users on your Web site by leveraging existing identity providers such as Windows Live ID, Facebook, Yahoo!, and Google.  Specifically, this article covers:

  • Outsourcing Authentication of a Web Site to the Access Control Service (ACS)
  • Creating the Initial Visual Studio Solution
  • Configuring an ACS Project
  • Choosing the Identity Providers You Want
  • Getting the ACS to Recognize Your Web Site
  • Adding Rules
  • Collecting the WS-Federation Metadata Address
  • Configuring the Web Site to Use the ACS
  • Testing the Authentication Flow
  • ACS: Structure and Features

Sounds like a lot, but hopefully you will find the article straightforward and helpful.

alt

Programmatically Configuring the Caching Client

When using Windows Azure AppFabric Caching you will have to configure the caching client to use a provisioned cache.  In the past I’ve given examples of doing this using an application configuration file, but there are times where you may want to programmatically configure the caching client.  Fortunately, it’s really quite easy and straight forward.

Caching Client Code
  1. // define the cache details
  2. string serviceUrl = "YOURNAMESPACE.cache.appfabriclabs.com";
  3. string authorizationToken = "YOURTOKEN";
  4.  
  5. // declare an array for the cache host
  6. List<DataCacheServerEndpoint> server = new List<DataCacheServerEndpoint>();
  7. server.Add(new DataCacheServerEndpoint(serviceUrl, 22233));
  8.  
  9. // setup the DataCacheFactory configuration
  10. DataCacheFactoryConfiguration conf = new DataCacheFactoryConfiguration();
  11. conf.IsRouting = false;
  12. conf.SecurityProperties = new DataCacheSecurity(authorizationToken);
  13. conf.Servers = server;
  14. conf.RequestTimeout = new TimeSpan(0, 0, 45);
  15. conf.ChannelOpenTimeout = new TimeSpan(0, 0, 45);
  16.  
  17. // create the DataCacheFactor based on config settings
  18. DataCacheFactory dataCacheFactory = new DataCacheFactory(conf);
  19.  
  20. // get the default cache client
  21. DataCache dataCache = dataCacheFactory.GetDefaultCache();
  22.  
  23. // put and retrieve a test object
  24. dataCache.Put("key", "1");
  25. string value = dataCache.Get("key") as string;
  26.  
  27. Console.WriteLine("Your value: " + value);

Here are some of the more interesting pieces:

  • Line 6: Create a DataCacheServerEndpoint list that will be used in the DataCacheFactoryConfiguration (see line 13).
  • Line 7: Add the endpoint (defined by the service URL and port) to the list.
  • Line 12: Set a DataCacheSecurity object using the authorization token for the SecurityProperties property.
  • Line 13: Set the DataCacheServerEndpoint list to the Servers property.
  • Line 18: Create a new DataCacheFactory and pass the DataCacheFactoryConfiguration object to the constructor.

Before getting started, but sure to prepare Visual Studio and provision or access your Cache to get the service URL and the authorization token.

Setting Up the BidNow Sample Application for Windows Azure

Update: Recent updates to the Windows Azure AppFabric CTP (see here) have made some of the steps shown in this video incorrect.  Please review Getting Started with BidNow and Deploy BidNow to the Cloud for updates.

Get Microsoft Silverlight

This video provides a walkthrough of the steps required to get the BidNow Sample up and running on your computer.

BidNow is an online auction site that shows how our comprehensive set of cloud services can be used to develop a highly scalable consumer application.  We have recently released a significant update that increases BidNows use of the Windows Azure platform, and specifically uses new features announced at the Professional Developers Conference and in the Windows Azure SDK 1.3 release.

BidNow uses the following technologies:

  • Windows Azure (updated for Windows Azure SDK 1.3)
  • SQL Azure
  • Windows Azure storage (blobs and queues)
  • Windows Azure AppFabric Caching
  • Windows Azure AppFabric Access Control
  • OData
  • Windows Phone 7

For a more comprehensive discussion please see the post Signficant Updates Released in the BidNow Sample for Windows Azure.  To get the latest version of BidNow, download the sample here.  To see a live version running, please go here.

Significant Updates Released in the BidNow Sample for Windows Azure

Click here if you want to quickly grab the latest version of the BidNow sample.  Click here if you want to see a live demo of the application.

BidNowSample There have been a host of announcements and releases over the last month for the Windows Azure Platform.  It started at the Professional Developers Conference (PDC) in Redmond, where we announced new services such as Windows Azure AppFabric Caching and SQL Azure Reporting, as well as new features for Windows Azure, such as VM Role, Admin mode, RDP, Full IIS, and a new portal experience.  Yesterday, the Windows Azure team released the Windows Azure SDK 1.3 and Tools for Visual Studio and updates to the Windows Azure portal (for all the details, see the team post).  These are significant releases that provide a lot of enhancements for Windows Azure.

One of the difficulties that come with this many updates in a short period of time is keeping up with the changes and updates.  It can be challenging to understand how these features and capabilities come together to help you build better web applications.

This is why my team has released sample applications like BidNow, FabrikamShipping SaaS, and myTODO.

What’s in the BidNow Sample?

Just today I posted the latest version of BidNow on the MSDN Code Gallery.  BidNow has been significantly updated to leverage many pieces of the Windows Azure Platform, including many of the new features and capabilities announced at PDC and that are a part of the Windows Azure SDK 1.3.  This list includes:

  • Windows Azure (updated)
    • Updated for the Windows Azure SDK 1.3
    • Separated the Web and Services tier into two web roles
    • Leverages Startup Tasks to register certificates in the web roles
    • Updated the worker role for asynchronous processing
  • SQL Azure (new)
    • Moved data out of Windows Azure storage and into SQL Azure (e.g. categories, auctions, buds, and users)
    • Updated the DAL to leverage Entity Framework 4.0 with appropriate data entities and sources
    • Included a number of scripts to refresh and update the underlying data
  • Windows Azure storage (update)
    • Blob storage only used for auction images and thumbnails
    • Queues allow for asynchronous processing of auction data
  • Windows Azure AppFabric Caching (new)
    • Leveraging the Caching service to cache reference and activity data stored in SQL Azure
    • Using local cache for extremely low latency
  • Windows Azure AppFabric Access Control (new)
    • BidNow.Web leverages WS-Federation and Windows Identity Foundation to interact with Access Control
    • Configured BidNow to leverage Live ID, Yahoo!, and Facebook by default
    • Claims from ACs are processed by the ClaimsAuthenticationManager such that they are enriched by additional profile data stored in SQL Azure
  • OData (new)
    • A set of OData services (i.e. WCF Data Services) provide an independent services layer to expose data to difference clients
    • The OData services are secured using Access Control
  • Windows Phone 7  (new)
    • A Windows Phone 7 client exists that consumes the OData services
    • The Windows Phone 7 client leverages Access Control to access the OData services

Yes, there are a lot of pieces to this sample, but I think you’ll find that it mimics many real world applications.  We use Windows Azure web and worker roles to host our application, Windows Azure storage for blobs and queues, SQL Azure for our relational data, AppFabric Caching for reference and activity data, Access Control for authentication and authorization, OData for read-only services, and a Windows Phone 7 client that consumes the OData services.  That’s right – in addition to the Windows Azure Platform pieces, we included a set of OData services that are leveraged by a Windows Phone 7 client authenticated through Access Control.

High Level Architecture

Here’s a high level look at the application architecture:

image

Compute: BidNow consists of three distinct Windows Azure roles – a web role for the website, a web role for the services, and a worker role for long running operations.  The BidNow.Web web role hosts Web Forms that interact with the underlying services through a set of WCF Service clients.  These services are hosted in the BidNow.Services.Web web role.  The worker role, BidNow.Worker, is in charge of handling the long running operations that could hurt the websites performance (e.g. image processing).

Storage: BidNow uses three different types of storage.  There’s a relational database, hosted in SQL Azure, that contains all the auction information (e.g. categories, auctions, and bids) and basic user information, such as Name and Email address (note that user credentials are not stored in BidNow, as we use Access Control to abstract authentication).  We use Windows Azure Blob storage to store all the auction images (e.g. the thumbnail and full image of the products), and Windows Azure Queues to dispatch asynchronous operations.  Finally, BidNow uses Windows Azure AppFabric Caching to store reference and activity data used by the web tier. 

Authentication & Authorization: In BidNow, users are allowed to navigate through the site without any access restrictions.  However, to bid on or publish an item, authentication is required.  BidNow leverages the identity abstraction and federation aspects of Windows Azure AppFabric Access Control  to validate the users identity against different identity providers – by default, BidNow leverages Windows Live Id, Facebook, and Yahoo!.  BidNow uses Windows Identity Foundation to process identity tokens received from Access Control, and then leverages claims from within those tokens to authenticate and authorize the user.

Windows Phone 7: In today’s world it’s a certainty that your website will have mobile users.  Often, to enrich the experience, client applications are written for these devices.  The BidNow sample also includes a Windows Phone 7 client that interacts with a set of OData services that run within the web tier.  This sample demonstrates how to build a Windows Phone 7 client that leverages Windows Azure, OData, and Access Control to extend your application.

Of course, there’s a lot more that you’ll discover one you dig in.  Over the next few weeks, I’ll write and record a series of blog posts and web casts that explore BidNow in greater depth.

Getting Started

To get started using BidNow, be sure you have the following prerequisites installed:

As you’ve come to expect, BidNow includes a Configuration Wizard that includes a Dependency Checker (for all the items listed immediately above) and a number of Setup Script you can walk through to configure BidNow.  At the conclusion of the wizard you can literally hit F5 and go.

image

Of course, don’t forget to download the BidNow Sample.  For a detailed walkthrough on how to get started with BidNow, please see the Getting Started with BidNow wiki page.