Exploring Windows Azure with LSharp in Full Trust

I finally got around to updating lsharp.cloudapp.net to use Full Trust (it was just a case of adding enableNativeCodeExecution="true" to the ServiceConfiguration.csfg file, rebuildng and uploading).

Full Trust gives you access to a whole lot more than reported in my earlier article Poking around in Windows Azure

Access to the file system is now allowed

>(new "System.IO.DirectoryInfo" "c:\\windows")
c:\windows

And we can enumerate all the disks

>(reference "System.Management")
(seq (.get (new "System.Management.ManagementObjectSearcher" "SELECT * From Win32_LogicalDisk ")))
(\\RD00155D301BA6\root\cimv2:Win32_LogicalDisk.DeviceID="A:" \\RD00155D301BA6\root\cimv2:Win32_LogicalDisk.DeviceID="C:" \\RD00155D301BA6\root\cimv2:Win32_LogicalDisk.DeviceID="D:" \\RD00155D301BA6\root\cimv2:Win32_LogicalDisk.DeviceID="E:")

All the interesting stuff seems to be on the D drive

>(map (fn(x) (.ToString x)) (.GetDirectories (new "System.IO.DirectoryInfo" "d:\\")))
("$Recycle.Bin" "boot" "Debuggers" "Documents and Settings" "inetpub" "OSdiagnostics" "Packages" "PerfLogs" "Program 

Files" "Program Files (x86)" "ProgramData" "rdsources" "System Volume Information" "Users" "Windows")

We can now get to the registry and find out what kind of processors are being used.

>(reference "Microsoft.Win32")
(.GetValue (.OpenSubKey ( Microsoft.Win32.Registry.LocalMachine) "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0") "VendorIdentifier")
"AuthenticAMD"

Have a play and let me know if you discover anything interesting!

Java, Restlet and Windows Azure

There’s an interesting scenario for Windows Azure Services which hasn’t been talked about much: inter-enterprise application integration.

Connecting suppliers with customers can be tricky - Who hosts the web services? Who’s going to buy the server? How will we configure the firewalls? Azure could make all that pain disappear - just put an endpoint in the cloud and communicate securely. The endpoint could be a Table, a Queue, Blob store or the Services Bus.

Key to getting this scenario to work is Java support; there’s still a lot of legacy Java out there running on UNIX systems and we have to be able to work with that.

A quick Google for “Windows Azure Java” threw up only very little material:

Steve Marx’s blog http://blog.smarx.com/posts/programming-language-interoperability-in-windows-azure - Inspiring, but I struggled to get the code sample working and it’s a little messy.
and
Schakra’s Java SDK for .NET Services which, as far as I can tell only supports the Service bus.

Neither was what I was really looking for.

Restlet seemed like the way to go, so I contacted the folks at Noelios and Thierry Boileau responded with a code sample showing how the Microsoft Shared Key scheme was supported in Restlet 1.2 Milestone 2

See comments under

http://blog.noelios.com/2009/02/20/microsoft-selects-restlet-to-show-rest-interoperability/

Before long, I was listing queues, doing PutMessage to queues etc etc and I’ve started to build out a simple library that allows me to do things like:

String endPoint = "http://account.queue.core.windows.net";
String accountName = "XXXX";
String accountSharedKey = "YYYY";

QueueStorage queueStorage = new QueueStorage(endPoint,accountName, accountSharedKey);

Queue q = queueStorage.getQueue("foo");
q.putMessage("Hello World 2");

Is anybody interested in helping with or sponsoring a CodePlex project to build out a Java version of the StorageClient sample?

SemSearch 2009

Dyaa and Udo will be at SemSearch 2009, at the WWW Conference in Madrid this week presenting our paper:

“Managing Collaboration Projects using Semantic Email”

Here is The Poster

I really wish I was going, but work commitments unfortunately don’t allow ..

Getting Started With ClojureCLR

I heard that Clojure had been ported to the CLR and I was keen to give it a go. You need to grab the source and build it yourself, but here’s what worked for me:

I use subversion and git installed as part of Cygwin.

I installed everything in c:\opt

First you need to get the code for Clojure-contrib from Kevin O’Neill’s repository

git clone git://github.com/kevinoneill/clojure-contrib.git

Then change into the clojure-contrib directory

cd clojure-contrib

Then you need to get hold of the Dynamic Language Runtime. At the time of writing, ClojureCLR doesnt build against the latest DLR, so I had to explicitly grab revision 10606. The required version is documented in C:\opt\clojure-contrib\ClojureCLR\versions.txt

svn co -r 10606 https://dlr.svn.codeplex.com/svn .

You also need the Visual J# Redistributable to provide BigInteger and BigDecimal. Download and install from here:

http://www.microsoft.com/downloads/details.aspx?familyid=f72c74b3-ed0e-4af8-ae63-2f0e42501be1&displaylang=en

Locate ClojureCLR.sln (C:\opt\clojure-contrib\ClojureCLR\Clojure) and open in Visual Studio 2008.

Its a pretty big solution, so you may have to wait a bit while Visual Studio does its thing.

At this stage, the whole solution probably won’t build, unless you have Silverlight, NUnit , Rhino etc - but don’t worry - You only need to build Clojure.Console - Right click on Clojure.Console and select build. Right Click again and say Debug, Start New Instance. And off you go ..

Clojure CLR

Clojure CLR

If you’ve read this far, you probably want to buy “Programming Clojure” by Stuart Halloway. It’s available in beta.

Document Version Control Surface Style

Another day another Surface demo. This time a POC for how a Surface could interact with a document management system to ensure that the latest versions of documents are used at meetings.


Document Version Control Surface Style from Rob Blackwell on Vimeo.