Long, long time now posts.
Twitter captures my immediate thoughts; and time is captured by other pursuits.
The Netbooks at Australian TechEd pioneered the way for the PDC 2009 Acer handout. And quite frankly drained me completely. After being hyper-immersed in a project I find it somewhat difficult to find a new direction. I call this a character weakness.
The Microsoft world is revamping again: Windows 7, Office 2010 + ecosystem, Silverlight 4, Windows Azure + ecosystem. Contributing to open source projects such as MahTweets.
Open source related projects come to fruition; new buds appear and the season starts its cycle again.
Working at Microsoft as an open source/web evangelist is tough when you have ADHD. With so much change and new bits it sometimes becomes difficult to focus. To concentrate on what is important when all is important to someone, somewhere.
So, I welcome you back to my professional geek ramblings.
For those who want the more immediate, personal journey, please visit http://www.nickhodge.com/
Oh, and Movember rocks. Donate to battle Men’s Depression and Prostate Cancer.

Twitter; Facebook and friends is the place where I spend most of my day. For work and play.
Separating work and play is difficult in single-column twitter clients. Enter mutliple columns, filtering as base requirements for my perfect twitter client.
Stuck in closed-source TweetDeck; or moving through a myriad of AIR based applications. Subjecting myself to unknown security issues, slow performance – and no ability to contribute – has frustrated me no end.
Then @aeoth create MahTweets. It’s MS-PL. It’s extensible (via MEF). It has IronRuby for scriptable extensibility.
It is awesome.
Use it. Contribute. Let’s make the world’s best WPF Twitter Client.
As TechEd 2009 approaches, there are many people scurrying around behind the scenes ensuring the Windows 7/Mini-notebooks experience succeeds.
Andrew Dugdell is tracking the process from the outside; and Jorke has a new blog with indepth details from the inside.
I am merely the systems engineer now. Watching and carefully (lightly) directing all the smart engineers to do their thing.
Bookmark/RSS follow these sites and see what it takes to make 2,300 HPs sing in unison.
Two unintended consequences of Microsoft open sourcing:
1. Google Chrome (on Windows) uses the Windows Template Library (WTL) published under the Ms-PL
2. Mono outpaces Java for Linux desktop application adoption. An interesting quotation from the article:
“It is an interesting irony that Microsoft's sponsored technology, which is open source, is allowing developers to be more productive on Linux than other tools for Java and C++ development”
Irony, indeed.
SOme quick notes on Microsoft and PHP things that are in motion. Things is such a great Anglo-Saxon word.
July CTP of PHP SDK for Windows Azure. If you are more visual, Rob Bagby has an excellent post and more excellent screencast overview:
Also, pop over to the online webcasts CodeWorks, which is hosted and run by PHP|Architect. These are sponsored by Microsoft.
If you prefer to read magazine style, the May issues of PHP Architect Magazine is a free download. Compliments of Microsoft.
The FOSS community has been concerned about the difficulties, pros and cons of including Mono-built applications as a part of standard Linux builds. Both Pro and Con.
Most recently, the Ubuntu Technical Board posted to their Ubuntu Developer Announce mailing list their extermely pragmatic position on Mono applications.
Today Microsoft extended the Community Promise to the two underlying ECMA (and subsequent ISO) standards that cover the CLI and C#. These promises had already covered other EMCA standards such as OpenXML, so it was quite logical that the CLI and C# would follow. Well, in a sane universe anyway.
As the Mono project (and Moonlight) are based on these standards, the Community Promise would logically extend to these environments.
Hopefully now we can all just build cool software, not argue about licenses, patents and other distractions. Now let's fix Outlook's HTML rendering!. :-)
(Thanks to
John BouAntoun for the original link,
Peter Galli for the original blog post, and Microsoft for doing the right thing.)
ntpro: Where was something kick-ass like this for the first 2500 #TechEd US registrations? Screw the party ... http://bit.ly/10iUtu
WindowsITPro: TechED Australia attendees each score HP Netbook: TechEDAustralia attendees will get more than a bag and t-shir.. http://tinyurl.com/n2spkc
nigelwadsworth: @jeffa36 Very tempted to go this year after reading this. 2006 was the last TechEd I went to.
wstan: WTF! This year no TechEd event in Malaysia but Microsoft is giving HP Mini netbook with Windows 7 to each paying TechEd Australia attendee.
BrianFarnhill: Just heard about the netbooks being given out at TechEd this year - man I wish I could go :-(
@freitasm: Microsoft Oz giving HP Mini with Windows 7 to each of 2,300 TechEd attendees. Microsoft NZ giving away seven digital cameras.
orinthomas: TechED.au is giving away a netbook to all paying attendees. I suspect that attendance (especially at my sessions ;-) will be good.
hollingsworth: Nice bit of marketing and community-building there Nick - TechEdfolk get free Netbook http://bit.ly/rEz9w via @NickHodge
ANZTechEDSecure: Holycrap! Free netbook to paying TechED.au attendeeshttp://is.gd/1iCky #auteched
Alegrya: must find some $$ for that TechEd ticket!! RT @NickHodge: And Sekrit Projekt #1 goes public: http://bit.ly/rEz9w
davidfowl: @DamianEdwards Wow I went to the wrong teched
Andrew Dugdell has started a blog following us HP mini-note/netbook guys on our 10 week journey to TechEd 2009.
(the image above is not displayed at actual size)
Mini Packages
Yes!, paid delegates to Australia's TechEd 2009 are each receiving Microsoft Windows 7 on a HP 2140 Mini notebook (aka: netbook). Pop over to the TechEd 2009 web site to register to see all the terms and conditions etc.
Mini-note Relevant Speeds and Feeds:
Screen: 10.1”
HD: 160Gb
Memory: 2Gb
Wireless: 802.11 a/b/g
Processor: Intel Atom 1.6GHz N270
Delegates will be able to take their HP Mini back to work to show off Windows 7, or just loan the device for the duration of TechEd. Of those returned, Microsoft will be donating these these loan to charity.
Imagine each and every delegate with a mini-note roving around TechEd doing everything online; Messenger, Office Communicator, Twitter’n, downloading presentations … the list is endless.
Also imagine the IT skills provided to those less fortunate than ourselves.
Big Things: A Call-out to the TechEd Community:
What would you like to see running across these 2000+ devices?
- A mass Azure stress test web application?
- A magical Powershell configuration script?
- A WPF-based network game?
- A new Windows 7 based WinForms/Win32 Twitter client that doesn’t suck?
Ideas are endless … we’d love to get you, the community, involved in creating interesting scenarios.
Let the big ideas flow!
Photo thanks to James Dumay
Thanks to all for questions, and attending on Thursday night. Big ups to the Googlers (including the cheeky @pamelafox!) for their hospitality.
Linkages for relevant Pythonic and IronPythonic stuff:
And for the committed Pythonic reader, Jim Hugunin at the recent PyCon (March 2009): IronPython: Directions, Data and Demos
Need to test your website against new and old versions of Microsoft Internet Explorer? Microsoft offers a set of VPCs free specifically for this purposes. They are downloadable as .vhd images, and include the base operating system. Of course.
http://www.microsoft.com/downloads/details.aspx?FamilyId=21EABB90-958F-4B64-B5F1-73D0A413C8EF&displaylang=en#filelist
These VPC images expire in April, 2009
(Caution: Ruby application names are as prolific, esoteric and funny as Microsoft code names)
The previous post (broadly) demonstrated how to use a combination of URL Rewrite and FastCGI to put a Ruby on Rails application on IIS7.5.
As Rails, Merb (which I am reliably informed is what all the cool kids use today) and Sinatra
Another more common method of deploying Rails applications is behind a small web server such mongrel, thin or whilst development ruby’s inbuilt WEBrick. These servers are attached to one instance of the ruby application with a front-end web server acting as the reverse proxy server. This server forwards requests from the outside world to one of the instances of your ruby application; and ‘proxies’ the response back to the browser on the client.
Using an reverse proxy server architecture provides various goodness: easy instance creation, simple scaling and relatively easy deployment. If you get the configuration right.
To deploy a reverse proxy server with IIS previously required third party ISAPI such as ISAPIRewrite.
As complex deployments are becoming more common, Microsoft has released the Microsoft Application Request Routing Version 1 for IIS 7 (get it here). Note that the server also requires URL Rewrite.
The following is my simple setup.
How to Setup
As I have mongrel installed on my development machine, and am experimenting with sinatra: mongrel is chosen as the default server.
With a simple batch script, I launch the instances of my simple application. The ruby application is hi.rb. In this instance, ruby.exe is in my PATH. The '-p 4567' tells Sinatra and Mongrel to use port 4567 as the listening port. There are mechanisms to make these services. This machine is development only, so I’ll leave that alone
@ECHO OFF
ruby.exe hi.rb -p 4567
Install Microsoft Application Request Routing Version 1 for IIS 7. Note that the server also requires URL Rewrite.
Launch the Internet Information Services (IIS) Manager
Create a Server Farm. A farm is a collection of servers (IIS7 and others) the server is going to farm the incoming requests to

Provide a name for your farm

On my test server, I wish to use multiple ports on the same server. That is, more than one application instance bound to separate ports.
Type the address (without the port) of an application instance. After clicking “Add”, click on the entry in the server address, and click on the “Advanced settings…”. Sinatra’s default port for an instance is :4567. As extra instances are added; add them to the farm with the appropriate port.
NOTE 1: The UI when adding a httpPort for each address is a little weird. What I found working is to type the Server address:, expand ‘applicationRequestRoutin’, enter the port (if not the default port 80), click add. Then re-click on the entry in the list, and re-enter the httpPort (as it seems to revert back to :80)
NOTE 2: Each server address must be unique in the Server farm. Therefore, if you have multiple instances of the same application, although on separate ports, on the same server: you will need to do some work on the DNS or hosts file. On my test machine, I have created aliases in my machine’s hosts file to the same server (run Notepad.exe as administrator!):
%windir%\System32\drivers\etc\hosts
127.0.0.1 localhost localhost-1 localhost-2
Server farms can also exist across physical IP addresses: this may be different IIS instances, different virtual machines or different physical machines.

To match the incoming requests with a particular farm, a URL Rewrite Rule is automatically created.

The below rule will matching any incoming request (which you may wish to tweak) to the server farm. Note the Action properties: pointing to a particular farm, passing on the {R:0}, or the pattern matched in the Match URL:

The .config file
The configuration (on my machine) looks something like:
%windir%\System32\inetsrv\config\applicationHost.config
<webfarms>
<webfarm enabled="true" name="localhost">
<server enabled="true" address="localhost-1">
<applicationrequestrouting httpport="4567" />
</server>
<server enabled="true" address="localhost-2">
<applicationrequestrouting httpport="4568" />
</server>
<applicationrequestrouting>
<loadbalancing algorithm="WeightedRoundRobin" />
<protocol httpversion="Http10" />
</applicationrequestrouting>
</webfarm>
<applicationrequestrouting>
<hostaffinityproviderlist>
<add name="Microsoft.Web.Arr.HostNameRoundRobin" />
<add name="Microsoft.Web.Arr.HostNameMemory" />
</hostaffinityproviderlist>
</applicationrequestrouting>
</webfarms>
For Further Research
- The Server Farms have extra features for checking the health of instances. Wiring these into mongrel would be cool.
- Load Balancing mechanisms: wiring these for deeper integration
- IronRuby. Now that would be cool.
Having spent the weekend working on Ruby on Rails with IIS/SQLServer 2008 Express backend via FastCGI, here are some tips to get you going:
- The best resource is Ruslan’s post on Rails and IIS7. In fact, go and bookmark this site right now. In Ruslan’s post, the web.config shown is best edited in a text editor.
- When installing IIS7.5 on Windows 7 Beta (build 7000) is easy: Using the Control Panels\Programs, Turn Windows Features On/Off. Underneath the Internet Information Services, you need to also install the CGI feature (to get FastCGI)
- Windows 7 and URL Rewrite: This forum post http://forums.iis.net/t/1154240.aspx will get you going whilst Windows 7 is in beta
- Database connectivity to SQLServer seems to be a common question. Installing the option “sqlserver adaptor” which is now an optional part of ActiveRecord:
gem install activerecord-sqlserver-adapter --source=http://gems.rubyonrails.org
Connecting via the ODBC adaptor via the SQL Native Client worked, rather than the ADO connector. My connector string looked something like this:
development:
adapter: sqlserver
mode: odbc
dsn: Driver={SQL Native Client};Server=.\SQLEXPRESS;Database=xxxxx;
- As I am installing underneath the IIS7 root directory (that is: http://server/myapp) there are 3 small Rails tweaks required inform the application all the goodies are in a subdirectory:
in config/environment.rb, the header, define a global variable:
PATH_PREFIX = '/myapp'
in config/environment.rb, in the Initializer, set the asset home directory:
Rails::Initializer.run do |config|
config.action_controller.asset_host = PATH_PREFIX
in config/routes.rb, ActionController::Routing::Routes.draw:
map.connect PATH_PREFIX + '/:controller/:action/:id'
map.connect PATH_PREFIX + '/:controller/:action/:id.:format'
end