Keeping a top 20 in azure table storage

Azure Table Storage is a cheap, fast and easy to use data storage system.

It does have it’s limitations.

All data has two keys partition key and row key which need to be unique in combination.

The best way to guarantee the return of say the latest 20 entries is to use  DateTime.MaxTicks – DateTime.Now.Utc (in a 19 digit left padded with zeros format) as the row key.

This means that reading the data you can just fetch the items by partition key with a limit on how many rows to return.

The difficulty will come in keeping the data from filling up the storage account if you never clean up.

I would suggest that when the data is read back if you get the maximum number of items that you queried then perform a second query to return 100 rows older than the oldest row that you have just fetched and delete them in a single async batch. This is the optimum delete size (as 100 is the max batch size for azure table storage).

Groovy and Powershell

I have started looking at the language Groovy.

Groovy starts with java as a base language. It is backwards compatible to Java and compiles to the same jvm instructions.

It takes some different design decisions to it’s parent language. Everything is public by default, supports operator overloading, and has thrown away much of Java’s verbosity.

Oddly enough it looks like a parallel between Powershell and C#.

Now Powershell is not a compiled language, but can run C# inline.

Groovy’s scripting shell is very restricted as to be for simple experimentation only.

Both languages have identical tricks when it comes to closures, parameter, and advanced string handling GStrings in groovy have an almost identical syntax to the Powershell equivalent.

This also means that both languages are good at hosting DSL’s since they both support the fundamental pieces needed to do this (minimal ceremony syntax and closures).

Latest Azure Guest OS

Family IsDefault Version
3 False WA-GUEST-OS-3.21_201411-01
3 False WA-GUEST-OS-3.22_201412-01
3 True WA-GUEST-OS-3.23_201501-01
4 False WA-GUEST-OS-4.14_201411-01
4 False WA-GUEST-OS-4.15_201412-01
4 True WA-GUEST-OS-4.16_201501-01

Here is the latest guest os details.

Getting Boot2docker working on windows 7

I have been experimenting with docker on windows.

I started with using chocolatey to install boot2docker.

Currently docker requires ssh on windows (boot2docker ssh)

The advice on the following page got me past the following error:

Cannot connect to the Docker daemon. Is ‘docker -d’ running on this host?

The problem was the ports being used by virtualbox. I reinstalled and set up the port forwarding and everything now works.

Migrating Azure 2.2 to Azure 2.3 emulator

This is an article on how to migrate the azure emulator from v2.2 to v2.3

Managing Storage Emulator in Azure SDK Version 2.3

Note that the emulator has changed again by the time you get to v2.5.

Given that the emulator is a poor copy of what really happens in azure I would recommend designing you apps to work locally standalone yet use services in the cloud (with abstracted local versions if required).

Latest Azure Guest OS Updates

At last we have the December Update and it is now the 16th January.

Family


Version


Is Default


3 WA-GUEST-OS-3.20_201410-01 False
3 WA-GUEST-OS-3.21_201411-01 False
3 WA-GUEST-OS-3.22_201412-01 True
4 WA-GUEST-OS-4.13_201410-01 False
4 WA-GUEST-OS-4.14_201411-01 False
4 WA-GUEST-OS-4.15_201412-01 True

Please can we have a little more frequency in updates.

This http://msdn.microsoft.com/en-us/library/azure/ee924680.aspx gives some updates.

Why is Windows 8 and Office 365 So Hard To Configure

I have finally convinced my mother to buy a new laptop to replace her ageing XP system.

You would think that the setup of a modern laptop should be so simple that the supplied instructions should be enough. This needs some serious work as it is currently not useful.

Partway through the setup it asked my mother to sign in with a windows live account (which of course she does not have). Then she was prompted to create an account with a maximum password length of 16 characters (I was recommending the modern style three words plus punctuation but this was not going to work).

Eventually she got the machine up and I helped her to install “start is back” to make the machine usable (I can’t explain the metro interface over the phone).

The next step was to install office 365. This again required the creation of a windows live account (why the product has a licence key number that should be all that is required).

The windows live account is asking for a lot of personal details that are frankly none of the business of the installation process.  As long as the user has a valid email address is all that is required – why do they need to know DOB and gender. It would even be possible to make sensible guesses as to language and country from the browser data used.

Partway through the process it asked you to check your email – which my mum did on her android tablet (not having set up the email on the new laptop yet). There was no way to get the user interface on the laptop to accept that the newly created username was valid. It required a full restart of the registration process (including re-entry of the 16 digit code) and this time to sign in with the now validated windows live account.

My mother now has a new laptop with office installed, but there is no way that she could have got this working without help. Microsoft need to invest in usability studies for various age groups. This is after firing whichever team thinks that the metro UI is in any way usable.

Powershell wmi classes

This is how to get a list of wmi providers:

Get-WmiObject -Namespace “root/cimv2” -List

These can be queried as follows:

Get-WmiObject -query “select * from win32_processor”

This is effectively granting you sql style queries against features on your machine.