mattcalla.com
[code]
[code] - mattcalla.com

Melbourne Developer SIG review: Creating Applications in Windows Azure:




Last night I attended a Developer SIG meeting at the Microsoft Theatre in Melbourne.  The presenter was David Lemphers from the Microsoft Windows Azure team.  The presentation gave a walkthrough of how to create .NET applications for the Azure platform, and an overview of the cloud architecture. 

My impressions after a day of reflection on the Windows Azure platform as a whole, are simply this: 
  • I can see this being something to keep an eye on for the future, but not something ground breaking (considering others [Amazon, Google] have already gone down this path). 
  • I'm still not sure what Microsoft are going to bring to the cloud platform scene that is going to make people choose it, over its competitors - other than the fact it is firmly aimed at .NET developers and simple integration with Visual Studio.
  • Having said that, the platform is still in its early stages, therefore my above points could be completely blown out of the water.
I took a few notes during the presentation outlining what was talked about.  I'll try my best to make as much sense as possible, but the notes were taken down quite quickly and therefore I might even struggle to remember what  they mean:

Development
  • Two application roles: Web and Worker.
  • Web roles are like your asp.net websites, web services (basically anything an outside 'client' can connect to over the net)
  • Worker roles are like background processes - possibly like Windows Services, or scheduled tasks (batch jobs, console apps)
  • Two SDK's are available to download which allows you to develop your Azure applications.
  • Visual Studio has a new project type called 'Cloud services'
  • Your local development environment can emulate the cloud so you don't have to publish your app everytime you want to run it. 
  • Web apps (roles) can be developed pretty much the same as your standard ASP.NET apps
  • There is no caching built into the azure framework as of yet - the MS team are still working on that.
Deployment and Monitoring
  • Your apps can have inbuilt heartbeat checks in them so that Azure can monitor your app health (and give it a kickstart if it has died)
  • You can set a 'Fault tolerance' level for your apps.  So if you choose a level of 2, your app will be deployed across 2 servers.
  • You can deploy a number of 'instances' of your app for load balancing.
  • Logging is done to a central repository (meaning each instance logs to the same place)
  • You can access the Azure Portal at lx.azure.microsoft.com (you obviously need to be registered to login)
  • You can configure different environments in your Azure portal i.e. Test, Stage, Production
  • There appeared to be two main areas to work with in the cloud portal: Hosted Services and Storage Services
  • To deploy to the cloud, you need to 'Publish' your app from Visual Studio, which will create a copy of the app on your local machine, and then from the cloud portal (web page) you create some space for this app and upload it.
  • Automated build and deployment support is coming soon - so you don't have to go through the Web Portal (for things like Continuous Integration)
  • You can promote your 'Stage' app to 'Prod' at the click of a button.  (Strangely when you do this it basically just swaps your environments over i.e. Stage becomes Prod, and Prod becomes Stage)
  • Staging urls for your web apps are auto generated guids.  eg. I might be developing a Banking app, and I publish it to the Stage environment on the cloud, the url I use to access it will be something like this:  asdfasdfa-sdfasfda-fasdwerwe...
  • All apps hosted on the cloud has .azure. (or something like this) in the url.  Which means if you want your own url (like mybankingapp.com, you would have to buy that domain name with some other domain provider and setup a url redirection and url masking to your specific azure app url)
Data and Databases
  • SQL Server is not supported, therefore migrating existing applications which use SQL Server database will be a very difficullt taks.
  • It looks like there is a new data model for storage on the cloud.  I got the feeling it was a bit like an object database.  But I'm really just speculating here.
  • No longer use SQL for querying the data - you would use LINQ in your apps
  • There are currently no tools like SQL Server Management Studio for viewing and querying data in the cloud.
  • I asked about security and privacy protection of confidential data.  David mentioned there will be certain levels of privacy protection that will be agreed to in your SLA, it would be up to the developers to encrypt any sensitive data.  Basically it appears the onus is on the developers to ensure their data is safe.  I have a feeling this will be a big issue for business adoption - having sensitive data hosted up in the 'clouds' rather than in the confines of their own data centres.
Physical Data Centres
  • The data centres are all in the USA
  • Its basically just rooms with giant racks of servers
  • Rack = Fault domain (which means if you set your fault tolerance to 3, your app would need to be deployed across 3 separate racks)
Business model
  • No costing model is available yet - still being worked on
  • You only buy what you need.  i.e. If you have an app that is running on a server that can handle 10 users.  Lets say you get an additional user, instead of going out and buying a whole new server, (which would now mean you have the capacity to handle 20 users - but 9 'users worth of server' going unused), you just buy enough server power on the cloud to handle the additional user.  This appears to be a big selling point, the different levels of scalability and how you can control that without needed to worry about the physical hardware.
  • Handle flash points - sudden increase in load.  Being on the cloud means this situtation is no longer a threat where you suddenly find your product becoming very popular, but not having the hardware to support the load/page hits.

So there you have it.  I hope Microsoft organise a few more of these presentations and I enjoyed this and would love to learn more.
Also to anyone that understands the Azure platform, please leave some comments to clarify anything that I have said above that is just plain wrong.

 del.icio.us  Stumbleupon  Technorati  Digg 

SpecUnit - make your tests more readable

Thought I'd start the year of by sharing this good little add-on for unit testing that I came across recently. 
If you are unit testing with NUnit in .NET 3.5 - this may be of
interest to you.  Its an add-on called 'SpecUnit' which basically
enables you to write your tests with a more fluent interface - so that
your tests read more like ...<< MORE >>

Public Variables - Are they really that bad?

I get this thought every now and then - should Public Variables be avoided in all situations?  I was recently writing a quick prototype application, and had a few "data objects" which I noticed myself spending alot of time writing get/set properties.  I then proceded to get rid of them all, and revert to just simple public variables. 

There was ...<< MORE >>

Fluent Interface: Has wikipedia missed the mark on this one?

I was just reading Martin Fowlers article on Fluent Interfaces.

I then decided to check out Wikipedia's page on it - it seems to me that the example of fluent interface there is just a classic case of method chaining.  The impression I got from Fowler was that the "fluency" comes more from the language used ...<< MORE >>

TDD / BDD Example

Developing using TDD is more about the developer’s mindset rather than the tools and technologies that are used.    However we still need to write some actual code, and that’s where a whole range of both commercial and open source tools come into play.

There are two main tools that you will need to be able to write tests effectively:

1.      ...<< MORE >>

Stored Procedures Should Be Stupid


Stored procs should be ignorant, obedient and just plain down right stupid.  We don't want them to ask questions, make decisions or do anything other than what we tell them.  If they start doing anything other than CRUD operations, then you can quickly find yourself in a whole world of T-SQL pain.

What am I talking about here?  The database making ...<< MORE >>

TDD ... Time Saving Development


I've been asked by some work colleagues to produce a short demo/presentation about TDD, so to get my mind into gear, I thought I put all my thoughts (and the thoughts of others) down on my blog and see if it provokes any feedback that can improve my presentation.  I really think about TDD as not so much Test Driven, ...<< MORE >>

WPF (XBAP) using WCF in a Partial Trust Environment


I've just gone through the pain of working out how to get my WPF Browser Application (XBAP) using a WCF service without any security exceptions causing me to attempt to break yet another desk.  After hours of frustration I've finally got it working:  A WPF Browser application, talking to a WCF service seamlessly and with no security issues.  In an ...<< MORE >>

WPF Browser Application Cache Problems

If you're having issues with your WPF Browser app's having old versions being cached - most noticeably during development, when you make a change, debug the app from Visual Studio (by pressing F5) and your changes do not appear in the version loaded in your browser - then you will need to clear your Application Cache before your new version ...<< MORE >>

Register .NET COM library

If you have applications that need to create objects or call code from a .NET COM dll, then you will need to make sure you have registered the dll correctly. 

To do this type in the following from the command line:

regasm <FileToBeRegistered.dll> /codebase

I've just spent a few hours trying to work this is out, as I was ...<< MORE >>

CTRL + K,D : Auto-format your code in Visual Studio

If you are working on some existing code that's in a state of mess, then CTRL + K,D is your best friend.  In Visual Studio, hit it at any time and it will automatically format all code in your current document.  ...<< MORE >>

Planning XP - My favourite quotes


I've been re-reading the 'Planning Extreme Programming" book written by Kent Beck and Martin Fowler lately, and  I've picked out a few quotes from what I've read so far that I think highlight some key points to remember, or that simply amused me.  Either way, I think its good reading.  Here they are:

Keep the plan simple, otherwise they won't be ...<< MORE >>

BDD Spec Generator


I've written a little console application to convert NUnit test result output from BDD style test fixtures into a simple spec text file.  The spec text file output is basically a human readable file that will be useful to departments in your business other than the developers themselves, such as - QA and Project Managment.  It is something I'm starting ...<< MORE >>

Redundant comments


Code like this really frustrates me... well maybe 'frustrate' is a bit over the top, but it's something I feel the need to point out:

/// <summary>
/// Customer object
/// </summary>
class Customer
{
    /// <summary>
    /// Customer name
    /// </summary>
    private string Name;

    /// <summary>
    /// Customer age
    /// </summary>
    private int Age;

    /// <summary>
    /// Customer constructor
    /// </summary>
    /// <param name="name">the ...<< MORE >>

BDD Style Naming Macro for Visual Studio


I've really jumped on board with BDD (Behaviour Driven Development) in the past week.  I've been reading about it for awhile, but it wasn't until I started actually doing it on a side project of my own that I've really begun to realise how good it can be.  The natural language naming style of the 'specs' (not 'tests' anymore) in ...<< MORE >>

ReSharper Solution-Wide Analysis


I re-installed ReSharper today after living without it for a few months.  The reason I originally uninstalled it was sort of an experiment to see if I had become too dependent on it.  I wanted to be sure that I could work without it, for the scenarios where I jump on other people's machines to code, or ...<< MORE >>

NHibernate: Getting started


I have been reading about NHibernate for about a year now and have been thinking about converting to it for many of those months.  I've always read little bits and pieces about it, but never found a really good article or guide about setting it up and useing it in a realistic example...until today

Karl Seguin's article ...<< MORE >>

Domain Driven Data Access Layer Example


In the past few days I have been refactoring a system that had no concept of an independent Data Access Layer (DAL).  All the code to access and manipulate the database was directly in the Domain objects.  I set myself the task to extract all this code and introduce a decoupled DAL.  There are a fair few articles on this ...<< MORE >>

The ALT.NET group


In the last six months I have become increasingly interested in the discussion and ideas being generated by the ALT.NET group, and thought it would be a good idea to spread the word a bit more if you are unfamiliar with it. 
<< MORE >>

The importance of setting goals in software development


Bob Slydell: You see, what we're actually trying to do here is, we're trying to get a feel for how people spend their day at work... so, if you would, would you walk us through a typical day, for you?
Peter Gibbons: Yeah.
Bob Slydell: Great.
Peter Gibbons: Well, I generally come ...<< MORE >>