<?xml version="1.0" encoding="utf-8"?>
<feed xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom">
  <title>Syringe.Net.Nz</title>
  <link rel="alternate" type="text/html" href="http://www.syringe.net.nz/" />
  <link rel="self" href="http://www.syringe.net.nz/SyndicationService.asmx/GetAtom" />
  <icon>favicon.ico</icon>
  <updated>2010-07-20T20:24:02.02425+12:00</updated>
  <author>
    <name>Chris J.T. Auld</name>
  </author>
  <subtitle>Irregular Injection Of Opinion</subtitle>
  <id>http://www.syringe.net.nz/</id>
  <generator uri="http://www.dasblog.net" version="2.0.7180.0">DasBlog</generator>
  <entry>
    <title>Windows Azure Drives + SQL Compact 4 &amp;ndash; Part #1</title>
    <link rel="alternate" type="text/html" href="http://www.syringe.net.nz/2010/07/20/WindowsAzureDrivesSQLCompact4NdashPart1.aspx" />
    <id>http://www.syringe.net.nz/PermaLink,guid,0ebfe8e0-3017-482c-820c-f16902dc6ae9.aspx</id>
    <published>2010-07-20T20:24:02.02425+12:00</published>
    <updated>2010-07-20T20:24:02.02425+12:00</updated>
    <category term="Windows Azure" label="Windows Azure" scheme="http://www.syringe.net.nz/CategoryView,category,Windows%2BAzure.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
So there’s not a whole lots of stuff on the interweb that gets you started with drives
and SQL Compact 4 is only just out into the open. My need was for a lightweight database
for a sample app I’m building with <a href="http://www.59north.com">Chris Klug</a> for
our session at Tech Ed New Zealand.
</p>
        <p>
I thought I’d run quickly through how I got things going.
</p>
        <p>
          <strong>Getting the Bits<br /></strong>I grabbed the bits using the <a href="http://microsoft.com/web">Microsoft
Web Platform installer</a>. I wanted two things. 1) SQL Compact 4 CTP1 and; 2) The
Web Matrix tool.<br />
It’s hopefully fairly obvious why I needed SQL Compact. The reason I wanted Web Matrix
is because it’s currently the only tool I could find that will allow me to create
and edit SQL Compact databases.<br /></p>
        <p>
          <a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/trznaj5k_2.jpg">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="trznaj5k" border="0" alt="trznaj5k" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/trznaj5k_thumb.jpg" width="244" height="150" />
          </a>  <a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/ixuyzv04_2.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="ixuyzv04" border="0" alt="ixuyzv04" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/ixuyzv04_thumb.jpg" width="244" height="94" /></a></p>
        <p>
I’ll be using Visual Studio for much of this post; I’m guessing y’all know how to
get your mittens on that now.
</p>
        <p>
          <strong>Creating a Database<br /></strong>To build our database we’ll be using Web Matrix. It doesn’t have a specific
database designer that is independent of the site editor so we’ll need to create a
site and then create it in the context of our site.
</p>
        <p>
          <a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/mdhkuthy_2.jpg">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="mdhkuthy" border="0" alt="mdhkuthy" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/mdhkuthy_thumb.jpg" width="244" height="117" />
          </a>
          <br />
We’ll start from a template.
</p>
        <p>
          <a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/sepojgnz_2.jpg">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="sepojgnz" border="0" alt="sepojgnz" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/sepojgnz_thumb.jpg" width="244" height="174" />
          </a>
          <br />
…and create an empty site.
</p>
        <p>
Choose <em>Databases </em>from the left hand nav.
</p>
        <p>
          <a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/p2py5yin_2.jpg">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="p2py5yin" border="0" alt="p2py5yin" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/p2py5yin_thumb.jpg" width="244" height="154" />
          </a>
        </p>
        <p>
Choose to create a new database from the ribbon
</p>
        <p>
          <a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/1cx4dml5_2.jpg">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="1cx4dml5" border="0" alt="1cx4dml5" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/1cx4dml5_thumb.jpg" width="244" height="98" />
          </a>
        </p>
        <p>
Double click to select tables. And right click to add a new table
</p>
        <p>
          <a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/a5kbmcaw_2.jpg">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="a5kbmcaw" border="0" alt="a5kbmcaw" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/a5kbmcaw_thumb.jpg" width="241" height="244" />
          </a>
        </p>
        <p>
Create a basic table definition with a ContactID and ContactName. Use the Ribbon controls
to create new columns. Use a BigInt identity column for the ID and make it the Primary
Key.
</p>
        <p>
          <a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/ih4vdprv_2.jpg">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="ih4vdprv" border="0" alt="ih4vdprv" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/ih4vdprv_thumb.jpg" width="244" height="140" />
          </a>
        </p>
        <p>
Save the table as <em>Contact</em></p>
Close Web Matrix- our database has been created and saved into a subfolder of my documents.
Mine was at 
<p>
C:\Users\Chris Auld\Documents\My Web Sites\Empty Site\App_Data 
</p><p>
We need some data in our database. We could ahve used Web Matrix to do this but I
wanted to show another tool that allows us to execute raw SQL against the DB as it
may be more suited to some developers.
</p><p>
The tool in question is the SQL CE Toolbox (you’ll need the latest version which is
a standalone application)<br />
Grab it from here: <a title="http://sqlcetoolbox.codeplex.com/" href="http://sqlcetoolbox.codeplex.com/">http://sqlcetoolbox.codeplex.com/</a><br />
Don’t just install the VIsual Studio add-in version as at the time of writing it doesn’t
support the v4 sdf format.
</p><p>
Open the tool and right click to add a new connection
</p><p><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/wgaqiuot_2.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="wgaqiuot" border="0" alt="wgaqiuot" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/wgaqiuot_thumb.jpg" width="244" height="64" /></a></p><p>
Open the database file and test the connection
</p><p><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/ztpigimk_2.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="ztpigimk" border="0" alt="ztpigimk" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/ztpigimk_thumb.jpg" width="244" height="201" /></a></p><p>
Expand the tree to show our <em>Contact</em> table. Right click and choose ‘Script
as Insert’. This will create a template insert script for us.<br />
Enter some sensible (or stupid if you prefer) values and then execute the query. I
didn’t attempt to insert the identity column and so removed that from the query.
</p><p><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/slfl4yrk_2.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="slfl4yrk" border="0" alt="slfl4yrk" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/slfl4yrk_thumb.jpg" width="244" height="114" /></a></p><p>
Before we leave this tool click the Estimated Plan toolbar button. As long as you
have SQL Server Management Studio installed it’ll open that tool and hand over the
query plan text.
</p><p><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/43uma5oy_2.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="43uma5oy" border="0" alt="43uma5oy" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/43uma5oy_thumb.jpg" width="244" height="104" /></a><br />
That’s right folks. That is a graphical query plan graph of the query for my embedded
database. That’s pretty damn cool!
</p><p><strong>Getting Your Database Into Windows Azure Storage</strong></p><p>
Being a database we want our *.sdf file sitting in a WIndows Azure drive. There are
a bunch of ways we could do this:
</p><p>
- We could put it into our service package, create a drive on startup, copy to the
drive and then do a lazy check each time we start so it’s only done once.<br />
-We could create the whole VHD on the client machine and upload that to storage. This
removes any of the once only init code from our application. THis is the approach
I chose to use
</p><p>
We need to create a VHD. Hooray for Windows 7- this is trivial. If you are a hard-ass
like Steve Marx then you can use a <a href="http://blog.smarx.com/posts/serving-your-website-from-a-windows-azure-drive">batch
command to do this</a> but you all know that I’m not really a hard ass so I’ll do
the draggy droppy clicky clicky thing.
</p><p>
Open Disk Management. I’m a fan of the search box in the start menu- type ‘Disk Management’
and then select ‘Create and format hard disk partitions’
</p><p><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/ll3azfwj_2.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="ll3azfwj" border="0" alt="ll3azfwj" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/ll3azfwj_thumb.jpg" width="244" height="166" /></a></p><p>
Use the <em>Action </em>menu to <em>Create VHD. </em>Stick it somewhere useful like
the desktop as we’ll need to grab it later. You’ll want to choose a fixed size- I
chose to make it 100MB. You’ll only pay for the actual data you store on disk (not
the empty stuff) but more on that shortly.
</p><p><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/soyitaae_2.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="soyitaae" border="0" alt="soyitaae" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/soyitaae_thumb.jpg" width="244" height="233" /></a></p><p>
Once created you’ll need to Initialize the disk with an MBR
</p><p><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/mhcwels0_2.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="mhcwels0" border="0" alt="mhcwels0" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/mhcwels0_thumb.jpg" width="244" height="91" /></a></p><p>
.. and Format as NTFS
</p><p><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/0bubf4tl_2.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="0bubf4tl" border="0" alt="0bubf4tl" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/0bubf4tl_thumb.jpg" width="244" height="89" /></a></p><p><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/image_2.png"><img style="border-right-width: 0px; margin: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" class="wlDisabledImage" title="image" border="0" alt="image" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/image_thumb.png" width="244" height="191" /></a>\
</p><p>
The drive will now be available in Windows Explorer and we can copy our *.sdf file
across from the <em>My Web Sites </em>directory to our new VHD
</p><p>
Once we’ve copied it over we can go back and <em>Detach</em> the VHD
</p><p><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/hg2c3kjm_2.jpg"><img style="border-right-width: 0px; margin: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="hg2c3kjm" border="0" alt="hg2c3kjm" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/hg2c3kjm_thumb.jpg" width="244" height="128" /></a></p><p>
Now we can upload the VHD to Blob storage. Before you crack out your favourite Azure
storage client (I like <a href="http://www.cerebrata.com/products/cloudstoragestudio/">Cloud
Studio</a> from Cerebrata) you’ll need to want to check that it supports sparse Page
Blob uploads. Cloud Studio doesn’t so we’ll use the VHDUpload Tool from here: <a title="http://blogs.msdn.com/b/windowsazurestorage/archive/2010/04/11/using-windows-azure-page-blobs-and-how-to-efficiently-upload-and-download-page-blobs.aspx" href="http://blogs.msdn.com/b/windowsazurestorage/archive/2010/04/11/using-windows-azure-page-blobs-and-how-to-efficiently-upload-and-download-page-blobs.aspx">http://blogs.msdn.com/b/windowsazurestorage/archive/2010/04/11/using-windows-azure-page-blobs-and-how-to-efficiently-upload-and-download-page-blobs.aspx</a> I
took the liberty of building the tool: <a href="http://cid-331c152ae0a57e96.office.live.com/self.aspx/Public/VHDUploadTool.zip">VHDUpload</a></p><p><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/image_4.png"><img style="border-right-width: 0px; margin: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" class="wlDisabledImage" title="image" border="0" alt="image" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/WindowsAzureDrivesASimpleHow2_10236/image_thumb_1.png" width="244" height="232" /></a></p><p>
 
</p><p>
More in the Part 2 of this post tomorrow.
</p><img width="0" height="0" src="http://www.syringe.net.nz/aggbug.ashx?id=0ebfe8e0-3017-482c-820c-f16902dc6ae9" /></div>
    </content>
  </entry>
  <entry>
    <title>Windows Azure Certificates for Self management Scenarios</title>
    <link rel="alternate" type="text/html" href="http://www.syringe.net.nz/2010/05/03/WindowsAzureCertificatesForSelfManagementScenarios.aspx" />
    <id>http://www.syringe.net.nz/PermaLink,guid,b7933390-cb36-497e-8c86-6c32af691882.aspx</id>
    <published>2010-05-03T21:18:56.510125+12:00</published>
    <updated>2010-05-04T14:45:41.385125+12:00</updated>
    <category term="Windows Azure" label="Windows Azure" scheme="http://www.syringe.net.nz/CategoryView,category,Windows%2BAzure.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
The Windows Azure Management API uses x509 certificates to authenticate callers. In
order to make a call to the API you need to have a certificate with both public and
private key at the client and and the public key uploaded into the Azure portal. But,
if you then want to call the management API from your Windows Azure VMs then you’ll
also need to install the cert into the instances by defining them in the service definition
This post will show you how.
</p>
        <p>
I found it a bit of a pain to get going so here’s my simple guide. I used this to
setup the certs for my favourite open source Azure toolkit <a href="http://lokadcloud.codeplex.com/">Lokad-Cloud</a>.
We’ll be creating a self signed certificate, then uploading that certificate into
the Windows Azure management portal. Finally we’ll add the certificate to our service
model to ensure that Windows Azure installs the certificate into our VM instance when
it is started.
</p>
        <p>
Here’s the approach in pictures so you can follow along.
</p>
        <ol>
          <li>
Create a self signed certificate in the IIS7 Manager<br />
Open IIS7 Manager<br /><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_2.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_thumb.png" width="244" height="74" /></a>  
</li>
          <li>
Expand the node for your local machine<br /><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_4.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_thumb_1.png" width="244" height="95" /></a>  
</li>
          <li>
Double Click Server Certificates<br /><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_6.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_thumb_2.png" width="244" height="89" /></a></li>
          <li>
Choose Create Self-Signed Certificate<br /><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_8.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_thumb_3.png" width="226" height="152" /></a></li>
          <li>
Give it a friendly name<br /><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_10.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_thumb_4.png" width="244" height="56" /></a></li>
        </ol>
        <p>
You’re all done in IIS7 Manager. It’s just created a new Certificate and added this
into the trusted root certification authorities on your machine. This is a highly
trusted location for the cert so do be careful if you ever export it with the private
key included.
</p>
        <p>
We need to export it with the public key included so that we can upload it to the
Windows Azure Portal.
</p>
        <ol>
          <li>
Run CertMgr.msc - just type it in full into the Start box.<br /><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_12.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_thumb_5.png" width="244" height="40" /></a></li>
          <li>
Expand 'Trusted Root Certificates Authorities –&gt; Certificates"’<br /><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_16.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_thumb_7.png" width="208" height="205" /></a></li>
          <li>
Find your cert using the friendly name column and right click and choose Export<br /><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_18.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_thumb_8.png" width="244" height="41" /></a></li>
          <li>
Choose the option to <strong>NOT </strong>export the public key. You should generally
avoid exporting the public key if at all possible*. 
</li>
          <li>
Choose to export as a DER Encoded binary 
</li>
          <li>
Save it somewhere useful – we stick ours into source control 
</li>
          <li>
Choose Export again, but, this time choose to export the private key<br />
Leave the PFX options all unchecked<br /><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_42.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_thumb_18.png" width="244" height="222" /></a></li>
          <li>
Give it a sensible name.</li>
        </ol>
        <p>
You’re all done exporting. Now we need to upload it to Azure.
</p>
        <ol>
          <li>
Go to the Windows Azure Portal 
</li>
          <li>
Choose the appropriate project<br /><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_20.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_thumb_9.png" width="244" height="86" /></a></li>
          <li>
Click the Account tab across the top of the page<br /><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_22.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_thumb_10.png" width="244" height="52" /></a></li>
          <li>
Click Manage My API Certificates<br /><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_24.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_thumb_11.png" width="244" height="78" /></a></li>
          <li>
Browse to and upload your *.cer file you created earlier<br /><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_26.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_thumb_12.png" width="244" height="36" /></a></li>
          <li>
You should now see the certificate listed against the account.<br />
Note that it’ll be listed using the Subject rather than the friendly name. So you’ll
need to identify it by the thumbprint if you have multiple uploaded from the same
machine. Azure Team: Can we please have the friendly name listed here?<br /><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_28.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_thumb_13.png" width="244" height="132" /></a></li>
        </ol>
        <p>
Now we’re ready to use our certificate from the Windows Azure Tools for Visual Studio
</p>
        <ol>
          <li>
Open your Windows Azure Project – We’re using Lokad-Cloud here 
</li>
          <li>
Expand the Cloud Project to show the Roles.<br /><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_30.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_thumb_14.png" width="244" height="241" /></a></li>
          <li>
Right click the Web Role and choose properties<br /><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_32.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_thumb_15.png" width="244" height="153" /></a><br />
This will open the Snazzy Windows Azure graphical UI. This is much nice than editing
the Model XML by hand. 
</li>
          <li>
Choose the Certificates Tab<br /><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_34.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_thumb_16.png" width="136" height="244" /></a></li>
          <li>
In our case there is already a certificate entry defined by the default Lokad Model
definition.<br />
Click the elipses (…) at the end of the thumbnail column to open the certificate chooser
dialog.<br /><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_36.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_thumb_17.png" width="244" height="52" /></a></li>
          <li>
Choose the cert from the dialog<br /><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_40.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_thumb_19.png" width="198" height="244" /></a></li>
          <li>
Repeat for the worker role</li>
        </ol>
        <p>
The last thing we need to do is upload the certificate into our cloud service before
we can upload our packages. 
</p>
        <ol>
          <li>
Create a new Cloud Service 
</li>
          <li>
Browse to the bottom of the page to find certificates and choose Manage<br /><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_38.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_thumb_6.png" width="244" height="152" /></a></li>
          <li>
Browse for your certificate (including the private key) 
</li>
          <li>
Punch in your password and hit upload 
</li>
          <li>
Confirm that you’re all uploaded.<br /><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_44.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_thumb_20.png" width="244" height="37" /></a><br /></li>
        </ol>
        <p>
You’re all done. Now you can happily deploy the app to Windows Azure along with having
your certificate deployed into your Azure instances as well. This means that your
Azure roles can now call the management API themselves.
</p>
        <p>
*There will be times when you need to export the public key. We’ve had to do that
in this scenario as we actually want to install the private key into our Azure instances.
Another good example here is in a shared development environment. You have the option
of either sharing a certificate among everyone or each uploading your own public key.
Because we’re using the lokad tool and this explicitly supports just a single cert
we’ve actually exported our cert (password protected) into our source control system
so all developers can install the same private key.<br /></p>
        <p>
If you have done an export and want to install the private cert onto a new machine
then you’ll need to add it into the Local Computer –&gt; Personal store.
</p>
        <ol>
          <li>
Run MMC by typing MMC in the start run box</li>
          <li>
Add the Certificates Snapin<br /><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_46.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_thumb_21.png" width="244" height="161" /></a><br /><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_48.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_thumb_22.png" width="244" height="172" /></a></li>
          <li>
Choose Computer Account<br /><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_50.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_thumb_23.png" width="244" height="181" /></a></li>
          <li>
Choose local computer</li>
          <li>
Open the Personal Store and choose More Actions&gt;Import<br /><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_52.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/TheUltimateGuidetoWindowsAzureManagement_E94C/image_thumb_24.png" width="244" height="67" /></a></li>
          <li>
Browse to and import your certificate.</li>
        </ol>
        <p>
The certificate should now be visible in the Windows Azure Tools for VS.NET cert selector
dialog.
</p>
        <img width="0" height="0" src="http://www.syringe.net.nz/aggbug.ashx?id=b7933390-cb36-497e-8c86-6c32af691882" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Windows Azure Pricing Calculator Spreadsheet</title>
    <link rel="alternate" type="text/html" href="http://www.syringe.net.nz/2010/04/20/WindowsAzurePricingCalculatorSpreadsheet.aspx" />
    <id>http://www.syringe.net.nz/PermaLink,guid,9366bfd0-5df9-48d5-94a2-87030d59cc84.aspx</id>
    <published>2010-04-21T09:06:10.883125+12:00</published>
    <updated>2010-04-21T09:30:38.96125+12:00</updated>
    <category term="Windows Azure" label="Windows Azure" scheme="http://www.syringe.net.nz/CategoryView,category,Windows%2BAzure.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
I’ve mentioned this at a heap of sessions I’ve presented at and have never managed
to get around to posting it.
</p>
        <p>
So. Attached is my Windows Azure Pricing spreadsheet.
</p>
        <p>
Pretty simple. has three worksheets.
</p>
        <ol>
          <li>
A simple Table storage calculator that determines the cost of table storage.<br />
This includes overhead calculation – i.e. what is the ration of name to value in your
name/value pairs<br />
It also checks your key lengths fall within the 260 char URI limit and a few other
things. 
</li>
          <li>
A model of session state pricing.<br />
Basically shows that SQL Azure will typically be a cheaper option for Session state
storage (or anything with little data on disk and high read/write counts). 
</li>
          <li>
A detailed (very detailed) model of PhluffyPhotos.<br /></li>
        </ol>
        <p>
For more detail please see my MIX10 session on Storage in Windows Azure Platform
</p>
        <p>
          <a title="http://live.visitmix.com/MIX10/Sessions/EX11" href="http://live.visitmix.com/MIX10/Sessions/EX11">http://live.visitmix.com/MIX10/Sessions/EX11</a>
        </p>
        <iframe style="padding-bottom: 0px; background-color: #fcfcfc; padding-left: 0px; width: 98px; padding-right: 0px; height: 115px; padding-top: 0px" title="Preview" marginheight="0" src="http://cid-331c152ae0a57e96.skydrive.live.com/embedicon.aspx/Public/Pricing%20Calculators.xlsx" frameborder="0" marginwidth="0" scrolling="no">
        </iframe>
        <img width="0" height="0" src="http://www.syringe.net.nz/aggbug.ashx?id=9366bfd0-5df9-48d5-94a2-87030d59cc84" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Chris and Dave do Denniston</title>
    <link rel="alternate" type="text/html" href="http://www.syringe.net.nz/2010/01/07/ChrisAndDaveDoDenniston.aspx" />
    <id>http://www.syringe.net.nz/PermaLink,guid,093073bd-e467-4e65-9c7a-48e5c1b957cc.aspx</id>
    <published>2010-01-08T06:42:29.458+13:00</published>
    <updated>2010-01-08T06:42:29.458+13:00</updated>
    <category term="Adventure Sports" label="Adventure Sports" scheme="http://www.syringe.net.nz/CategoryView,category,Adventure%2BSports.aspx" />
    <category term="Gettin Fit" label="Gettin Fit" scheme="http://www.syringe.net.nz/CategoryView,category,Gettin%2BFit.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
Denniston is a former coal mining area situated on an alpine plateau about 30km North
of Westport on the West Coast of New Zealand (<a href="http://en.wikipedia.org/wiki/Denniston_Incline">Wikipedia
here</a>). It was actually an active mining area right up until the 1960’s. In recent
years it has fallen under the ambit of the <a href="http://www.doc.govt.nz">Department
of Conservation</a>. Along with the <a href="http://www.cyclebuller.co.nz/">Buller
Cycling club</a> they have been building out a bunch of Mountain Bike tracks around
the area.
</p>
        <p>
You can pull details on the cycling area from the DoC site and from the Buller Cycling
club.<br /><a title="http://www.doc.govt.nz/parks-and-recreation/places-to-visit/west-coast/buller-area/denniston/activities/mountain-bike-tracks/" href="http://www.doc.govt.nz/parks-and-recreation/places-to-visit/west-coast/buller-area/denniston/activities/mountain-bike-tracks/">http://www.doc.govt.nz/parks-and-recreation/places-to-visit/west-coast/buller-area/denniston/activities/mountain-bike-tracks/</a> <br /><a title="http://www.cyclebuller.co.nz/index.php?option=com_content&amp;view=category&amp;layout=blog&amp;id=19&amp;Itemid=3" href="http://www.cyclebuller.co.nz/index.php?option=com_content&amp;view=category&amp;layout=blog&amp;id=19&amp;Itemid=3">http://www.cyclebuller.co.nz/index.php?option=com_content&amp;view=category&amp;layout=blog&amp;id=19&amp;Itemid=3</a> 
</p>
        <p>
Dave and I decided we’d try and visit the tracks as part of our summer South Island
road trip. We drove in via Murchison as we did some paddling along the way. We had
a couple of days in the Murchison region where the water levels were well up. Paddled
a few runs that I’ve done before as well as a new run down the mangles that started
with about a 2m waterfall- pulled quite a crowd when we ran that one for some reason…
didn’t seem that difficult.<br /><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1052395.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="The crew on the Middle Matakitaki river" border="0" alt="The crew on the Middle Matakitaki river" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1052395_thumb.jpg" width="244" height="184" /></a><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1052392.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Whitewater shuttles of doom." border="0" alt="Whitewater shuttles of doom." src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1052392_thumb.jpg" width="244" height="184" /></a></p>
        <p>
We drove into Westport the evening before we planned to ride and found ourselves a <a href="http://www.bullerbridgemotel.co.nz/">nice
motel (Buller Bridge Motel)</a> with free WiFi. Got up early and headed up the hill.
This place really is quite the plateau. The hill rises steeply off the ocean almost
to an altitude of about 650m at the carpark. The views were pretty good for us; on
a really fine and still day I can imagine you’d be able to see all the way up to <a href="http://www.karameainfo.co.nz/">Karamea</a>.
</p>
        <p>
        </p>
        <p>
Once we got to the top we had a bit of a potter around looking at some of the old
mining ruins. Denniston is famous for the Denniston Incline which is a frighteningly
steep, two pitch, coal railway that literally goes straight up the side of the hill.
Check out this <a href="http://www.teara.govt.nz/en/coal-and-coal-mining/3/6">video
from the NZ Archives</a> for an idea of what it was like.
</p>
        <p>
          <a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062399.jpg">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Below the carpark. Looking down to the incline top loading yard." border="0" alt="Below the carpark. Looking down to the incline top loading yard." src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062399_thumb.jpg" width="244" height="184" />
          </a>
          <a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062401.jpg">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Walking among the wagons in the loading yard" border="0" alt="Walking among the wagons in the loading yard" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062401_thumb.jpg" width="244" height="184" />
          </a>
          <a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062402.jpg">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Looking down the incline!" border="0" alt="Looking down the incline!" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062402_thumb.jpg" width="184" height="244" />
          </a>
        </p>
        <p>
Then we headed up the hill to the Museum Car park which is the designated starting
place for the Mountain Biking trails. While getting organized we saw the Google Car
driving around- yes, even in the middle of bloody nowhere there is Google!
</p>
        <p>
          <a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062408.jpg">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Getting organized at the museum" border="0" alt="Getting organized at the museum" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062408_thumb.jpg" width="244" height="184" />
          </a>
          <a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062407.jpg">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Google car. Ho9pefully we'll be able to see ourselves!" border="0" alt="Google car. Ho9pefully we'll be able to see ourselves!" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062407_thumb.jpg" width="244" height="184" />
          </a>
        </p>
        <p>
We started out with the Ropers Hotel Circuit.<br /><a title="http://www.cyclebuller.co.nz/attachments/011_MTB%20-%20Denniston%20-%20Ropers%20Hotel%20Circuit.pdf" href="http://www.cyclebuller.co.nz/attachments/011_MTB%20-%20Denniston%20-%20Ropers%20Hotel%20Circuit.pdf">http://www.cyclebuller.co.nz/attachments/011_MTB%20-%20Denniston%20-%20Ropers%20Hotel%20Circuit.pdf</a> <br />
Straight away the riding was quite different to anything we’d ridden before in New
Zealand. Lots of slick rock and ledges. Was quite fast riding and reasonably hard
on the suspension. A 6” trail bike is ideal- we had a Trance and a Mojo. The last
part of this track before it hits the road is walking only- for ecological reasons
rather than ride-ability. You definitely want to do this track in the predominant
direction indicated on the map as it would be a pain to walk up that hill.
</p>
        <p>
Next we rode out on one of the longer trails. This was nominally on 4WD track but
I’d challenge most people to take their 4WD there and get it back in one piece. The
track was Sullivans Circuit and it went off the other side of the Plateau back down
towards Westport.<br /><a title="http://www.cyclebuller.co.nz/attachments/011_MTB%20-%20Denniston%20-%20Sullivans%20Circuit.pdf" href="http://www.cyclebuller.co.nz/attachments/011_MTB%20-%20Denniston%20-%20Sullivans%20Circuit.pdf">http://www.cyclebuller.co.nz/attachments/011_MTB%20-%20Denniston%20-%20Sullivans%20Circuit.pdf</a> 
</p>
        <p>
          <a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062413.jpg">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Looking up towards Mt Rochfort" border="0" alt="Looking up towards Mt Rochfort" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062413_thumb.jpg" width="184" height="244" />
          </a>
          <a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062414.jpg">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="More ruins. We think the top of the old aerial ropeway" border="0" alt="More ruins. We think the top of the old aerial ropeway" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062414_thumb.jpg" width="244" height="184" />
          </a>  
<br /><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062415.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="P1062415" border="0" alt="P1062415" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062415_thumb.jpg" width="244" height="67" /></a><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062416.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="P1062416" border="0" alt="P1062416" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062416_thumb.jpg" width="244" height="64" /></a></p>
        <p>
This track had plenty of challenging riding. Lots of large rocks and ledges. it was
all too easy to go far faster than 0.1mm of lycra really should justify.
</p>
        <p>
          <a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062417.jpg">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="P1062417" border="0" alt="P1062417" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062417_thumb.jpg" width="184" height="244" />
          </a>
          <a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062422.jpg">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="P1062422" border="0" alt="P1062422" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062422_thumb.jpg" width="184" height="244" />
          </a>
          <a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062425.jpg">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Just a little off" border="0" alt="Just a little off" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062425_thumb.jpg" width="184" height="244" />
          </a>
        </p>
        <p>
Finally we rode the Miners and Drill track circuits. Again, lots of hairy riding with
a bunch of sketchy single track, some of which we both had to walk.
</p>
        <p>
          <a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062427.jpg">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Gratuitous Bike Porn" border="0" alt="Gratuitous Bike Porn" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062427_thumb.jpg" width="184" height="244" />
          </a>
          <a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062429.jpg">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Riding the Slick Rock" border="0" alt="Riding the Slick Rock" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062429_thumb.jpg" width="244" height="183" />
          </a>
          <a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062446.jpg">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Self Porttrait" border="0" alt="Self Porttrait" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062446_thumb.jpg" width="244" height="184" />
          </a>
        </p>
        <p>
There was still plenty of sign of the old coal mining stuff and indeed the coal itself.
</p>
        <p>
          <a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062450.jpg">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Coal mine fire" border="0" alt="Coal mine fire" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062450_thumb.jpg" width="244" height="184" />
          </a>
          <a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062452.jpg">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Coal seam" border="0" alt="Coal seam" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062452_thumb.jpg" width="244" height="184" />
          </a>
        </p>
        <p>
Despite only doing about 30km (in 3.15hr!) we were in need of a beer once we got back
to the car.
</p>
        <p>
          <a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062456.jpg">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Post ride beer time" border="0" alt="Post ride beer time" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062456_thumb.jpg" width="184" height="244" />
          </a>
          <a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062460.jpg">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Some amazing Rata trees on West Coast. This is a small one!" border="0" alt="Some amazing Rata trees on West Coast. This is a small one!" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/P1062460_thumb.jpg" width="184" height="244" />
          </a>
        </p>
        <p>
Here’s the GPS dump
</p>
        <p>
          <a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/image_2.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/ChrisandDavedoDenniston_12C74/image_thumb.png" width="244" height="209" />
          </a>
        </p>
        <p>
And the full TCX file of my Garmin 310XT is here: 
<br /><a title="http://connect.garmin.com/activity/21786909" href="http://connect.garmin.com/activity/21786909">http://connect.garmin.com/activity/21786909</a></p>
        <img width="0" height="0" src="http://www.syringe.net.nz/aggbug.ashx?id=093073bd-e467-4e65-9c7a-48e5c1b957cc" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Interesting Stats from 2009</title>
    <link rel="alternate" type="text/html" href="http://www.syringe.net.nz/2010/01/01/InterestingStatsFrom2009.aspx" />
    <id>http://www.syringe.net.nz/PermaLink,guid,0f53b727-f37e-4f32-a861-e01ac316485f.aspx</id>
    <published>2010-01-01T16:42:44.36425+13:00</published>
    <updated>2010-01-01T16:42:44.36425+13:00</updated>
    <category term="Adventure Sports" label="Adventure Sports" scheme="http://www.syringe.net.nz/CategoryView,category,Adventure%2BSports.aspx" />
    <category term="Gettin Fit" label="Gettin Fit" scheme="http://www.syringe.net.nz/CategoryView,category,Gettin%2BFit.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
Thought it would be interesting to do a blog post of my stats for 2009.
</p>
        <p>
It was a pretty hellish year for travel. It’s the first full year that I’ve used <a href="http://www.tripit.com">TripIt</a> which
has proved to be a really useful tool. TripIt also provides travel stats.<br /><a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/InterestingStatsfrom2009_EAE9/image_2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/InterestingStatsfrom2009_EAE9/image_thumb.png" width="207" height="201" /></a></p>
        <p>
Now not all of this was work travel (I had a couple of overseas holidays) but it was
still a pretty full on year.
</p>
        <p>
This is borne out in my exercise stats. Obviously my most exercised location was Wellington,
but, I also did a whole heap in Issaquah, Washington and also in Bangalore, India.
</p>
        <p>
          <a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/InterestingStatsfrom2009_EAE9/Num.%20activities%20-%20Location_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Num. activities - Location" border="0" alt="Num. activities - Location" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/InterestingStatsfrom2009_EAE9/Num.%20activities%20-%20Location_thumb.png" width="644" height="388" />
          </a>
        </p>
        <p>
I remained pretty steady over the course of the year in terms of the amount of exercise
I did. It was still really hard to maintain anything approaching a good training program
though.
</p>
        <p>
          <a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/InterestingStatsfrom2009_EAE9/image_4.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/InterestingStatsfrom2009_EAE9/image_thumb_1.png" width="644" height="345" />
          </a>
        </p>
        <p>
Once again it was a shitty year for me skiing wise, though these stats do miss out
a bit of skiing I had in January. I also did far less mountain biking than I would
have liked to.
</p>
        <p>
          <a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/InterestingStatsfrom2009_EAE9/Time%20-%20Category_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Time - Category" border="0" alt="Time - Category" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/InterestingStatsfrom2009_EAE9/Time%20-%20Category_thumb.png" width="644" height="388" />
          </a>
        </p>
        <p>
        </p>
        <p>
        </p>
        <p>
        </p>
        <p>
        </p>
        <p>
I did do over 300hr of exercise over the year and travelled 2700km. I also burned
65,000 calories.
</p>
        <p>
Will be interesting to see what I can manage this year.
</p>
        <img width="0" height="0" src="http://www.syringe.net.nz/aggbug.ashx?id=0f53b727-f37e-4f32-a861-e01ac316485f" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Microsoft Office Extensions to the Open XML File Format (ISO29500) Specification</title>
    <link rel="alternate" type="text/html" href="http://www.syringe.net.nz/2009/10/21/MicrosoftOfficeExtensionsToTheOpenXMLFileFormatISO29500Specification.aspx" />
    <id>http://www.syringe.net.nz/PermaLink,guid,1757e4da-f7fa-4ddd-a197-0ee0e95e2758.aspx</id>
    <published>2009-10-22T12:37:28.609375+13:00</published>
    <updated>2009-10-22T12:37:28.609375+13:00</updated>
    <category term="Office2010" label="Office2010" scheme="http://www.syringe.net.nz/CategoryView,category,Office2010.aspx" />
    <category term="SPC09" label="SPC09" scheme="http://www.syringe.net.nz/CategoryView,category,SPC09.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
So the question was asked today in my Open XML Development for Office 2010 and beyond
as to whether the Word 2010 Extensions documentation was available anywhere.
</p>
        <p>
I had to take an action item to follow up and find this.
</p>
        <p>
It can be found here: <a title="http://msdn.microsoft.com/en-us/library/dd773189.aspx" href="http://msdn.microsoft.com/en-us/library/dd773189.aspx">http://msdn.microsoft.com/en-us/library/dd773189.aspx</a></p>
        <img width="0" height="0" src="http://www.syringe.net.nz/aggbug.ashx?id=1757e4da-f7fa-4ddd-a197-0ee0e95e2758" />
      </div>
    </content>
  </entry>
  <entry>
    <title>My Hopeless Gym Experience at the Mandalay Bay Spa</title>
    <link rel="alternate" type="text/html" href="http://www.syringe.net.nz/2009/10/19/MyHopelessGymExperienceAtTheMandalayBaySpa.aspx" />
    <id>http://www.syringe.net.nz/PermaLink,guid,4369fbf2-8c56-4b1f-8fd6-aa92261da1be.aspx</id>
    <published>2009-10-20T03:43:18.65625+13:00</published>
    <updated>2009-10-20T03:46:24.859375+13:00</updated>
    <category term="Gettin Fit" label="Gettin Fit" scheme="http://www.syringe.net.nz/CategoryView,category,Gettin%2BFit.aspx" />
    <category term="SPC09" label="SPC09" scheme="http://www.syringe.net.nz/CategoryView,category,SPC09.aspx" />
    <category term="Travel" label="Travel" scheme="http://www.syringe.net.nz/CategoryView,category,Travel.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
So… I genuinely object to paying US$20/day to use the hotel gym. But, needs must sometimes
and so it was that I found myself at the Mandalay Bay Spa  $20 the poorer this
morning. Been working reasonably hard in the build up to the K1 road race in a couple
of weeks so needed to get some time in on the stationary trainer.
</p>
        <p>
Well, what an utterly useless experience that was. I got inside the Gym to find that;
</p>
        <ol>
          <li>
They had two consumer grade exercycles and that was it as far as bikes went.</li>
          <li>
None of the cardio equipment was available anyway</li>
        </ol>
        <p>
So even if I had been able to get on the equipment it wouldn’t have been much good
for the Interval workout I had planned- I ripped the crank off a consumer grade exercycle
in Bangalore this year so it’s just downright dangerous.
</p>
        <p>
In the end I threw my toys out of the cot, got myself a refund of my fees and went
for a run up the strip.
</p>
        <p>
          <a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/MyHopelessGymExperienceattheMandalayBayS_6C8C/image_2.png" target="_blank">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/MyHopelessGymExperienceattheMandalayBayS_6C8C/image_thumb.png" width="244" height="175" />
          </a>  
</p>
        <p>
Think I’ll try and find someone friendly at the Luxor for the Gym tomorrow and will
not be staying at the Mandalay Bay for MIX10 next year that’s for sure.
</p>
        <img width="0" height="0" src="http://www.syringe.net.nz/aggbug.ashx?id=4369fbf2-8c56-4b1f-8fd6-aa92261da1be" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Smashed a new PB on my hill repeat ride</title>
    <link rel="alternate" type="text/html" href="http://www.syringe.net.nz/2009/09/22/SmashedANewPBOnMyHillRepeatRide.aspx" />
    <id>http://www.syringe.net.nz/PermaLink,guid,b513448a-0f3d-4e25-8341-efed90302d14.aspx</id>
    <published>2009-09-23T08:16:12.53125+12:00</published>
    <updated>2009-09-23T08:18:16.328125+12:00</updated>
    <category term="Adventure Sports" label="Adventure Sports" scheme="http://www.syringe.net.nz/CategoryView,category,Adventure%2BSports.aspx" />
    <category term="Gettin Fit" label="Gettin Fit" scheme="http://www.syringe.net.nz/CategoryView,category,Gettin%2BFit.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
Got out for hills this morning on the road bike. Turned into a shorter ride, but,
I pushed the 2nd interval really hard (100% MHR) and in doing so smashed about 7%
off my PB up the short pinch climb I do.
</p>
        <p>
          <a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/SmashedanewPBonmyhillrepeatride_744E/image_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/SmashedanewPBonmyhillrepeatride_744E/image_thumb.png" width="244" height="175" />
          </a> 
</p>
        <p>
The average power was 450 Watts over the 4min 31 seconds. Pity the hill wasn’t a touch
longer as it meant my new PB 5 minute power ended up being only 431 Watts i.e. 30
seconds of my rest break at the top was included.. Goal for the next few weeks is
to really work on lifting my power profile. I think I’ll probably look at doing Peak
1’w and 5’w on Happy Valley road as it certainly appears to help going up a hill.
At the moment my 1’w isn’t even on the chart and I’d like to work on getting my entire
profile into the Cat 4 region over the next few weeks in the lead up to the K1 race.
Means I need to be targeting 350 Watts for 60 minutes which I think is going to be
the hardest bit. 
</p>
        <p>
          <a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/SmashedanewPBonmyhillrepeatride_744E/image_4.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/SmashedanewPBonmyhillrepeatride_744E/image_thumb_1.png" width="185" height="244" />
          </a>  <a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/SmashedanewPBonmyhillrepeatride_744E/image_6.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/SmashedanewPBonmyhillrepeatride_744E/image_thumb_2.png" width="244" height="205" /></a></p>
        <p>
The other interesting thing is to see just how much temperature variation affects
my (supposedly temperature compensating) barometric altimeter on the Polar s625x.
All 5 of those intervals should be the same height, but, there is a definite trend
downward over the set.
</p>
        <img width="0" height="0" src="http://www.syringe.net.nz/aggbug.ashx?id=b513448a-0f3d-4e25-8341-efed90302d14" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Essential Tools for SQL Azure Development</title>
    <link rel="alternate" type="text/html" href="http://www.syringe.net.nz/2009/09/03/EssentialToolsForSQLAzureDevelopment.aspx" />
    <id>http://www.syringe.net.nz/PermaLink,guid,10391f1a-95a8-4d87-8e95-27d7dcb1247c.aspx</id>
    <published>2009-09-03T23:12:12.21875+12:00</published>
    <updated>2009-09-03T23:53:40.515625+12:00</updated>
    <category term="Windows Azure" label="Windows Azure" scheme="http://www.syringe.net.nz/CategoryView,category,Windows%2BAzure.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
Much like <a href="http://blog.wadewegner.com/">Wade Wegner</a> I think that SQL Azure
is the jewel in the cloud for Microsoft. None of the other vendors have anything like
it. While it can be a bit sticker-shock-ish given that nominally a gig in SQL Azure
is 65 times the price of a gig in Azure storage, once you actually run some real world
scenario models it turns out to be really well priced. Think of a SQL Azure instance
not as 1GB (or 10GB… but I see no reason to use 10GB partitions) of storage but rather
as the cheapest damn fully backed up and HA relational database solution you’ll find
anywhere- and yes FOSSers I include your stuff in that calculation; no greasy haired, <a href="http://linuxandfriends.com/2009/07/26/baking-soda-uses-and-benefits/">under
washed</a> and over <a href="http://www.worldofwarcraft.com">WoWed</a> engineers needed
here.
</p>
        <p>
Anyway… I digress.
</p>
        <p>
A major PITA in using SQL Azure is that the tooling is tantalizingly close to be OK…
but in many ways it just doesn’t work. Dumping a SQL script and then re-creating the
DB in SQL Azure is a painful exercise in find and replace- check out the hands on
lab on Migrating a DB to the cloud in the <a href="http://www.microsoft.com/azure/trainingkit.mspx">Azure
training kit</a> for the gory details…
</p>
        <p>
Wade has a blog post up about a <a href="http://blog.wadewegner.com/index.php/2009/09/01/sql-azure-migration-wizard/">freebie
tool written by George Huey</a> that automates this process for you. Essential for
your Azure kit bag. It will parse out all the unsupported stuff.
</p>
        <p>
I ran it up and gave it a nice brutal challenge…. the AdventureWorksLT script that’s
used in the aforementioned lab. This includes both schema and data and is a decent
effort to parse. The tool churned for a good 3 or 4 minutes…. but I got a script out!
The original script includes some real curve-balls like XML Indexes and some tables
with data to populate but no clustered index (SQL Azure needs a clustered index before
you can insert into a table). I don’t expect it’ll get everything right., but, let’s
take a look at how it does against my hand crafted script….. 
</p>
        <p>
DOH!
</p>
        <p>
It doesn’t support cut and paste or saving of the script yet so I’ll need to go and
change the source first… More reporting back from me later. This looks really promising
and I’m confident it’s going to solve 90% of the pain points I’ve been hitting trying
to move complex (hell even simple) databases to the cloud.
</p>
        <img width="0" height="0" src="http://www.syringe.net.nz/aggbug.ashx?id=10391f1a-95a8-4d87-8e95-27d7dcb1247c" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Rebuild Day: Post #1, software audit and backup</title>
    <link rel="alternate" type="text/html" href="http://www.syringe.net.nz/2009/08/08/RebuildDayPost1SoftwareAuditAndBackup.aspx" />
    <id>http://www.syringe.net.nz/PermaLink,guid,18688900-58d6-4200-a03d-05effda61a8a.aspx</id>
    <published>2009-08-09T10:35:53.75875+12:00</published>
    <updated>2009-08-09T10:35:53.75875+12:00</updated>
    <category term="Office2010" label="Office2010" scheme="http://www.syringe.net.nz/CategoryView,category,Office2010.aspx" />
    <category term="Windows 7" label="Windows 7" scheme="http://www.syringe.net.nz/CategoryView,category,Windows%2B7.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
Today is rebuild day for my primary machine, a Lenovo x61t. Moving to Win7 RTM and
Office 2010 Tech Preview.
</p>
        <p>
First up is pulling all the Data off my C drive.
</p>
        <p>
This mainly means the data out of my profile folder. A key thing to remember here
is to check your <a href="http://www.west-wind.com/Weblog/posts/5584.aspx">filesystem
Virtualization folders</a> for stuff that’s been put there by poorly written software.
I usually backup to a hard drive but today I’m going to just push it across to my
D drive partition- I made the decision last build to run two partitions again which
is a move I’m pleased with.
</p>
        <p>
Then it’s time to do an audit of the Program Files folder to determine which of the
crap that I’ve installed over the past 7 months I actually need to install again.
here is my list, not necessarily in order. Hopefully it might give readers a few pointers.
</p>
        <p>
Polar Pro Trainer<br />
WKO+<br />
Lightroom<br />
Life Cam<br />
Intelli Point<br />
WinRAR<br />
7-Zip<br />
iTunes<br />
Live Mesh<br />
Office 2010<br />
VS2k8 + SPs<br />
Expression Studio 3<br />
Twhirl/Tweetdeck<br />
Star Alliance Travel Desk<br />
IIS + other goodies via Web Platform Installer<br />
SQL 2k8 inc Books online<br />
DevExpress Controls + Addins<br />
Azure SDK<br />
.NET Services SDK<br />
Process Explorer<br />
Sony Vegas<br />
TortoiseSVN<br />
Live Writer/Messenger<br />
eTrust + RAS Bits<br />
K-Lite Codec Pack<br />
Zoom H Series Driver<br />
SnagIt<br />
Camtasia
</p>
        <img width="0" height="0" src="http://www.syringe.net.nz/aggbug.ashx?id=18688900-58d6-4200-a03d-05effda61a8a" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Simple Partitioning with Windows Azure Table Storage</title>
    <link rel="alternate" type="text/html" href="http://www.syringe.net.nz/2009/08/08/SimplePartitioningWithWindowsAzureTableStorage.aspx" />
    <id>http://www.syringe.net.nz/PermaLink,guid,cebe3e19-85e6-4d5b-bc24-afb6f66aaeb1.aspx</id>
    <published>2009-08-08T19:50:00.69625+12:00</published>
    <updated>2009-08-08T19:50:00.69625+12:00</updated>
    <category term=".NET" label=".NET" scheme="http://www.syringe.net.nz/CategoryView,category,.NET.aspx" />
    <category term="Windows Azure" label="Windows Azure" scheme="http://www.syringe.net.nz/CategoryView,category,Windows%2BAzure.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
While there are certainly situations where it makes sense to have a natural <em>PartitionKey </em>when
working with Azure storage there are other times when all you really want is a simple
way to bucket up your data into equal bins. The usual approach to partitioning is
going to be some sort of hash function but if you decide to use a Guid as the RowKey
for your data you’ve basically got a nice collision resistant equal distribution already,
you just need to turn it into a partition key.
</p>
        <p>
I was sitting on the plane back from Singapore having a bit of a think about this.
Given that we can represent our Guid as a 128 bit Interger we can probably just do <em>RowKey </em>% <em>PartitionCount</em> 
and get a nice simple ordinal for each partition.
</p>
        <p>
So after my birthday dinner I did what any dedicated birthday boy would do and broke
out Visual Studio for a bit of a hack around..
</p>
        <p>
First problem was the ‘128 bit integer’ as .NET doesn’t have a native BigInt type.
A quick bit of Tiwtter asking and <a href="http://twitter.com/adjames">@adjames</a> suggested
the BigInteger class in .NET 4.0, but, given this is Azure there’s no .NET 4.0 support
quite yet. A bit of <a href="http://www.bing.com">Binging</a> (is that a verb yet?)
found some posts on <a href="http://stackoverflow.com/questions/567753/what-should-i-use-for-a-bigint-class-in-net">StackOverflow</a> and
an implementation of a <a href="http://biginteger.codeplex.com">BigInteger class on
CodePlex</a>.
</p>
        <p>
A quick console application confirmed that my thinking on the plane was right. 
</p>
        <div class="csharpcode">
          <pre class="csharpcode">
            <span class="kwrd">static</span>
            <span class="kwrd">void</span> Main(<span class="kwrd">string</span>[]
args) { <span class="kwrd">int</span>[] counts = <span class="kwrd">new</span><span class="kwrd">int</span>[]{0,0,0,0,0,0,0,0,0,0};
DateTime start = DateTime.Now; <span class="kwrd">for</span> (<span class="kwrd">int</span> i
= 0; i &lt; 1000000; i++) { Guid g = Guid.NewGuid(); BigInteger b = <span class="kwrd">new</span> BigInteger(g.ToByteArray());
BigInteger c = <span class="kwrd">new</span> BigInteger(10); <span class="rem">//Number
of partitions</span><span class="kwrd">int</span> p = BigInteger.ToInt32(BigInteger.Abs(b
% c)); <span class="rem">//Console.WriteLine(g.ToString() + " : " + p.ToString());</span> counts[p]
+= 1; } DateTime end = DateTime.Now; TimeSpan duration = end - start; Console.WriteLine(<span class="str">"Took:
"</span> + duration.TotalMilliseconds + <span class="str">" milliseconds"</span>);
Console.WriteLine(counts.ToString(<span class="str">","</span>)); Console.ReadKey();
}</pre>
          <style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
        </div>
        <style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
        <p>
        </p>
        <p>
Running this confirmed that my <em>RowKey</em> values would be evenly distributed
across the 10 partitions- my concern here was that the Guid algorithm might not be
quite up to the task but all seems good.
</p>
        <p>
          <a href="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/SimplePartitioningwithWindowsAzureTableS_10E39/image_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.syringe.net.nz/content/binary/WindowsLiveWriter/SimplePartitioningwithWindowsAzureTableS_10E39/image_thumb.png" width="644" height="78" />
          </a>
        </p>
        <p>
6500ms for a million rows doesn’t look too bad on the face of it. I’m sure there are
plenty of performance optimizations to be eeked out, but, they’ll pale into insignificance
compared to a round trip to Azure storage via the load balancer. What I do need to
test is that it’s not more efficient to rehash the Guid into 64 bits and then calculate
the modulo. But that’s for another night- jaded now and hoping to do 100km on the
roadie in the morning.
</p>
        <img width="0" height="0" src="http://www.syringe.net.nz/aggbug.ashx?id=cebe3e19-85e6-4d5b-bc24-afb6f66aaeb1" />
      </div>
    </content>
  </entry>
</feed>