WonderPlunge

I’ll get a better post up with a lot more detail once I’m able to get a little more time. I just didn’t want to keep you in suspense any longer.

Thank you to everyone who was so generous and donated. All told, with online, offline and matching funds, we raised a staggering $3522.11. Overall the event raised a little over $26k. That’s an awesome amount of money and the Special Olympics of Michigan will make it stretch. However, they are not done yet – there are more plunges happening this around Michigan. In fact, a guy who is plunging because of me is Jeremy Lance – you should donate to his plunge at http://www.firstgiving.com/jer_.

In short, here is a short video showing the polar plunge itself.

Again – thank you to everyone who donated!

Display Name Date Amount  Comment
brian gorbett 2/13/2010 $100.00 even though i missed the plunge, u r awesome! 
Rebecca and Paul Foret 2/13/2010 $15.00  
Cal evans 2/13/2010 $25.00  
Michael Letterle 2/13/2010 $25.00 One of the many reasons you rock 
Mark Brown 2/13/2010 $50.00 Happy to help for a great cause. Match from MS to get you $100. 
Susan and Leon Holmes 2/13/2010 $25.00  
Brian Genisio 2/13/2010 $20.00  
Kevin 2/12/2010 $25.00  
Anonymous 2/12/2010 $35.00 Plunge Josh Plunge 
Vid Luther 2/12/2010 $51.00  
James Ward 2/12/2010 $50.00 Burrrr…. 
Drew Robbins 2/12/2010 $50.00  
James Bender 2/12/2010 $50.00 Good luck, that waters cold! 
Matt Davis 2/12/2010 $50.00  
Janet Keller 2/12/2010 $50.00 Hats off to you for that kind of commitment! Will be cheering from the fireside… 
Sazbean 2/12/2010 $50.00 Brr! Great cause! Get warm with a tasty beverage afterwards! – Sarah & Aaron 
Clark Sell 2/12/2010 $25.00 Stay Warm 
Dave Redding 2/12/2010 $50.00 Here’s to the SO. Get a descent camera man this time! 
Scott Watermasysk 2/12/2010 $25.00  
JRPendarvis and family 2/12/2010 $20.00  
Jim Holmes 2/12/2010 $100.00  
Anonymous 2/12/2010 $20.00  
ElizabethN 2/12/2010 $10.00 You rock, Josh! 
Larry Clarkin 2/12/2010 $25.00 Dive Deep! 
Anonymous 2/12/2010 $20.00  
Shawn S 2/11/2010 $20.00  
Scott MacVicar 2/11/2010 $100.00 Video or it didn’t happen 
Pablo Godel 2/11/2010 $50.00 Good luck! 
Evan 2/11/2010 $50.00 You must Chill! We have hidden your keys! 
The Detroit Java User Group 2/11/2010 $50.00  
Greg Malcolm 2/11/2010 $40.00 Setting light to the lake first is cheating! 
Jenn Brees 2/6/2010 $20.00  
Anonymous 2/5/2010 $25.00 Every1 has some sort of a special need.Some needs r > others. Thnk u 4 helping me w mine.-code junky 
see.clay 2/5/2010 $190.00 over the hump, thanks for the chats, some people you remember – for a reason 
Anonymous 2/5/2010 $20.00  
Anonymous 2/5/2010 $40.00 I’ll be thinking “Warm” thoughts for you. 
Liza Sisler 2/4/2010 $100.00 When you go to Ireland check out the ‘Forty Foot’ for Polar Plunge #2 
Nathan Hancock 2/3/2010 $100.00 Have Fun! 
Dawn 2/2/2010 $50.00 Not dunking you… just pushing you closer to the edge, Jer 
Greg 2/2/2010 $100.00 I expect to see you guys holding hands when you jump in! 
Martin L. Shoemaker 2/2/2010 $108.11 You’re a brave man, brother Josh! 
Chris Large 2/2/2010 $20.00 My pleasure… 
Matt Cowan 2/2/2010 $25.00 Way to go! 
Larry Siden 2/2/2010 $18.00 “18” in Hebrew letters spells “life”! 
Jason Chrispen 2/2/2010 $20.00 Good luck, sounds like a great cause. Make your daughter proud. 
aunt red 2/2/2010 $10.00 go jeremy, great cause 
Jacob Mullins 2/1/2010 $50.00 Rock on brother! 
Rob Allen 2/1/2010 $25.00  
Ashwin Karuhatty 2/1/2010 $50.00 I am proud of you!  
John Gilmour 2/1/2010 $25.00 Cold, cold, cold…. 
DeVaris Brown 2/1/2010 $50.00 Anything to help out brothaman 
Tim COrbett 2/1/2010 $30.00 Hope you reach your goal 
Joe Saul 1/31/2010 $50.00 Josh, I don’t know you, but I’m doing this because of Jer’s co-pledge, so make sure he goes in too! 
Hawthorne Property Services 1/31/2010 $100.00  
Dinah 1/31/2010 $5.00 Wish I could give more. I’ve done the jump and know how much fun it can be 🙂 good luck! 
Chris and Tracy Woodruff 1/31/2010 $25.00 Way to go Josh!! Stay warm!! 
Angela Dugan 1/31/2010 $100.00 My hubby does the jump every year, looks like, um, fun? 🙂 
Anonymous 1/31/2010 $20.00 Brrrrrr! 
Sadukie 1/30/2010 $25.00 Here’s to you and your Wonderpuzzle! 🙂 
Anonymous 1/30/2010 $20.00 Hey Josh, worked with you once a few years ago, but I too have a daughter with special needs. 🙂 
Ryan Weaver 1/30/2010 $25.00 Living and swimming in MI – you make me feel like a traitor 🙂 – love the cause 
Chris Coneybeer 1/29/2010 $35.05 For a great cause. Go Josh! 
Donna Bank 1/29/2010 $25.00 This gives new meaning for “COLD CASH”  
Keith “The Monkey” Casey 1/29/2010 $39.95 I want to see this one on video 🙂 
The Coffee Mill Cafe 2/12/2010 $100.00  
The Tackets 2/12/2010 $25.00  
Anonymous 2/12/2010 $100.00  
Matching funds   Over $600  

PHP/Ruby on Azure World Tour

I’m thrilled and honored to be doing another speaking tour through Europe. I’m getting to visit a number of countries that I haven’t visited before and some old favorites. I’ll be speaking on PHP, Ruby and other non .NET technologies on Azure.

The talk that I’m going to be doing in most places is PHP/Ruby on Azure or Leveraging Azure with Non-Microsoft Languages:

Windows Azure is Microsoft’s Cloud Computing offering. It is more than a simple scalable hosting option as it is truly a platform as a service offering. This allows you to focus on your application rather than the configuring and managing your infrastructure whether you are writing C# or VB.NET or even languages such as PHP or Ruby which are first class citizens in Windows Azure. The Windows Azure Platform includes Windows Azure, which is the OS and hosting environment for web and background services, as well as non-relational storage, queues, and a blob storage for everything from videos to mountable virtual drives. Additionally, the Windows Azure Platform includes SQL Azure, a fully relational database as a service, and Windows Azure AppFabric for industry standards compliant identity management and a service bus for message passing.

But there remain the questions around why, when and how you should move to the cloud, especially if you are using PHP or Ruby. Should I put everything in Windows Azure? Do you have to convert everything you have to ASP.NET? Do you have to write code specifically for Windows Azure? What if my current applications depend on MySQL and/or memcached?

There’s a lot of good news here as it is relatively straight forward to get running in Windows Azure. Once your application is running, however, now you need to look at how to fully leverage the platform offerings architecting for the best usage of the different roles and the various aspects of the Windows Azure offerings such as the AppFabric and SQL Azure. This will help your application make the most efficient usage of CPU, bandwidth, storage and all of the things that cost in a cloud hosting scenario.

In this half day session, we will begin with the why of Windows Azure talking about when it makes sense to make a move and what the prudent migration paths are for your organization.  During this time we will tour the various aspects of Windows Azure. Then we’ll delve into the technical aspects of how to run your PHP/Ruby code on Windows Azure. Once we have that mastered, we will move onto leveraging the Windows Azure platform to its fullest.

The full schedule is as follows (and yes, this is a lot of countries in not very many days)

Feb. 21 – Dublin Ireland – http://bit.ly/phpazuredublin

I love Ireland. I hope to someday live there. I spoke there about a year and a half ago on RIA and got to meet a few of the folk but mostly worked with Martha Rotter. I got to make a number of friends last time and I’m really looking forward to seeing them again.  

Feb 23 – Lisbon, Portugal – http://bit.ly/phpazurelisbon 

This is my first time to Portugal. I’m really looking forward to meeting the local DPE team (Luis Alves Martins and Sergio Martinho). I’m speaking at the university. it looks like a beautiful venue – http://bit.ly/avsYU9. I just wish that I had more time here to explore the local culture.

Feb 24 – Vienna, Austria – http://bit.ly/phpazurevienna 

My brother has spent a lot of time in Austria but I’ve never been. I have met Mario Szpuszta back when he and I both spoke at JAOO in 2008 in Denmark. That was an awesome conference. I’ll also get to met Rolf Mistelbacher. Another thing I’m really excited about is that I’m going to spend enough time to actually see some of the city.

Feb 26 – London, UK – Keynoting PHPUK – http://bit.ly/9l8IH0

At PHP UK, I’m actually not talking about Azure. Rather I’m doing a keynote titled The Lost Art of Simplicity (Full slides on slideshare). This is actually the original reason that I’m coming to Europe in the first place. I’m honored to be asked to do the keynote and am beholden to Scott MacVicar for the invitation and to Johanna Cherry for making everything work smoothly.

March 2 – Stockholm, Sweden – http://bit.ly/phpazurestockholm

Check out this awesome venue – http://bit.ly/cGTbC0 – it’s a 17th century building in downtown Stockholm. Really looking forward to hanging out in this space.

March 3 – Oslo, Norway – registration information coming soon

I’ve never been to Norway. I should have more information about this trip in the next day or so and I’ll update this post.

**Update**

I’ve got all of the registration information for my Oslo stop.

Auditorium (ground floor)

Lysaker Torg 45

Lysaker Akershus 1366

Norge

http://bit.ly/phpazureoslo for all of the registration information.

Also, as a side note I’ve met a bunch of people from Norway while at the PHPUK conference and they’ve assured me that the polar plunge was decent training for my visit but I’d enjoy it regardless.

March 4 – Amsterdam, The Netherlands – PHP User Group

I haven’t actually met Bram Veenhof in person but  have been working with him over the past couple of years on a couple of things.I’ve been to Amsterdam several times but mostly just to the Airport and the Microsoft offices there, both of which are awesome. I’m thrilled this time to actually have a little time to explore the city.

March 5 – Brussels, Belgium – http://bit.ly/phpazurebrussells

I’ve been to Brussels once before and I’m really looking forward to going back. I’ve not get Katrien De Graeve and Rudy Van Hoe but are two of the other people that I’ve been working with closely over the past couple of years.

March 6,7 – Kilkenny, Ireland – hanging out and speaking at Wordcamp Ireland

Again, I love Ireland and hope to live there someday. I’ll be in Kilkenny at Wordcamp Ireland.

It’s going to be a lot of fun and I’m really hoping that there’s lots of good conversation. Please let me know via comments or via twitter if you’re able to make it to one of the sessions.

If you tweet about this – please use the hash tag #phpazuretour and #cityyourecomingto!

Hello World Azure in PHP

Building on the Windows Azure Command Line Tools blog post, I thought we could kick it up a notch and get PHP running in Azure leveraging the command line tools. The primary thing that we need to do is to copy the PHP bits up with the rest of your deployment and configure the FastCGI handler to know where the PHP interpreter can be found.

If you have PHP installed, locate your directory. Otherwise, download one of the versions from http://windows.php.net/download/. I haven’t personally tested it with every possibly distribution but it should work with all of them up there.

To get started, setup a simple folder structure as before but with the addition of a folder called PHP:

>Project
        >WebRole
                 >php

Now copy the contents of the PHP download or your PHP install to the php folder.

Now add a file called index.php to the WebRole directory:

<html>
<head><title>Hello World PHP</title></head>
<body>

<?php
echo 'Today is '. date('Y-m-d') ."\n";
?>

</body>
</html>

The one other actual difference between the HTML version and the PHP version of this little hello world sample is that you need to add one more file to the WebRole directory called web.roleconfig.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.webServer>
    <fastCgi>
      <application fullPath="%RoleRoot%\approot\php\php-cgi.exe" />
    </fastCgi>
  </system.webServer>
</configuration>

On your own IIS server you would call this the web.config but in Azure, it’s called the web.roleconfig.

Now, just like in the other sample you need to set up your Config and Definition files.

Simple.csdef

<?xml version="1.0" encoding="utf-8"?>
<ServiceDefinition name="Simple" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition">
  <WebRole name="WebRole" enableNativeCodeExecution="true">
    <ConfigurationSettings>
    </ConfigurationSettings>
    <InputEndpoints>
      <!-- Must use port 80 for http and port 443 for https when running in the cloud -->
      <InputEndpoint name="HttpIn" protocol="http" port="80" />
    </InputEndpoints>
  </WebRole>
</ServiceDefinition>

Simple.cscfg

<?xml version="1.0"?>
<ServiceConfiguration serviceName="Simple" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration">
  <Role name="WebRole">
    <Instances count="1"/>
    <ConfigurationSettings>
    </ConfigurationSettings>
  </Role>
</ServiceConfiguration>

Package everything up with cspack.

c:\Project>cspack simple.csdef /copyonly
Windows(R) Azure(TM) Packaging Tool version 1.0.0.0
for Microsoft(R) .NET Framework 3.5
Copyright (c) Microsoft Corporation. All rights reserved.

And run in the dev fabric with csrun.

c:\Project>csrun simple.csx simple.cscfg
Windows(R) Azure(TM) Desktop Execution Tool version 1.0.0.0
for Microsoft(R) .NET Framework 3.5
Copyright (c) Microsoft Corporation. All rights reserved.

Using session id 1
Created deployment(31)
Started deployment(31)
Deployment input endpoint HttpIn of role WebRole at http://127.0.0.1:82/

Now you are ready to run and test

image 

And that’s all that there really is to getting PHP running in Azure. Soon I’ll blog about getting a full blown app running in Azure. Stay tuned.

Getting MySql Running on Azure

azure[1] There are a few applications that I’m playing with in Windows Azure that are reliant on MySql for various reason. For example, I’m working with a group that is doing Joomla development and it’s completely dependent on MySql. Mostly this is due to using MySql native drivers rather than using a database independent layer such as ADO.NET in .NET or PDO in PHP or leveraging database specific features that are only found in MySql. Regardless of the reason, for me to run these applications in Windows Azure, I have to get MySql running in Azure. I found that it wasn’t as hard as I initially thought it would be and it’s a technique that I can reuse for a lot of binary executables.

Thoughts and Recommendations

Before I go into the technical details of getting MySql working, I thought I should share what I think of running MySql in Windows Azure to save you the time of reading through all of this before I try to talk you out of it.

The reality is that even though you can run MySql in Windows Azure, it’s not overly practical to do so. My recommendation is to use this as a last resort or stopgap until Sql Server support for your application is ready to go. There are multiple reasons why this is my recommendation, some technical, some financial. None of them have to do with MySql itself but rather the process that you have to go through to run and manage it in Windows Azure.

First, let’s dig into the technical. The way that hosting MySql in Windows Azure working is that you create a worker role that will actually host the binary. You have to copy up the executable and then have just a little bit of Windows Azure specific code to actually execute the application and pipe requests to it. You can actually do that with just about any type of executable as long as it can be XCopy deployed and run headless. This could be especially good for things like doing distributed calculations.

With regards to mySql, however, one issue that I see with this is that you have to pay $0.12 an hour per web role that you have live which means that on average (at 0.12 * 24 * 30) you’re paying $86.40 a month for a single instance of MySql. That’s prior to having any type of failover or durability. SqlAzure is only $9.99 a month for a gig of storage.

If you want failover and durability, you need to run at least one extra instance of MySql in another worker role and configure them in a master/slave configuration. The reality is that you can get some fairly high durability with this configuration and it’s out of the box part of the Windows Azure MySQL PHP Solution Accelerator that we’re going to download in a moment.

Now, if you want to manage the MySql instances, you’ve got a couple of options. One of those is to run PHPMyAdmin which runs in a web role. Or you can connect to your MySql databases with a remote admin tool of some sort. Contrast that to being able to log into the Windows Azure admin page and administer your SQL Azure databases.

Getting MySql Running on Azure

Now that I’ve convinced you not to do this unless you absolutely have to, let’s dig into the technical steps of getting MySql running.

There’s a PDC talk that covers some of this material at Developing PHP and MySQL Applications with Windows Azure..

First, I wanted to get MySql running in Windows Azure.

  1. First, I downloaded the Windows Azure MySQL PHP Solution Accelerator. There’s a manual for that accelerator that lays out the rest of the requirements for getting MySql running in Windows Azure.
  2. The first requirement is MySql itself. I downloaded the XCopy deploy version of MySQL (http://dev.mysql.com/downloads/mysql/5.1.html#winx64).
  3. Next, since we are going to use PHPMyAdmin to administer the MySql databases, I downloaded PHP – http://windows.php.net/download
  4. And then, obviously, PHPMyAdmin – http://www.phpmyadmin.net/home_page/downloads.php.

Now that I had the basic requirements down for MySql running in Azure, there are a couple of steps that I had to take.

First, I installed the Windows Azure MySQL PHP Solution Accelerator and extracted MySql, PHP and PHPMyAdmin.

Then I ran the “Buildme.cmd” script that comes with the accelerator. That checked to see if the MySQL binaries were in the right place. Since I hadn’t done anything other than download and unzip MySQL, the Buildme.cmd script fixed that for me and copied them to the right directory (.\MySql_WorkerRole\mysql). BTW, this could take a little while. Then it asked me for the

Next thing is to open up the .\, I renamed php.ini-recommended to be php.ini and did a few edits.

  1. Change the extension_dir to be as follow:
    • extension_dir = “./ext”
  2. Uncomment (remove the ; from in front of the following:
    • extension=php_mbstring.dll
    • extension=php_mcrypt.dll
    • extension=php_mysql.dll

Second, I extracted PHPMyAdmin to a holding directory and made a few edits to /libraries/config.default.php.

  1. Search for ‘auth_type’ and ensure that it’s as follow:
    • $cfg[‘Servers’][$i][‘auth_type’] = ‘cookie’;
  2. Search for ‘AllowArbitraryServer’ and ensure that it’s as follows:
    • $cfg[‘AllowArbitraryServer’] = true;

Now that those edits are done we are almost ready to try running the MySql portion of this exercise in the DevFabric.  Last this is that I *highly* recommend changing the username/password from mysqluser/#ms123 to something else. Now we’re ready to test.

Before we do that, let’s take a quick peek at what the solution accelerator comes with.

First, there are 4 projects that are (or at least can be) deployed and a couple of helper folders.

  • MySql_WorkerRole – this is the primary application that we’re concerned about as it is the one that deploys MySql for us.
    • MySqlPHP – Windows Azure configuration bits for the projects
  • PHPMyAdminWebRole – this role packages up PHPMyAdmin and runs it in Azure.
  • InstanceManagerClient – this is an admin application that you can use to get command line access to the worker roles running MySql. This can be very useful for a lot of reasons. It connects to the InstanceManagerServer
    • InstanceManagerServer – this runs in each of the MySql_WorkerRole instances listening for connections from the InstanceManagerClient.
  • WorkerRole – Logging and maintenance worker role
  • Roles.Common – helper project
  • Test.Common – test project

Really, for this exercise we just care about the top three of those projects.

In the config project is the ServiceConfiguration.cscfg which has a worker role configured for MySql:

<?xml version="1.0"?>
<ServiceConfiguration . . .>
  <Role name="MySql_WorkerRole">
    <Instances count="3" />
    <ConfigurationSettings>
      <!--<Setting name="DataConnectionString" value="UseDevelopmentStorage=true" />-->
      <Setting name="TableStorageEndpoint" value="http://table.core.windows.net" />
      <Setting name="BlobStorageEndpoint" value="http://blob.core.windows.net" />
      <Setting name="DataConnectionString" value="DefaultEndpointsProtocol=https;AccountName=azuresolaccstorage;AccountKey=yQai0qLjF7lUTPy3pcf+j2xyjAKQnf7nCv2IYMIPPBWsqkGiOZqD/KMb9aolc9/kh41pm6XB5Zt0boBje7MXlg==" />
      <Setting name="DiagnosticsConnectionString" value="DefaultEndpointsProtocol=https;AccountName=azuresolaccstorage;AccountKey=yQai0qLjF7lUTPy3pcf+j2xyjAKQnf7nCv2IYMIPPBWsqkGiOZqD/KMb9aolc9/kh41pm6XB5Zt0boBje7MXlg==" />
      <Setting name="ContainerName" value="mysqlphp11" />
      <Setting name="FullBackupHour" value="06:00" />
      <Setting name="IncrementalBackupDuration" value="10" />
      <Setting name="RecycleThreadSleepTime" value="300" />
      <Setting name="EnableWindowsAzureDrive" value="False" />
      <Setting name="EnableBackup" value="True"/>
    </ConfigurationSettings>
  </Role>
. . .
</ServiceConfiguration>

Here’s where you configure if you want to use more than one instance (for failover and the like) and whether or not you want to actually write out to blob storage and all.

The second thing is a MySql_WorkerRole project. This is a C# project that does a little bit of very important work for us. To sum up, it copies the MySql bits out to Windows Azure, starts the process running and then monitors the health of the MySql server.

All we have to do now is deploy. To do that, run the Runme.cmd. This will package things up, copy them out to the development fabric, starts the various roles and then launches the browser.

Side note on the development experience – I’ll also warn you now that playing with the firewall on your dev box is a little tricky because every time that you redeploy it creates a new package and copies the MySql executables to a new location. That means that you pretty much have to open a incoming port rather than just authorizing the program unless you want to reauthorize the with your firewall every time.

Conclusions

Although I recommend using MySql on Windows Azure for stopgap and last resort, the awesome news is that with the Windows Azure MySQL PHP Solution Accelerator it’s actually not that hard to setup and works pretty well.

Windows Azure Command Line Tools

Josh Holmes - Erubycon 2009 - Day 2There are times that you just need to leverage the raw power that you can get from the command line. For example, if you are trying to script something or if you are on a machine that is not all tooled up with Visual Studio, Eclipse and the like and, believe it or not, there are times that it’s just a lot easier to get stuff done without an IDE in the way. Great news is that we’ve got a couple in the Windows Azure SDK called CSPack and CSRun that work wonders.

To that end, please enjoy this little tutorial on using the command line tools to create a very simple Azure package and deploying it up to the development fabric.

Before you even start you will need one of the Windows Azure SDKs installed. I’m testing this with the November 1.0 release.

First, create a directory where you will place your project. In that directory, create a directory called WebRole. At this point you will have

>Project
      >WebRole

In the WebRole directory, place the files that you want to be deployed with your Windows Azure package. For mine, I just created a very simple HTML file that looks as follows:

<html>
<head><title>Quick Sample</title></head>
<body>
This a quick sample. <br />
<img alt="Sample Photo" src="photo.jpg" />
</body>
</html>

In the root folder for your project, there are two files that you need to create. The first file is is the definition file. I called mine simple.csdef:

<?xml version="1.0" encoding="utf-8"?>
<ServiceDefinition name="Simple" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition">
  <WebRole name="WebRole" enableNativeCodeExecution="true">
    <ConfigurationSettings>
    </ConfigurationSettings>
    <InputEndpoints>
      <!-- Must use port 80 for http and port 443 for https when running in the cloud -->
      <InputEndpoint name="HttpIn" protocol="http" port="80" />
    </InputEndpoints>
  </WebRole>
</ServiceDefinition>

The second file is the configuration file. Mine is called simple.cscfg:

<?xml version="1.0"?>
<ServiceConfiguration serviceName="Simple" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration">
  <Role name="WebRole">
    <Instances count="1"/>
    <ConfigurationSettings>
    </ConfigurationSettings>
  </Role>
</ServiceConfiguration>

Now we are ready to start using the command line tools. The first one is called CSPack. What this tool does is create a deployment package for you.

c:\Project>cspack simple.csdef /copyonly
Windows(R) Azure(TM) Packaging Tool version 1.0.0.0
for Microsoft(R) .NET Framework 3.5
Copyright (c) Microsoft Corporation. All rights reserved.

If you look in your directory structure now, you’ll see a new folder called simple.csx. Check it out and you’ll see that what it’s done is create a very specific folder structure ready to deploy out to the dev fabric. This is done with the /copyonly option.

The next tool is the CSRun tool. This does the actual deployment out to the dev fabric and can even, if you so choose, launch the browser for you. You need to pass it the name of the ready to deploy directory that the CSPack tool created and the name of the service configuration file.

c:\Project>csrun simple.csx simple.cscfg
Windows(R) Azure(TM) Desktop Execution Tool version 1.0.0.0
for Microsoft(R) .NET Framework 3.5
Copyright (c) Microsoft Corporation. All rights reserved.

Using session id 1
Created deployment(31)
Started deployment(31)
Deployment input endpoint HttpIn of role WebRole at http://127.0.0.1:82/

Now you are ready to run and test

image

To find out more about these tools read Windows Azure SDK Tools Reference

Windows Azure Storage Services REST API

Hard DriveIn playing Windows Azure, I’ve started getting into the Windows Azure Storage Services REST API. The REST API gives developers from any languages and/or platforms access to all of the Storage from either inside of Windows Azure or outside. It supports both HTTP and HTTPS. With it you can do just about anything that you need to with Blobs, Queues and Tables.

For example, if you want to create a new table in the Windows Azure Table Storage you can just send it a little bit of XML that looks like this:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<entry xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
	xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
	xmlns="http://www.w3.org/2005/Atom">
  <title />
  <updated>2010-02-04T10:48:34.9840639-05:00</updated>
  <author>
    <name />
  </author>
  <content type="application/xml">
    <m:properties>
      <d:TableName>MyTableName</d:TableName>
    </m:properties>
  </content>
</entry>

There are a couple of small things that are a little wonky.

First, the URL is RESTish to be honest. Check out the last bit of this sample URL that does a search on a set of entities in a table:

http://myaccount.table.core.windows.net/Customers()?$filter=(Rating%20ge%203)%20and%20(Rating%20le%206)

That last part of the filter is something that’s the “ish” part. It’s the query that’s used to search the entities.

The second things that’s a wonky is that there are a handful of things that you can do from the native .NET libraries that you can’t do from the REST interfaces. For example, you can’t do LINQ from the REST interfaces. There are little things like that across all of the storage options but what it really says is that you should use the native libraries where possible.

Third thing that I found a little wonky but it kinda makes sense is that every request against the REST service has to have an authorization code. It is passed in as an HTTP header.

Authorization=”[SharedKey|SharedKeyLite] <AccountName>:<Signature>”

Anyways, I thought it was an interesting set of services and they are really useful especially if you’re doing something other than .NET.

Read more about them at Windows Azure Storage Services REST API

When to use what Microsoft Client Technology

I was asked earlier when to use what Microsoft client Technology. I thought about just sending a link to Michael Schroeder’s post but decided I should put in my own thoughts on the matter first.

At the heart of Michael’s post is this table.

WPF WPF XBAP Silverlight ASP.Net + AJAX
Client Windows XP SP2 (With .Net 3.0), Vista and obviously Windows 7 Internet Explorer + Windows XP SP2 (with .Net 3.0) & Vista FireFox, Mac Safari, Internet Explorer Any Web Browser
Deployment Downloadable Installer or ClickOnce Runs in Internet Explorer secure sandbox One-time install of Silverlight plug-in Web Page
When to use Programs that need access to Windows desktop files. Intranet applications for Windows-oriented companies. Rich Internet Applications for public-facing web sites General-purpose public-facing web sites

Here’s my 2 cents on the subject.

WPF

WPF is a fantastic choice for applications that need full access to the desktop for any number of reasons. That could be full 3D support, access to desktop files and the like. You can install these applications through XCopy, a full downloadable Installer or a ClickOnce installer. Where possible, I like to leverage the ClickOnce installer as it gives some amazing benefits around auto-update and keeps my application in a secure sandbox so deployment becomes really easy.

WPF XBAP

Just don’t use XBAPs anymore. This was an attractive option for Intranet applications back before Silverlight 2 and to a lesser degree Silverlight 3. However, now that Silverlight has the power that it does with .NET and OOB options and the like, opt for Silverlight anytime you would have considered XBAPs.

Silverlight

Silverlight is the right choice for any external facing Applications. But that’s the key. I really look at Silverlight not as an HTML replacement but a true application layer. That’s one of the central points in the talk that James Ward and I did at Web 2.0 Expo last year – http://www.slideshare.net/joshholmes/best-and-worst-practices-building-ria-with-adobe-and-microsoft.

ASP.NET + AJAX

ASP.NET + AJAX is the right choice for external facing, or even internal facing, web sites where the primary focus is information dispersal. That said, there are some amazing applications built with JavaScript in the browser.

Overall

The reality is that there are a lot of grey lines. WPF is getting a lot easier to deploy breaking down the traditional decision points between desktop and web applications. Rich Web Applications blur those lines as well and the reality is that they could be used to build a lot of applications that have historically been either written as full desktop applications or as web applications. Then on the web application side, JavaScript and the browser are getting faster, strong and easier to develop all the time so it’s becoming more of a viable application building set of technologies.

Windows Azure SDK 1.1

There’s an update to the Windows Azure SDK, version 1.1. The SDK extends Visual Studio 2008 and the upcoming Visual Studio 2010 RC making it easy to develop, debug, package and deploy Windows Azure Applications.

There’s a number of new things and a handful of bug fixes from the 1.0.

From the download page:

  • Windows Azure Drive: Enable a Windows Azure application to use existing NTFS APIs to access a durable drive. This allows the Windows Azure application to mount a page blob as a drive letter, such as X:, and enables easy migration of existing NTFS applications to the cloud.
  • OS Version Support: Allows a Windows Azure application to choose the appropriate Guest OS to run on in the cloud.
  • Bug Fixes
    • StorageClient: Expose account key from storage credentials, expose continuation tokens for pagination, and reduce maximum buffer size for parallel uploads.
    • Windows Azure Diagnostics: Fix path corruption for crash dumps, OnDemandTransfer now respects LogLevelFilter.
    • VS 2010: Improved packaging performance.
    • VS 2010: Support for linked files in Web projects.
    • VS 2010: Support for ASP.NET web project web.config transformations.
    • Certificate selection lists certificates from LocalMachine\My instead of CurrentUser\My.
    • Right click on Role under Roles folder to select whether to launch the browser against HTTP, HTTPS or not at all.

Windows Azure Tools for Microsoft Visual Studio includes:

  • C# and VB Project creation support for creating a Windows Azure Cloud Service solution with multiple roles.
  • Tools to add and remove roles from the Cloud Service.
  • Tools to configure each Role.
  • Integrated local development via the Development Fabric and Development Storage services.
  • Running and Debugging a Cloud Service in the Development Fabric.
  • Building and packaging of Cloud Service Packages.
  • Browsing to the Windows Azure Developer Portal.

Download details: Windows Azure Tools for Microsoft Visual Studio 1.1 (February 2010)

Taking The Polar Plunge Again

Josh Holmes doing the Polar PlungeLast year I did a Polar Plunge to raise money for the Special Olympics – Read about it at Taking The Polar Plunge.

I’m doing it again this year and have much loftier goals this year. Last year I raised $725.00 and this year I want to raise $1000.00 and inspire others to do the same. At the time of this writing, I’ve raised $500 personally and have inspired 2 others to do the dive with me.

clip_image002First, why in the world would I do this in the first place?

You may or may not know that I have a daughter with special needs. Her name is Maura. She’s 6 years old and while we don’t have a name for what she has the symptoms are that she has global delays and a seizure disorder. Despite this, she is one of the most passionate people that I know and approaches everything with wonder and excitement. She loves sports, playing with other kids and all kinds of activities. She’s amazing and an inspiration to me all the time.

She is not currently in Special Olympics but she will be soon so I’m supporting them now. I know that she will approach it like she does everything else with wonder and excitement.

Now, how can you help?

There are two easy ways to help with this year’s fundraising efforts, donate and/or plunge. The plunge that I’m doing is on Feb. 13th in Belleville, MI but you can plunge in any of their 19 locations and dates:

January 24
Lansing – Eagle Eye Golf Course
February 6, 2010

Stanton– Clifford Lake Inn
Muskegon – Fricano’s Muskegon Lake

February 13, 2010
Traverse City – Grand Traverse Resort & Spa
Cheboygan – Hoppies Bar & Grill
Belleville – Moose Lodge
Fenton – Fenton Moose Lodge

February 20, 2010
Jackson – Eagles Nest Restaurant
Mount Pleasant– CMU
Gaylord – Otsego Lake State Park
Ann Arbor – U of M
Grand Rapids – East Grand Rapids Middle School

February 27, 2010
Detroit – Roostertail
Saginaw/Bay City – Saginaw
Mecosta/Osceola – Chippewa Lake
Alpena – Burton’s Last Resort

February 28, 2010
Pinckney – Zukey Lake Tavern

March 20, 2010
Kalamazoo – Lawson Ice Arena
Marquette – Marquette Mountain

 

If you would rather just donate to my plunge, you can do so at Josh Holmes’ Polar Plunge Fundraising Page.

Either way, I thank you for your support!

If you are not able to support the Special Olympics of Michigan right now, please consider doing so in the future. You can see a lot great ways to get involved at http://somi.org/page.php?contentID=1233.