typemismatch just a projection of my own imagination

FlowersOasisC Novim Godom 2009!Dreaming on Tara 2 (It's raining down in Bosnia)2009 New Year's Firework in San Francisco
Status » Post: Don’t go Mono, go Ruby …: Some interesting findings porting to Mono versus conversion to Ruby. http://cli.gs/1y9sV

Don’t go Mono, go Ruby …
about .NET, Software on 27/06/2009 with no comments - like it?

I’ve always liked the Mono project and since its inception way back when I’ve dabbled with their technology. The thought of running .NET on linux was something I always wanted to do. Recently I had a real business need to have parts of an application run on UBuntu. Not only that but I hear plenty of clients make the wild claim that “hey, if we need to run on linux we’ll just use mono!”

Initially I looked at doing this in Ruby but the learning curve for my back end services was a little steep. No problem, I’ll keep development moving in C# but keep it simple 2.0 so that it can run on Mono. Over the last few days I setup some new UBuntu servers and tried to get some of these applications running. No luck. I even ran the analyser tool which tries to make sure everything is compatible… it was. All the calls I use are available in Mono but the results are different.

That alone is high risk. If I’m using the same basic calls then I really need the results to be the same on each platform. It then occurred to me that the entire principle of the Mono project is doomed to fail. It is and always will be a sub-par port of .NET.

The bottom line is, if you want or need your application to truly run cross platform then use a language with native support, from the beginning for those needs. There are many. You have choices like Java, Python or Ruby just to name some. C# for the time being is a Windows language.

I have chosen to slowly convert rather than port and will run back ground services as Ruby apps which once written in Ruby run anywhere Ruby is supported without problems. My websites however will remain asp.net mvc. I have had plenty of success with Rails but the new MVC for .NET is just too good :)

Just a side note: I’m sure plenty of applications can be built in Mono but they need to be built and tested in Mono from the beginning. The problem you’ll run into is many c# 3rd party components, if not most, are written and tested in .NET and you don’t really know if they’ll work on Mono. Again here I say – if you only use Mono fine but why not rather use a true cross platform technology rather than a continuous port.

Tags:

Going live with Windows Azure
about General on 08/06/2009 with no comments - like it?

So of course you’re only going to do this if you’re nuts … right? Remember that I never said I wasn’t!

Here is the application that I needed to host. In my mind a perfect candidate for a compute cloud. It is basically a second stage monitoring service. I have various services deployed in other data centers. If one fails or goes offline the server it is on will restart it. (Stage 1) – but what if the entire server is down? This is my second service, every few minutes it checks data in the cloud (AMZ) for last contact times from a bunch of services. If anything has checked in within 5 minutes … bamb! I get some critical email warnings.

The application consisted of a Worker Role that does the monitoring and then a Web Role. This is used to expose a REST API to my mobile applications so that status information can also be pulled at any time. Due to the 1 project limit currently on Azure I bundled these two roles into one package.

Deployment was a snap. Just upload the package and configuration files and it hits staging without issue. Azure allows a staging to production promotion which is great. I hit the promote and then run buttons and all was well – the service deployed and run without issue.

It has been running without any noticed downtime for a few days now. Today a service outside Azure happened to fail and I received my email, awesome. Some notes about Azure so far:

  • The only errors always seem to be from the actual web admin tool. You get the usual MS generic error and you have just try again.
  • On one occasion the application said it was promoted to production and running but the DNS for the Web Role failed to register.
  • The web admin site is too slow.

That is all for now. Next I’ll be testing the data services! I love Amazon’s high speed de-normalized database so looking for something similar.

Tags: ,

Watch your time zones on Windows Azure!
about Software on 08/06/2009 with 3 comments - like it?

So I deployed some code to Windows Azure and was initially surprised that it was running differently than what I had observed locally.

Turns out and once you think of it its a no brainer … my code was running in a different time zone. All my other services were in EST but this was PST. The solution in my case is to keep everything as GMT and then do any necessary calculations :)

You might wonder if this is documented anywhere. To be honest, I have no idea since most of the documentation has been very poor. The website for Azure has circular links that will drive you nuts and the local SDK docs are just focused more on the API and are too incomplete as well.

Update: Since posting I’ve been told all servers will be and are currently in GMT time. Cool!

Tags: