Sunday, April 26, 2009

Windows Azure and Cloud Computing Posts for 4/20/2009+

Windows Azure, Azure Data Services, SQL Data Services and related cloud computing topics now appear in this weekly series.

• Updated 4/24-26/2009: Additions, especially the RSA Conference 2009 and IBM DB2, Informix and other AMIs for Amazon EC2.

Note: This post is updated daily or more frequently, depending on the availability of new articles.

Azure Blob, Table and Queue Services

Brent Stineman delivers his promised Azure Storage – Hands on with Queues, Part 2 post of 4/26/2009 with the details of how to get a list of queues, put a message into a queue, and read/peek at messages with RESTful HTTP Request and Response messages. (Brent doesn’t use the StorageClient class library.)

Part 1 is at Azure Storage – Hands on with Queues, Part 1.

My Thumbnails.sln Original and Enhanced Versions – Flow Diagrams post of 4/24/2009 provides flow diagrams of the original Thumbnails.sln project from the Windows Azure SDK (March 2009 CTP) with and without fixes for high bandwidth requirements by Steve Marx.

My Scalability and Cost Issues with Windows Azure Web and Worker Role Projects – Live Demo post of 4/20/2009 (updated 4/21/2009) analyzes performance problems and excessive cloud-services costs as the result of excessively heavy-duty AJAX page postbacks in the Thumbnails.sln sample project from the Windows Azure SDK (March 2009 CTP).

Microsoft’s Steve Marx, the author of the Thumbnails sample, added a comment to the post that showed how to fix the problem (albeit by sacrificing immediate visibility of added images for all users).

SQL Data Services (SDS)

No posts of significance as of 4/21/2009 at 1:43 PM.

.NET Services: Access Control, Service Bus and Workflow

• My Creating CardSpace Credentials at Microsoft’s Identity Labs Web Site of 4/25/2009 is an illustrated walk-through for creating CardSpace credentials for the Windows Cardspace “Geneva” contol panel tool that appears after you install the Geneva SDK.

• Ryan Dunn says “Azure Issue Tracker is temp[orarily] broken with March changes to .NET Services ACS API. Will be fixed soon-ish (crosses fingers)...” in a 4/25/2009 tweet. I should have re-read his Windows Azure and Geneva post of 4/2/2009, which says:

I don't like to basically re-blog what others have written, but I will make a minor exception today, as it is important enough to repeat.  My friend and colleague, Vittorio [Bertocci] has explained the current status of the Geneva framework running on Windows Azure today.

The short and sweet is that we know it is not working 100% today and we are working on a solution.  This is actually the main reason that you do not see a Windows Azure version of Azure Issue Tracker today.

• Matias Woloski’s Multi tenant federation with Geneva Framework and Microsoft .NET Services Access Control post of 4/23/2009 provides detailed diagrams and sample code to enable the following requirement:

"I want to enable single sign on and allow enterprises that have their own STS to integrate with us. For companies that don’t have any identity infrastructure in place we want to allow them to login with an ubiqu[it]ous credential like Windows LiveID. How do we do that without spending three months with a security guru?"

Live Windows Azure Apps, Tools and Test Harnesses

• David Pallmann continues his Azure grid-computing series with Grid Computing on the Azure Cloud Computing Platform, Part 3: Running a Grid Application of 4/25/2009, which uses the Azure Grid, the community edition of the Neudesic Grid Computing Framework. The two earlier posts are:

Jim Nakashima’s The Easy Way to Install the Windows Azure Tools and SDK Pre-Requisites shows you how to use the Microsoft Platform installer to set up the prerequisites for Windows Azure SDK CTPs.

Azure Infrastructure

• James Hamilton’s Randy Katz on High Scale Data Centers describes highlights of Randy Katz’s Tech Titans Building Boom, which focuses on data center infrastructure and the Google, Microsoft, Amazon, and Yahoo data center building boom. James notes:

Microsoft Chicago will have 200 containers in its lower floor (it’s a two floor facility) and it’s expected to be well over 45MW and will be 75MW if built out to the full 200 containers planned (First Containerized Data Center Announcement). The Chicago, Dublin, and Des Moines facilities have all been delayed by Microsoft presumably due to economic conditions: Microsoft Delays Chicago, Dublin, and Des Moines Data Centers.

Brandon Watson compares Amazon, Google, Microsoft - Big Three Cloud Providers Examined of 11/13/2008 reproduced in this 4/21/2009 post for Cloud Computing Magazine.

Input Industry Insight’s Evolution of the Cloud: The Future of Cloud Computing in Government research report of 4/21/2009 “projects the federal cloud market to expand to $800 million by 2013 while the state and local market for cloud applications could swell to $635 million by 2013.”

Datacenter Team posts Microsoft’s Top 10 Business Practices for Environmentally Sustainable Data Centers (celebrating Earth Day) on 4/21/2009.

Erik Sherman’s Cloud Computing Facing Stormy Weather post of 4/21/2009 casts a jaundiced eye on the subject:

The level of hype on cloud computing is heavy, though not surprising if you have any memory for industry trends. MRP, the paperless office, TQM, client-server computing, object-oriented programming, supply chain management, ERP, the Internet — all have been technical advances during whose introductions vendors queued to prove themselves on the leading edge. All eventually became important tools for corporate computing, but none offered the polished silver bullet they promised. Right now, cloud computing is thoroughly in the introductory stage.

“The first guy in gets to establish the space,” says Lynda Stadtmueller, a senior research analyst at Stratecast, a division of Frost & Sullivan. “That’s been the assumption.”

and then concludes with this quote:

“[Cloud computing] is part of our language today,” Stadtmueller says. “You’d better stick the word in somewhere or you’re going to be at a competitive disadvantage.”

Nicole Schepker reports in her Azure Cloud OS Journal Launched on Ulitzer post of 4/21/2009 that Brandon Watson, Microsoft’s Director of the Azure Services Platform Ecosystem, will be Editor and a Topic Contributor to the new Azure Cloud OS Journal.

Brandon Watson adds his US$0.02 in his McKinsey, The Cloud, and Fuzzy Calculations post of 4/21/2009 to the Azure Cloud OS Journal. Brandon writes:

They call Windows Azure a cloud example, and not Azure Services Platform. This confusion is consistent with customers and press/blogger sentiment that I am seeing.  Windows Azure is a piece of the overall Microsoft cloud play. It’s an application hosting environment, which serves as the foundation, though not required, layer for other code execution paths in the Azure Services Platform.  One can build applications that live completely on-premises without using Windows Azure, but utilize other pieces of the Azure Services Platform.

Mike Cameron and Rod Fontecilla offer their views on the March 2009 McKinsey & Co. report entitled "Clearing the air on cloud computing" in their Cloud Computing Debate: Booz Allen Hamilton Comments on Recent McKinsey & Co. Report post of 4/21/2009 by Kevin Jackson. Cameron and Fontecilla are Booz Allen Hamilton Principals.

James Hamilton analyzes the McKinsey report in his McKinsey Speculates that Cloud Computing May Be More Expensive than Internal IT post of 4/20/2008. His conclusion:

[A]ny company not fully understanding cloud computing economics and not having cloud computing as a tool to deploy where it makes sense is giving up a very valuable competitive edge. No matter how large the IT group, if I led the team, I would be experimenting with cloud computing and deploying where it make sense. I would want my team to know it well and to be deploying to the cloud when the work done is not differentiated or when the capital was better leveraged elsewhere

IT is complex and a single glib answer is almost always wrong. My recommendation is to start testing and learning about cloud services, to take a closer look at your current IT costs, and to compare the advantages of using a cloud service offering with both internal hosting and mixed hosting models.

Roger Strukhoff says Cloud is Bigger Than the Internet on 4/20/2009 in this part I of a two-part pseudo-analysis. Part II is here, for whatever it’s worth.

Cloud Computing Events

• IEEE Computer Socity announced on 4/25/2009 the IEEE 2009 International Conference on Cloud Computing (CLOUD-II 2009) to be held September 21-25, 2009 in Bangalore, India. The conference’s theme is “Changes we can lead” (whatever that means) and here’s the promo paragraph:

CLOUD 2009 is the identified hot-topic conference by the 2009 World Congress on Services (SERVICES 2009). The two well-established theme conferences identified by SERVICES 2009 are the 2009 IEEE International Conference on Web Services (ICWS 2009) in July 2009 in USA and the 2009 IEEE International Conference on Services Computing (SCC 2009) in September 2009 in India. 

Brian Prince reports 4/24/2009 for eWeek from the RSA Conference: Security Vendors Keep Head in the Cloud at RSA Conference:

Every RSA Conference has a popular buzzword or phrase. This year it was "the cloud."

In one way or another, vendors were pushing their answer to handling security in the cloud. Cisco unveiled a number of tools and services in the cloud April 21, even though a day later Cisco CEO John Chambers described the idea of securing a virtual cloud network as “a security nightmare.”

The Cloud Security Alliance published an 83-page Security Guidance for Critical Areas of Focus in Cloud Computing at the RSA Conference. From the Overview:

Covers key issues and provides advice for both Cloud Computing customers and providers within 15 strategic domains.

More information on the Alliance is here.

Gregory T. Huang’s User Interfaces, Cloud Computing, and Ray Ozzie—A Guide to the Season’s Tech Events post of 4/21/2009 reports:

On April 30, Microsoft is hosting an event organized by the WTIA where it will answer those questions, and more. Doug Hauger, Microsoft’s general manager of cloud infrastructure services, will give an overview of Azure and Microsoft’s view of cloud computing software and services.

A bonus speaker will be Ian Knox, director of product management at Skytap, a Seattle-based cloud computing and virtual lab startup. Knox will talk about using cloud computing for Windows applications and lowering IT lab costs, among other things. All in all, it’s essential stuff for anyone interested in shaping the future of the cloud.

The Workshop on Software Engineering Challenges of Cloud Computing @ ICSE 2009 issued on 4/21/2009 a “Call for participation: Workshop on Software Engineering Challenges of Cloud Computing” in conjunction with the 31st International Conference on Software Engineering (ICSE) to be held May 23rd, 2009 in Vancouver, Canada.

Graeme Thickins reports on the Minnesota High-Tech Association's annual spring conference and CloudCampMSP in his It Was Cloud Week in Minneapolis, and All the Cool Kids (and Old Guys!) Were There post of 4/21/2009.

Ant├│nio Costa quotes David Carrera, director of the Cloud Computing (CC) research team at Spain’s Universitat Politecnica de Catalunya (UPC) in his Cloud computing: changing the way we work post of 4/21/2009.

Nicole Schepker’s Burton Group Announces In-Depth Cloud Coverage post of 4/20/2009 announces a “new research coverage area focused on understanding, defining, integration, and the optimization of cloud computing.” The group says:

Burton Group provides practical advice for the underlying architectures, technologies, and platforms necessary, including:

  • Building cloud-friendly applications
  • Public, private, and internal clouds
  • Server virtualization, migration, and fail-over strategies
  • Segmenting data to leverage outsourced storage
  • Understanding software-as-a-service (SaaS) , platform-as-a-service (PaaS), and infrastructure as a service (IaaS).
  • Improving business continuity by exploiting cloud-based architectures

and will offer a Cloud Computing track at its forthcoming Catalyst conference 7/27 – 7/31/2009 in San Diego, CA.

Other Cloud Computing Platforms and Services

ABS*CBN News (Manila) reports IBM plans cloud computing services for 2009 from Reuters on 4/26/2009:

IBM got its feet wet in the field last year when it launched an Internet-based data backup and recovery service.

In addition to the new service for developers, IBM also plans to introduce clouds that let businesses run applications and to virtualize personal computers, Sims said.

Like IBM, Microsoft is viewed as having been slow to enter the field. It plans to launch its cloud services platform, dubbed Azure, late this year or early in 2010

Amazon Web Services announces in Amazon Elastic Compute Cloud (EC2) running IBM of 4/24/2009, a set of IBM services similar to that for Windows Server 2003 and SQL Server [Express]. The following IBM AMIs 

“are ready to run in Amazon EC2 with Novell SuSE Linux and the associated IBM products” at rates ranging from US$0.38/hour for a Standard Small (default) instance type for DB2 Express edition to US$24.35/hour for High CPU Extra Large instances Running IBM WebSphere Portal Server and IBM Web Content Management Server Standard Edition.

Paul Miller says he was Talking to Simon Wardley about Ubuntu and the Cloud on 4/21/2009. Paul writes:

Earlier today I spoke with Simon Wardley of Canonical (the commercial organisation that sells support and consultancy for Ubuntu) to hear a little more about what those downloading Ubuntu will get… and what it might mean for the rapidly shifting Cloud landscape.

Maureen O’Gara’s VMware’s Newfangled Cloud OS Positioned for Takeoff post of 4/21/2009 provides a brief synopsis of VMware’s vSphere 4 offering.

Alin Irimie analyzes VMware’s press release in his VMware vSphere 4 - First Operating System For Building The Internal Cloud post of 4/21/2009.

Kris Tuttle’s Winners and Losers from Oracle / Sun post of 4/21/2009 to the Seeking Alpha blog analyzes the forthcoming Sun Microsystems purchase by Oracle (instead of IBM). Kris lede’s off:

Primarily this is a defensive (meaning not very creative) move by Oracle (ORCL). IBM would have been a measurably stronger competitor for Oracle with Java and MySQL added to their formidable software stack. So the real value for Oracle is more in IBM not having Sun rather than direct benefits for Oracle. All their statements to the contrary are only corporate posturing. That fact is not going to be good news for Sun employees, who can expect Oracle to make the Sun acquisition highly profitable by dramatically eliminating costs, shutting down initiatives and exiting businesses.

and concludes that Oracle / Sun is better for Microsoft than IBM / Sun.

Darryl Plummer asks Night of the Living Dead: Will Oracle buying Sun Raise the Specter of “Network Computing” Again? and on 4/20/2009. He writes:

Today, Oracle announced plans to acquire Sun Microsystems. Gartner is in the process of generating an official position on what this means. You’re going to want to see what we have to say since there will be multiple pieces dissecting this acquisition announcement.

Roger Strukhoff writes Oracle-Sun Nice Cloud Computing Fit, But Maybe Not on 4/20/2009.

Paulo Cal├žada analyzes from the cloud-computing standpoint Oracle’s pending purchase of Sun Microssystems in his ORACLE + SUN: The Cloud is growing, or losing one important player? of 4/20/2009.

Creating CardSpace Credentials at Microsoft’s Identity Labs Web Site

Microsoft’s Identity Lab (Identity Protocols Security Token Service, ipsts) is a set of hosted security token services to support testing of Identity Protocols. The goal of the lab is to provide a set of custom test endpoints to evaluate the interoperability of Identity Protocols amongst multiple partners and vendors. Microsoft promotes its CardSpace credentials as an industry-standard, SAML v1.1-compliant source of identity information.

Note: For an overview of Windows “Geneva” and CardSpace, read David Chappell & Associates’ “Introducing ‘Geneva’” white paper and Matias Woloski’s Multi tenant federation with Geneva Framework and Microsoft .NET Services Access Control post of 4/23/2009, from which the following illustration was taken:

There are no help buttons on the pages for creating a CardSpace credential, so I captured the following page views to help readers of Chapter 9, “Authenticating Users with .NET Access Control Services” add a CardSpace credential to their computer.

Browse to the Microsoft Identity Lab’s Microsoft Identity Interop Sts Logon page and click the Sign Up button to open the Registration page. Type a fictitious name in the UserName text box, a password in the Password and Confirm Password text boxes, and mark the Accept Terms of Use check box:

Click Submit to open the Claims Configuration page. Accept the default (marked) setting for the By Default, Release the Following Claims to Any Relying Party check box. These are the minimum claims required by most relying parties. Type fictitious names in the First Name and LastName text boxes, accept the referring party’s Email Address (UserName@ipsts.federatedidentity.net).

Click Continue to open the Edit Profile Information/Manage Relying Party Policies page (see Figure 9-09.) The Edit Profile Information link opens a page that lets you add to and edit the information you entered previously; the Manage Relying Party Policies page enables selecting the profile information you release to relying parties:

Click the Edit Profile Information Link to open an expanded version of the Claims Configuration page. Complete the entries with fictitious information and enable their selection for your profile by marking the associated check box:

Click Submit to return to the Edit Profile Information/Manage Relying Party Policies page, click Save to return to the Manage Relying Party Policies and click the Manage Relying Party Policies link to open the Relying Parties page which contains Edit/View buttons for HTTPS and HTTP policies.

Click the EditView button for the https://relyingparty.federatedidentity.net party to open the Edit a Policy page. Mark the check boxes for the profile items you want to release and select the public key file (CertName.cer) for your localhost or other certificate you created for authenticating users:

Click Save to save your changes and return to the Edit Profile Information/Manage Relying Party Policies page.

Click the Download Your Username/Password card button to open the File Download dialog for the InformationCard.crd file, and click Yes when asked if you want to save the card with Windows CardSpace “Geneva” on your local computer. This will add the CardSpace credential to the Windows CardSpace “Geneva” Beta Control Panel applet (Control Panel –> Windows Cardspace “Geneva” in Vista):

For more information on the CardSpace Control Panel applet, read Oren Melzer’s The CardSpace “Geneva” Selection Experience post of 11/18/2008 to the somnolent “Geneva” Team Blog.

The OfficeLive team announced on 8/27/2007 that Windows Live ID adds Beta support for Information Cards with Windows CardSpace! However, I haven’t been able to get the Windows Live ID Information Card management page to work, regardless of whether I use saved username/password credentials or type them in manually. After almost two years, you would think their process would be out of beta and work reliably.

Mary Branscombe's When will Windows Live stop treating CardSpace as the unwanted stepchild? post of 10/29/2008 laments that “Windows Live [ID is] ignoring CardSpace.”

Friday, April 24, 2009

Thumbnails.sln Original and Enhanced Versions – Flow Diagrams

Additional diagrams of Steve Marx’s fix for extreme polling bandwidth requirements (Thumbnails2.sln) and the final version with the GridView and thumbnail deletion features (PhotoGallery.sln) will be added as I draw them.

The diagrams are from Chapter 8, “Messaging with Azure Queues,” of my forthcoming Cloud Computing with the Microsoft Azure Services Platform book for WROX.

Click the images to download from Windows Live SkyDrive and display a full-size PDF version.

Original Thumbnails.sln from the Windows Azure SDK (March 2009 CTP)

Thumbnails2 with JavaScript Modifications by Steve Marx to Reduce Traffic Shaded

Steve described his modifications in a extensive comment to my Scalability and Cost Issues with Windows Azure Web and Worker Role Projects – Live Demo post of 4/22/2009. You can run a live demo of this version at http://oakleaf6.cloudapp.net/Default.aspx. Launch Fiddler2 to prove there’s no traffic when the client is quiescent (just connected to the Azure service.)

Wednesday, April 22, 2009

Scalability and Cost Issues with Windows Azure Web and Worker Role Projects – Live Demo

The Thumbnails sample project from the Windows Azure SDK (March 2009 CTP)’s Samples.zip file illustrates combining Web and Worker Roles to upload graphics files from the user’s local file system into Azure Blobs and display thumbnail images from these in a bound ListView control. An AJAX UpdatePanel contains the ListView to minimize UI flashing on postbacks. A Worker Role handles the thumbnail generation process asynchronously by polling the ‘thumbnailmaker’ queue at one-second intervals.

Update 4/21/2009: Comment added by Microsoft’s Steve Marx, who wrote the original Thumbnails.sln sample project; details on the method causing the problem; and hourly network usage data from Windows Azure Metrics. See end of this post.

Update 4/22/2009: Simple modification to eliminate JavaScript exception in Steve Marx’s fix.

Update 4/24/2009: Visit My Thumbnails.sln Original and Enhanced Versions – Flow Diagrams post for flow diagrams of the original and fixed versions of the Thumbnails projects.


Here’s a screen capture of the original Thumbnails.sln’s Web Role with 15 *.jpg thumbnails from *.png images used in previous OakLeaf posts. (Click images to display full-size 1,024 x 768 captures.)

You can run the original Thumbnails.sln project at http://oakleaf6.cloudapp.net/Default.aspx.

Following is the WorkerRole’s HTTP ASYNC Request message with 3,110 bytes of ViewState:

POST /Default.aspx HTTP/1.1
Accept: */*
Accept-Language: en-us
Referer: http://1f33a544-f6d1-431f-bf6d-42fe54904995.cloudapp.net/Default.aspx
x-microsoftajax: Delta=true
Content-Type: application/x-www-form-urlencoded; charset=utf-8
Cache-Control: no-cache
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; GTB6; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30428; .NET CLR 3.5.30729; .NET CLR 3.0.30618; MS-RTC LM 8; InfoPath.2; OfficeLiveConnector.1.3; OfficeLivePatch.1.3)
Host: 1f33a544-f6d1-431f-bf6d-42fe54904995.cloudapp.net
Content-Length: 3110
Connection: Keep-Alive
Pragma: no-cache

sm1=up1%7Ctimer1&__EVENTTARGET=timer1&__EVENTARGUMENT=&__VIEWSTATE=%2FwEPDwUJOTA5OTI0ODEyD2QWAgIDDxYCHgdlbmN0eXBlBRNtdWx0aXBhcnQvZm9ybS1kYXRhFgICBw9kFgJmD2QWA
...
yM2RkGAEFCnRodW1ibmFpbHMPPCsACgIHPCsADwAIAg9kum72snd50MHlpjvMEsnb17lu6dc%3D&__EVENTVALIDATION=%2FwEWAgL094j7BwKSuuDUC8HaRKdWg3LeOCFwZBwLVxzVxzF2&__ASYNCPOST=true&

and here’s the HTTP Response message with a list of blobs having a ‘thumbnails/’ prefix and ViewState, which total 7,217 bytes:

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/plain; charset=utf-8
Server: Microsoft-IIS/7.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Mon, 20 Apr 2009 19:39:51 GMT
Content-Length: 7217

3488|updatePanel|up1|
        
                
                <img id="thumbnails_ctrl0_photoImage" src="http://oakleaf3.blob.core.windows.net/photogallery/thumbnails/1633755652469388030_95a72280-fd3e-438a-9624-73b7cfc5e109" style="border-width:0px;" />
            
                <img id="thumbnails_ctrl1_photoImage" src="http://oakleaf3.blob.core.windows.net/photogallery/thumbnails/1633756498271797216_1f06998c-d6f9-423c-b8ba-66277e7aebc6" style="border-width:0px;" />
            
                <img id="thumbnails_ctrl2_photoImage" src="http://oakleaf3.blob.core.windows.net/photogallery/thumbnails/1633757268772274027_d895bb79-8a41-44c4-9514-d391faff878d" style="border-width:0px;" />
            
                <img id="thumbnails_ctrl3_photoImage" src="http://oakleaf3.blob.core.windows.net/photogallery/thumbnails/1633757440636206298_114f3d2f-4fbc-4d83-9831-954ae0693734" style="border-width:0px;" />
            
                <img id="thumbnails_ctrl4_photoImage" src="http://oakleaf3.blob.core.windows.net/photogallery/thumbnails/1633758473471680000_549f111f-f1e4-4652-b886-d1b703740797" style="border-width:0px;" />
            
                <img id="thumbnails_ctrl5_photoImage" src="http://oakleaf3.blob.core.windows.net/photogallery/thumbnails/1633758476929180000_5cc14527-64be-4e19-ba2a-5b19fd1f51dd" style="border-width:0px;" />
            
                <img id="thumbnails_ctrl6_photoImage" src="http://oakleaf3.blob.core.windows.net/photogallery/thumbnails/1633758477105033750_e25614be-d2a6-46d9-87f3-a0eb63a7b392" style="border-width:0px;" />
            
                <img id="thumbnails_ctrl7_photoImage" src="http://oakleaf3.blob.core.windows.net/photogallery/thumbnails/1633758478020658750_d56f76ad-9a26-46f2-ae0c-c7ce30d228ef" style="border-width:0px;" />
            
                <img id="thumbnails_ctrl8_photoImage" src="http://oakleaf3.blob.core.windows.net/photogallery/thumbnails/1633758478137773750_923ab9f2-3607-4665-8f59-45df1fcc3a77" style="border-width:0px;" />
            
                <img id="thumbnails_ctrl9_photoImage" src="http://oakleaf3.blob.core.windows.net/photogallery/thumbnails/1633758479545430000_74ff03eb-878b-490e-808a-0f6792f726f7" style="border-width:0px;" />
            
                <img id="thumbnails_ctrl10_photoImage" src="http://oakleaf3.blob.core.windows.net/photogallery/thumbnails/1633758479706752500_9a5a7c6f-1dd9-48bc-82b5-aaaa2c431b78" style="border-width:0px;" />
            
                <img id="thumbnails_ctrl11_photoImage" src="http://oakleaf3.blob.core.windows.net/photogallery/thumbnails/1633758480860273750_e54eee86-8ddb-44cb-82b8-badbaa1b2a8d" style="border-width:0px;" />
            
                <img id="thumbnails_ctrl12_photoImage" src="http://oakleaf3.blob.core.windows.net/photogallery/thumbnails/1633758482608086250_bfbd7e5a-026c-45ce-88f7-b6eb563af89b" style="border-width:0px;" />
            
                <img id="thumbnails_ctrl13_photoImage" src="http://oakleaf3.blob.core.windows.net/photogallery/thumbnails/1633758482981283750_d41a21a7-def6-4688-ae29-74109b6050a7" style="border-width:0px;" />
            
                <img id="thumbnails_ctrl14_photoImage" src="http://oakleaf3.blob.core.windows.net/photogallery/thumbnails/1633758484541283750_6d03a107-dfc7-4551-8201-8052ddb9ec23" style="border-width:0px;" />
            
            
                   <span id="timer1" style="visibility:hidden;display:none;"></span>
        |0|hiddenField|__EVENTTARGET||0|hiddenField|__EVENTARGUMENT||2952|hiddenField|__VIEWSTATE|/wEPDwUJOTA5OTI0ODEyD2QWAgIDDxYCHgdlbmN0eXBlBRNtdWx0aXBhcnQvZm9ybS1kYXRhFgICBw9kFgJmD2QWAg
...
M2RkGAEFCnRodW1ibmFpbHMPPCsACgIHPCsADwAIAg9kum72snd50MHlpjvMEsnb17lu6dc=|48|hiddenField|__EVENTVALIDATION|/wEWAgL094j7BwKSuuDUC8HaRKdWg3LeOCFwZBwLVxzVxzF2|0|asyncPostBackControlIDs|||0|postBackControlIDs|||4|updatePanelIDs||tup1|0|childUpdatePanelIDs|||3|panelsToRefreshIDs||up1|2|asyncPostBackTimeout||90|12|formAction||Default.aspx|13|pageTitle||Photo Gallery|149|scriptBlock|ScriptPath|/ScriptResource.axd?d=9YtLxwU-nmRnm7oJ9nOfEaztduuiriMqe964NLCEARKknzUa7EJGulUSq-QKJyN3_XQG98ij__ElfezvDJkF-OgjZtff28LO1U1_MHbdocg1&t=ffffffff9a77c993|155|scriptStartupBlock|ScriptContentNoTags|Sys.Application.add_init(function() {
    $create(Sys.UI._Timer, {"enabled":true,"interval":1000,"uniqueID":"timer1"}, null, null, $get("timer1"));
});
|

Note: Run your own tests with the live demo and Fiddler2 if you’d like to see the unexpurgated viewstate.


Following is a screen capture of an upgraded version of the Thumbnails.sln project from Chapter 8, “Messaging with Azure Queues,” of my forthcoming Cloud Computing with the Microsoft Azure Services Platform book for WROX:

Modifications include the addition of a GridView control to display five attributes of the PhotoGallery blobs having a ‘thumbnails/’ prefix. (The ContentEncoding and ContentLanguage attributes aren’t populated) Another important feature is the ability to delete all but three thumbnails and their source blobs.

You can run the upgraded Thumbnails.sln project at http://oakleaf5.cloudapp.net/Default.aspx.

Here’s the HTTP Request message with 9,179 payload bytes (The GridView increases the ViewState payload):

POST /Default.aspx HTTP/1.1
Accept: */*
Accept-Language: en-us
Referer: http://oakleaf5.cloudapp.net/Default.aspx
x-microsoftajax: Delta=true
Content-Type: application/x-www-form-urlencoded; charset=utf-8
Cache-Control: no-cache
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; GTB6; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30428; .NET CLR 3.5.30729; .NET CLR 3.0.30618; MS-RTC LM 8; InfoPath.2; OfficeLiveConnector.1.3; OfficeLivePatch.1.3)
Host: oakleaf5.cloudapp.net
Content-Length: 9179
Connection: Keep-Alive
Pragma: no-cache

sm1=up1%7Ctimer1&txtTime=&__EVENTTARGET=timer1&__EVENTARGUMENT=&__VIEWSTATE=WR%2BUOP22CwPyX73JtlDmUmmPrRsHh%2BiBwiRDWCm%2BViU00I%2B4hxdW5gvjpq9nCGyVwHj1CdJ8bwxR3oBOYshQUQi2TSlwFRCsOrbowEk4cyE7Ykxo3FcFv9q0k7COA092NHbEls1
...
2FxpttnPCr4zm6hlQbOPlbRXR0yso6CJk9acjrOxqRWOw5l15ypXkVJ0jXv7svxpJ34Ob%2BUGRboSIp6t8xMB7n5mB7cnUqBIsqW7bFnn01Z5gvCxUajLJFx1mUs7XkUr4Yfsbj9w0xTzcL7IMJenC%2BriHNm7GSCJnONw%3D&__VIEWSTATEENCRYPTED=&__ASYNCPOST=true&

and the HTTP Response with payload bytes:

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/plain; charset=utf-8
Server: Microsoft-IIS/7.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Mon, 20 Apr 2009 20:51:21 GMT
Content-Length: 18849

9586|updatePanel|up1|
                    
                            
                            <img id="thumbnails_ctrl0_photoImage" src="http://oakleaf3.blob.core.windows.net/photogallery/thumbnails/1633755652469388030_95a72280-fd3e-438a-9624-73b7cfc5e109" style="border-width:0px;" />
                        
                            <img id="thumbnails_ctrl1_photoImage" src="http://oakleaf3.blob.core.windows.net/photogallery/thumbnails/1633756498271797216_1f06998c-d6f9-423c-b8ba-66277e7aebc6" style="border-width:0px;" />
                        
                            <img id="thumbnails_ctrl2_photoImage" src="http://oakleaf3.blob.core.windows.net/photogallery/thumbnails/1633757268772274027_d895bb79-8a41-44c4-9514-d391faff878d" style="border-width:0px;" />
                        
                            <img id="thumbnails_ctrl3_photoImage" src="http://oakleaf3.blob.core.windows.net/photogallery/thumbnails/1633757440636206298_114f3d2f-4fbc-4d83-9831-954ae0693734" style="border-width:0px;" />
                        
                            <img id="thumbnails_ctrl4_photoImage" src="http://oakleaf3.blob.core.windows.net/photogallery/thumbnails/1633758473471680000_549f111f-f1e4-4652-b886-d1b703740797" style="border-width:0px;" />
                        
                            <img id="thumbnails_ctrl5_photoImage" src="http://oakleaf3.blob.core.windows.net/photogallery/thumbnails/1633758476929180000_5cc14527-64be-4e19-ba2a-5b19fd1f51dd" style="border-width:0px;" />
                        
                            <img id="thumbnails_ctrl6_photoImage" src="http://oakleaf3.blob.core.windows.net/photogallery/thumbnails/1633758477105033750_e25614be-d2a6-46d9-87f3-a0eb63a7b392" style="border-width:0px;" />
                        
                            <img id="thumbnails_ctrl7_photoImage" src="http://oakleaf3.blob.core.windows.net/photogallery/thumbnails/1633758478020658750_d56f76ad-9a26-46f2-ae0c-c7ce30d228ef" style="border-width:0px;" />
                        
                            <img id="thumbnails_ctrl8_photoImage" src="http://oakleaf3.blob.core.windows.net/photogallery/thumbnails/1633758478137773750_923ab9f2-3607-4665-8f59-45df1fcc3a77" style="border-width:0px;" />
                        
                            <img id="thumbnails_ctrl9_photoImage" src="http://oakleaf3.blob.core.windows.net/photogallery/thumbnails/1633758479545430000_74ff03eb-878b-490e-808a-0f6792f726f7" style="border-width:0px;" />
                        
                            <img id="thumbnails_ctrl10_photoImage" src="http://oakleaf3.blob.core.windows.net/photogallery/thumbnails/1633758479706752500_9a5a7c6f-1dd9-48bc-82b5-aaaa2c431b78" style="border-width:0px;" />
                        
                            <img id="thumbnails_ctrl11_photoImage" src="http://oakleaf3.blob.core.windows.net/photogallery/thumbnails/1633758480860273750_e54eee86-8ddb-44cb-82b8-badbaa1b2a8d" style="border-width:0px;" />
                        
                            <img id="thumbnails_ctrl12_photoImage" src="http://oakleaf3.blob.core.windows.net/photogallery/thumbnails/1633758482608086250_bfbd7e5a-026c-45ce-88f7-b6eb563af89b" style="border-width:0px;" />
                        
                            <img id="thumbnails_ctrl13_photoImage" src="http://oakleaf3.blob.core.windows.net/photogallery/thumbnails/1633758482981283750_d41a21a7-def6-4688-ae29-74109b6050a7" style="border-width:0px;" />
                        
                            <img id="thumbnails_ctrl14_photoImage" src="http://oakleaf3.blob.core.windows.net/photogallery/thumbnails/1633758484541283750_6d03a107-dfc7-4551-8201-8052ddb9ec23" style="border-width:0px;" />
                        
                        
                    <div id="timer" style="height: 37px">
                        Create Thumbnail Time, seconds:&nbsp;
                        <input name="txtTime" type="text" id="txtTime" style="width:67px;" />
                    </div>
                    <div id="divGridView"">
<div>
<table title="Displays the current thumbnail blobs." cellspacing="0" cellpadding="4" rules="cols" border="1" id="gvBlobs" style="color:#6B696B;background-color:White;border-color:#DEDFDE;border-width:1px;border-style:None;border-collapse:collapse;">
        <tr style="color:White;background-color:#6B696B;font-weight:bold;">
            <th scope="col">Blobs</th><th scope="col">Name</th><th scope="col">ContentType</th><th scope="col">ContentLength</th><th scope="col">LastModifiedTime</th><th scope="col">ETag</th>
        </tr><tr style="background-color:#F7F7DE;">
            <td><a href="javascript:__doPostBack('gvBlobs','Delete$0')" style="color:#6B696B;">Delete</a></td><td>thumbnails/1633755652469388030_95a72280-fd3e-438a-9624-73b7cfc5e109</td><td>image/jpeg</td><td>3993</td><td>4/17/2009 6:39:39 PM</td><td>0x8CB8DA2FFD51660</td>
        </tr><tr style="background-color:White;">
            <td><a href="javascript:__doPostBack('gvBlobs','Delete$1')" style="color:#6B696B;">Delete</a></td><td>thumbnails/1633756498271797216_1f06998c-d6f9-423c-b8ba-66277e7aebc6</td><td>image/jpeg</td><td>4269</td><td>4/18/2009 6:10:01 PM</td><td>0x8CB8E6806E01B60</td>
        </tr><tr style="background-color:#F7F7DE;">
            <td><a href="javascript:__doPostBack('gvBlobs','Delete$2')" style="color:#6B696B;">Delete</a></td><td>thumbnails/1633757268772274027_d895bb79-8a41-44c4-9514-d391faff878d</td><td>image/jpeg</td><td>4803</td><td>4/19/2009 3:33:40 PM</td><td>0x8CB8F1B598712C0</td>
        </tr><tr style="background-color:White;">
            <td><a href="javascript:__doPostBack('gvBlobs','Delete$3')" style="color:#6B696B;">Delete</a></td><td>thumbnails/1633757440636206298_114f3d2f-4fbc-4d83-9831-954ae0693734</td><td>image/jpeg</td><td>3761</td><td>4/19/2009 8:20:12 PM</td><td>0x8CB8F4360FB7640</td>
        </tr><tr style="background-color:#F7F7DE;">
            <td><a href="javascript:__doPostBack('gvBlobs','Delete$4')" style="color:#6B696B;">Delete</a></td><td>thumbnails/1633758473471680000_549f111f-f1e4-4652-b886-d1b703740797</td><td>image/jpeg</td><td>3433</td><td>4/20/2009 6:01:35 PM</td><td>0x8CB8FF92DB10050</td>
        </tr><tr style="background-color:White;">
            <td><a href="javascript:__doPostBack('gvBlobs','Delete$5')" style="color:#6B696B;">Delete</a></td><td>thumbnails/1633758476929180000_5cc14527-64be-4e19-ba2a-5b19fd1f51dd</td><td>image/jpeg</td><td>3584</td><td>4/20/2009 6:07:20 PM</td><td>0x8CB8FF9FBC05040</td>
        </tr><tr style="background-color:#F7F7DE;">
            <td><a href="javascript:__doPostBack('gvBlobs','Delete$6')" style="color:#6B696B;">Delete</a></td><td>thumbnails/1633758477105033750_e25614be-d2a6-46d9-87f3-a0eb63a7b392</td><td>image/jpeg</td><td>4523</td><td>4/20/2009 6:08:42 PM</td><td>0x8CB8FFA2C29CEA0</td>
        </tr><tr style="background-color:White;">
            <td><a href="javascript:__doPostBack('gvBlobs','Delete$7')" style="color:#6B696B;">Delete</a></td><td>thumbnails/1633758478020658750_d56f76ad-9a26-46f2-ae0c-c7ce30d228ef</td><td>image/jpeg</td><td>5346</td><td>4/20/2009 6:10:13 PM</td><td>0x8CB8FFA62786520</td>
        </tr><tr style="background-color:#F7F7DE;">
            <td><a href="javascript:__doPostBack('gvBlobs','Delete$8')" style="color:#6B696B;">Delete</a></td><td>thumbnails/1633758478137773750_923ab9f2-3607-4665-8f59-45df1fcc3a77</td><td>image/jpeg</td><td>4205</td><td>4/20/2009 6:09:22 PM</td><td>0x8CB8FFA440486F0</td>
        </tr><tr style="background-color:White;">
            <td><a href="javascript:__doPostBack('gvBlobs','Delete$9')" style="color:#6B696B;">Delete</a></td><td>thumbnails/1633758479545430000_74ff03eb-878b-490e-808a-0f6792f726f7</td><td>image/jpeg</td><td>5058</td><td>4/20/2009 6:11:43 PM</td><td>0x8CB8FFA986DB810</td>
        </tr><tr style="background-color:#F7F7DE;">
            <td><a href="javascript:__doPostBack('gvBlobs','Delete$10')" style="color:#6B696B;">Delete</a></td><td>thumbnails/1633758479706752500_9a5a7c6f-1dd9-48bc-82b5-aaaa2c431b78</td><td>image/jpeg</td><td>3675</td><td>4/20/2009 6:13:01 PM</td><td>0x8CB8FFAC69E8480</td>
        </tr><tr style="background-color:White;">
            <td><a href="javascript:__doPostBack('gvBlobs','Delete$11')" style="color:#6B696B;">Delete</a></td><td>thumbnails/1633758480860273750_e54eee86-8ddb-44cb-82b8-badbaa1b2a8d</td><td>image/jpeg</td><td>3218</td><td>4/20/2009 6:13:54 PM</td><td>0x8CB8FFAE65235B0</td>
        </tr><tr style="background-color:#F7F7DE;">
            <td><a href="javascript:__doPostBack('gvBlobs','Delete$12')" style="color:#6B696B;">Delete</a></td><td>thumbnails/1633758482608086250_bfbd7e5a-026c-45ce-88f7-b6eb563af89b</td><td>image/jpeg</td><td>4567</td><td>4/20/2009 6:16:49 PM</td><td>0x8CB8FFB4E5FC870</td>
        </tr><tr style="background-color:White;">
            <td><a href="javascript:__doPostBack('gvBlobs','Delete$13')" style="color:#6B696B;">Delete</a></td><td>thumbnails/1633758482981283750_d41a21a7-def6-4688-ae29-74109b6050a7</td><td>image/jpeg</td><td>2909</td><td>4/20/2009 6:18:28 PM</td><td>0x8CB8FFB89EB7740</td>
        </tr><tr style="background-color:#F7F7DE;">
            <td><a href="javascript:__doPostBack('gvBlobs','Delete$14')" style="color:#6B696B;">Delete</a></td><td>thumbnails/1633758484541283750_6d03a107-dfc7-4551-8201-8052ddb9ec23</td><td>image/jpeg</td><td>4005</td><td>4/20/2009 6:21:04 PM</td><td>0x8CB8FFBE6BEBDB0</td>
        </tr>
    </table>
</div><span id="statusMessage" style="color:Red;"></span>
</div><span id="timer1" style="visibility:hidden;display:none;"></span>                    
                |0|hiddenField|__EVENTTARGET||0|hiddenField|__EVENTARGUMENT||8300|hiddenField|__VIEWSTATE|WR+UOP22CwPyX73JtlDmUmmPrRsHh+iBwiRDWCm+ViU00I+
...
+W3PbzKDhmGYLycE6Aw4kYh4TL842jUgYDkeXmfSwpIUW621XJxMRbpw6x4fJPslo2aJZPiGi6OuPuXXTGS0ozejw6pMwaDuWvI9EPxEnMQ+gojkKoAusxU6q+lA0benFiF9OlukXDn68uEK+oso0hoMV8wfDVBDWqG6bJi2kIUNPCiaNAzVRW1rxLJETlwtbl6d6LA=|0|hiddenField|__VIEWSTATEENCRYPTED||172|hiddenField|__EVENTVALIDATION|Hi0WJQfF/xpttnPCr4zm6hlQbOPlbRXR0yso6CJk9acjrOxqRWOw5l15ypXkVJ0jXv7svxpJ34Ob+UGRboSIp6t8xMB7n5mB7cnUqBIsqW7bFnn01Z5gvCxUajLJFx1mUs7XkUr4Yfsbj9w0xTzcL7IMJenC+riHNm7GSCJnONw=|0|asyncPostBackControlIDs|||0|postBackControlIDs|||4|updatePanelIDs||tup1|0|childUpdatePanelIDs|||3|panelsToRefreshIDs||up1|2|asyncPostBackTimeout||90|12|formAction||Default.aspx|38|pageTitle||Photo Gallery Azure Queue Test Harness|149|scriptBlock|ScriptPath|/ScriptResource.axd?d=9YtLxwU-nmRnm7oJ9nOfEaztduuiriMqe964NLCEARKknzUa7EJGulUSq-QKJyN3_XQG98ij__ElfezvDJkF-OgjZtff28LO1U1_MHbdocg1&t=ffffffff9a77c993|155|scriptStartupBlock|ScriptContentNoTags|Sys.Application.add_init(function() {
    $create(Sys.UI._Timer, {"enabled":true,"interval":1000,"uniqueID":"timer1"}, null, null, $get("timer1"));
});
|

The following table compares the Request, Response and total message sizes in bytes of the two Photo Gallery versions:

Project Version Request Header Request Payload Response Header Response Payload Total Message
Original

702

3,110

221

7,217

11,250

Enhanced

646

9,179

224

18,849

28,898

Estimated Data Egress and Ingress Charges Based on Amazon Web Services EC2

Microsoft hasn’t announced its pricing but says Azure Services will be “competitive.” Therefore, AWS posted prices are used to estimate data transfer charges.

1,000 simultaneous users of the enhanced version with an average of 15 saved thumbnails would generate (646 + 9,179) = 9.825 MB/s of data egress and (224 + 18,849) = 19.073 MB/s of data ingress from polling postbacks alone. This corresponds to (9.825 * 60 * 60 * 24)/1000 = 848.880 GB/day egress and (19.073 * 60 * 60 * 24)/1000 = 1647.9 GB/day ingress.

The AWS price for EC2 or S3 data ingress is US$ 0.10 per GB = $164.79/day.

Pricing for EC2 or S3 data egress is based on a monthly volume of (848.9 + 1647.9) GB * 30 = 74.9 GB/month = < 1 TB/month. The first 10 TB/month is US$ 0.17/GB for 848.9 GB/day = US$ 144.31/day.

Daily data transfer costs are US$ 164.79 + $ 144.31 = US$ 309.10/day = US$ 9273.09/month per 1,000 average simultaneous users.

Increasing the polling interval from 1 to 10 seconds would reduce the cost to US$ 927.31 /month but might cause unacceptable latency.

Estimated Data Storage Charges Based on Amazon Web Services S3

The average size of the *.png images is ~400 KB and of the thumbnails ~4 KB for a total of 15 * 404 KB = 6.060 MB/user * 1,000 users = 6.06 GB average. AWS charges $0.15/GB*month for S3 storage, so the monthly storage cost would be $0.91/month, which is not significant with 1,000 users.

I’ll run the enhanced version for 24 hours or so and report in an update the stats from the Azure Analytics data for Hosted Services and Storage Accounts.

I’d be very grateful if someone would check my calculations.


Updates 4/21/2009

Microsoft developer-evangelist Steve Marx added a comment to this post and a reply to my Scalability and Cost Issues with Windows Azure Web and Worker Role Projects – Live Demo thread in the Windows Azure forum. Steve’s point is:

[T]his has nothing to do with Windows Azure; it's just a question of how best to use AJAX to make a responsive UI.  The same optimizations would apply if you're hosting somewhere other than Windows Azure.

My point is that most Web developers don’t write polling apps very often and that Azure Queues with poorly designed code can lead to serious performance and cost problems. Microsoft has been taking a lot of heat lately for sample ASP.NET code and architectural recommendations that don’t meet the .NET Developer community’s definitions of best practices. This is another example.

Here’s the culprit method in the WebRole’s original _Default class:

protected void Page_PreRender(object sender, EventArgs e)
{    
    BlobContainer testBlob = GetPhotoGalleryContainer();
    thumbnails.DataSource = from o in GetPhotoGalleryContainer().ListBlobs("thumbnails/", false) select new { Url = ((BlobProperties)o).Uri };
    thumbnails.DataBind();
}

I tried wrapping the operative statements in an

if (GlobalClass.refreshData || !Page.IsPostBack)

block where GlobalClass.refreshData boolean variable is set true by the gvBlobs.RowDeleting() event handler and the WorkerRole’s GetMessage() loop and is set false after invoking the DataBind() method.

This updates the page immediately after deleting a thumbnail but, due to timing problems, doesn’t solve the problem with displaying additions immediately. In fact, added thumbnails never appear unless you close and reopen the service connection.

Following are the Hourly Network Usage metrics for 18 hours of continuous operation with (presumably) a single user connected to the oakleaf5 host:

The average for AJAX polling postbacks for the 18 hours is about 30 MB/hour * 24 = 720 MB per day, which is off by a factor of about 2.4 from the previously calculated 848.880 GB/day egress and (19.073 * 60 * 60 * 24)/1000 = 1647.9 GB/day ingress for 1,000 users = 2496.8 MB/day for a single user. Thus, I’m taking a second look at my calculations. Watch for an update later today.


Updates 4/22-24/2009

To make Steve Marx’s alternate polling approach work without throwing a JavaScript exception when adding a thumbnail, add EnablePageMethods=”true” to the ScriptManager declaration:

<asp:ScriptManager ID="sm1" runat="server" EnablePageMethods="true" />

To see your deletions occur immediately, you’ll need to set refreshData = true in your deletion method code.

Thanks to Steve Marx for the heads up on the missing EnablePageMethods attribute.

You can run a live demo of this version at http://oakleaf6.cloudapp.net/Default.aspx. Launch Fiddler2 to prove there’s no traffic when the client is quiescent (just connected to the Azure service.)

The 2.4x overcalculation of data ingress and egress load appears to be due to the actual average polling rate being 2.4 seconds, not the expected 1.0 seconds. More investigation as to the reason follows, but it’s probably due to the slow upstream speed of my AT&T DSL connection to the data center.