Archive for November, 2011


Here we are with a small problem encountered: the maximum size of the Azure Queue has been increased from 8KB to 64KB from version 18.8.2011. Cool! A little more space available is great, especially on messages with lots of metadata to be sent.
But if like me you try to create a message with a size of 10KB using the SDK 1.5 (October 2011), you will receive an error.

Now to figure out exactly where the problem was I used JustDecompile (since the good old Reflector is no longer free, I tried the beta of JustDecompile from Telerik) and I decompiled the CloudQueueMessage by Microsoft.WindowsAzure.StorageClient.dll and … surprise! In the constructor there’s a nice hard-coded limit to 8192 bytes in the MaxMessageSize property:

CloudQueueMessage.MaxMessageSize = (long) 8192;

How to solve the problem? By downloading the 1.6 SDK Azure where the client libraries have been updated with the new limits and the same dll decompiled now has:

CloudQueueMessage.MaxMessageSize = (long) 65536;

Finally we started! A nice proof of concept of a distributed architecture Cloud – OnPremise. First we’ll try Azure and then AWS.
I’ll try to post some of travel notes  of this adventure with problems, advantages, strengths and weaknesses, performance identified in order to help future adventurers.

We’ll try everything a lot of things:

  • Azure Table Storage – SimpleDB: as NoSQL to save and retrieve large amounts of data
  • Blob Storage – S3 to store large sets of data
  • Azure Queue – SQS: for communication between the different roles within the same region
  • Azure SQL – MySql: for relational data on the cloud
  • SQL Data Sync: to synchronize distributed databases cloud – OnPremise
  • Bus Service – SNS + SQS: to use publish/subscribe pattern for data distribution between the region and OnPremise
  • Traffic Manager: to automatically balance the client calls to the nearest Azure region
  • MongoDB: there will be experiments to compare a NoSQL Document based like MongoDB with the key-value solutions offered by Microsoft and Amazon
  • Other: MEF, AutoMapper, AppFabric, Caching, TPL

Let’s start the journey!

Today I’ve lost the whole afternoon fighting against this damn issue so I want to share this with everyone to save your time!

I was performing a simple query against Azure Table Storage using PartitionKey and RowKey in order to retrieve a specific entity in a specific table (i.e.: http://127.0.0.1:10002/devstoreaccount1/Spaceship(PartitionKey=’380′,RowKey=’1234′)).

During tests, the first scenario was where no entities with give PK and RK were present and I was using a simple query ending with FirstOrDefault operator like 

TableRepository.FindWhere(p => p.PartitionKey == entity.Spaceship.CountryCode.ToString() &&
        p.RowKey == entity.SerialNumber).FirstOrDefault();

and I was expecting null but in reality I started to get 404 error with detailed message below:

<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
  <code>ResourceNotFound</code>
  <message xml:lang="en-US">The specified resource does not exist.</message>
</error>

After several hours struggling with various tests I discovered following Pearls of Azure Wisdom:

- Internet Explorer can’t be used to query directly table storage account, it does not return results at all, because

- You have to set IgnoreResourceNotFoundException = true in the TableServiceContext in order to receive null when an entity is not found instead of error 404

Product Planning.xlsm of my project was corrupted. At the opening it gave me the error: TF208002: “The name that you specified for the column header is a reserved name for this work item list. Choose a different name and try again.”

Clearly I have tried everything but without success Sad smile

Solution:

  • Take the file directly from Agile 5 Process Template from Microsoft (MSF for Agile Software Developmentv5.0 \ Windows SharePoint Services \ Shared Documents \ Project Management) and copy it to your Project Portal
  • Open it and press Edit Workbook
  • Go to the Team tab and select Configure -> Server Connection
  • Press OK on the popup
  • Select your project and press Connect
  • Press List and select New Query Product Planning pressing OK
  • Save and you have your file again!
Follow

Get every new post delivered to your Inbox.

Join 1,089 other followers