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.

  • Pingback: The Great Azure Update – 1.3, November 2010 « Brent's Notepad

  • Pingback: Wade Wegner » Blog Archive » Setting Up the BidNow Sample Application for Windows Azure

  • http://twitter.com/ryancrawcour Ryan CrawCour

    great work! this looks really good.

  • Pingback: Cloud Cover Episode 33 – Portal Enhancements and Remote Desktop « jamesdandrews

  • Pingback: Windows Azure’s new features – Sample Application BidNow updated | Cumulux

  • Pingback: TWC9: VS2010 SP1 Beta, , Native Extensions for Silverlight, EF Code First | Website Under Construction

  • http://www.mikekellyconsulting.com Mike Kelly

    Can this be used for an auction for my kids’ school? It looks like a lot of what I need as a starting point. No obligation – I know this is unsupported, I will support the usage. It’s a pretty small auction (there will probably be about 150 items, maybe 300-400 registered bidders).

    Thx.

  • Kyle Bugg

    Question about performance:

    After loading about 300 items onto the site (very few bids and only 6 users) the site performance took a big hit. Back on the version of BidNow that used Azure Table Storage, 300 items made the site unusable… Now that it’s using Azure SQL, it handles 300 items much better but still not as fast as one would expect.

    Why is this? I first suspected that more indexes on the tables were needed (like one for categoryId on the items table), but after adding those, that didn’t improve performance. I’m just surprised that the site doesn’t scale without impacting performance – is this a platform issue or a problem with how the application uses the platform?

    Thx

  • Joe

    This thing is way over architected.

    • Wade

      Thanks for the feedback, Joe. Anything in particular?

  • http://www.gssinfotech.com Seetha

    After following the set up steps and deploymnet in Azure I got the following error.Please help me on this issue.
    Server Error in ‘/’ Application.

    Configuration Error
    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

    Parser Error Message: Unrecognized attribute ‘deployment’. Note that attribute names are case-sensitive.

    Source Error:

    Line 11:
    Line 12:
    Line 13:
    Line 14:
    Line 15:

    Thanks,
    Seetha.

  • Kentaro

    The “live demo of the application.” link is now broken.

    Server Error in ‘/’ Application.
    The remote name could not be resolved: ‘bnowsamplecache-cache.accesscontrol.appfabriclabs.com’

    Thanks

  • http://www.kjross.com.au David

    This demo application is way undersupported. The live demo doesn’t run, the example doesn’t work as reported by a number of people at http://www.wadewegner.com/2010/12/setting-up-the-bidnow-sample-application-for-windows-azure/
    When is somebody going to address this or doesn’t anybody care?

  • http://namelessbeginnings.com Andy

    I know you’ve now left Microsoft Wade, but I was wondering if you still had a copy of the source for BidNow lying around? A sample app ala BidNow was just what I was looking for and then I discovered that it’s been pulled from codeplex and I’ll be damned if I can find it anywhere else on the web. Obviously things have moved on a bit over the past few years, but it’d be interesting to see how you guys put it together…