About Aidan Casey

Solutions Architect @ MYOB Australia @aidanjcasey

Build 2016 Keynote day 1

Here’s a great Build 2016 day 1 and the keynote – nicely curated David Burela !

Burela's house-o-blog


Day 1 (today) will be about Win 10 and devices, like HoloLens, Xbox, and ‘conversations as a platform’ (NUI) and AI/bots
Day 2 will be about Azure, IoT, data platform with @scottgu. And Qi Lu will talk about O365 as a platform, Office/MS Graph

More below.

View original post 941 more words


Global Azure Bootcamp 2016 – Dublin April 16th

It’s that time of the year again! The 2016 Global Azure Boot Camp is happening on 16th April. The Dublin Boot Camp is happening in the Microsoft offices in Sandyford from 9:30 am – 4 pm. If you are new to Microsoft Azure or a seasoned cloud warrior this is a great opportunity to come along for some free insights on what’s new with Azure. In my session I’ll be covering the many flavors of Azure App Services – Web Apps, Web Jobs, API Apps,  Mobile Services and Logic Apps, when to use each one and the different deployment options available.

This is a free event, register  here

Agenda for the day:

–          What’s new in Azure – Niall Moran

–          Building and Deploying Azure App Services – Aidan Casey

–          Migrating SQL to Azure, an Architectural Perspective – Bob Duffy

–          Building Real World applications – Vikas Sahni

–          When disaster strikes – Aidan Finn

Saturday, 16 April 2016 from 09:30 to 16:00 (IST) Add to Calendar
Microsoft Ireland – Atrium Building Block B Carmanhall Road, 18 Sandyford Industrial Estate, Ireland – View Map

see you there !



Awarded Microsoft Azure MVP – 2016

I am delighted to share with you that I have been awarded the 2016 Microsoft® MVP Award for Microsoft Azure.

The Microsoft Most Valuable Professional (MVP) Award is our way of saying thank you to exceptional, independent community leaders who share their passion, technical expertise, and real-world knowledge of Microsoft products with others. It is part of Microsoft’s commitment to supporting and enriching technical communities. Even before the rises of the Internet and social media, people have come together to willingly offer their ideas and best practices in technical communities.

I feel very privileged to have received this award. Being recognized for what I have done this past year for the cloud computing community means so much to me.

I’d like to say a big “thank you” to all my blog readers and to everyone in the community especially here in Ireland for their support and collaboration over the past year.

Receiving the MVP Award inspires me even more to give back and pay it forward, to keep learning and sharing my knowledge, to help grow the Azure community both here in Ireland and around the world.

It also gives me NDA access to upcoming Microsoft products and technologies allowing me to help shape the technology and to network directly with the product teams and other MVP’s around the globe.

Congratulations to all new and renewed MVP colleagues – I’m looking forward to working with you and to some great community events in 2016.

Learn more about the MVP program here: https://mvp.microsoft.com/en-us/Overview



I’ve won 2 free tickets to the Web Summit 2016 for my contributions to open source projects

Well Christmas arrived early for me this year ! recently I won 2 free tickets to the Web Summit 2016 in recognition of my open source contributions on GitHub.  I’m really looking forward to attending next year, here are the vital statistics – 21 summits , 1000 speakers and 41,000 attendees the mind boggles !


It’s a real shame that we couldn’t manage to hold on to this jewel of a conference in Dublin, it really helps to put Ireland on the world stage in the tech community. Hat’s off to Paddy Cosgrave for growing the conference from 400 odd attendees in 2010 to these new these lofty new heights.

I’m really looking forward to Lisbon, thanks again to the kind folks at @WebSummitHQ for the free tickets !

For those of you less fortunate  you can buy tickets here


Guiding Principles for an Evolutionary Architecture



Back in the dark days of waterfall projects we invested heavily in big upfront architecture and design. Systems were well thought out and documented within an inch of their lives. All this happened before anyone cuts a single line of code. There was little or no room to change once things were in flight. Twelve months later we’d go through a horrendous regression test cycle and finally release a product only to find out that our clients needs had evolved and we’d ended up building something that nobody wanted, but hey at least it was well architected!

Thankfully, those days are gone my friend and big upfront design has no place in Agile. With Agile, teams still complete architectural work, but it’s done very differently. Instead of a big up-front design where decisions are made about the architectural needs for an entire system, Agile teams take an incremental and evolutionary approach. However, designing, building, and maintaining a robust architecture doesn’t come for free. You need to maintain focus on architecture throughout the entire process and stick to some guiding principles.

Evolutionary architecture gives us most of the benefits of enterprise architecture without the problems caused by trying to accurately predict the future. Here are a number of useful techniques and principles that will help you to maintain a clean architecture through the lifetime of your product.

“The best architectures, requirements, and designs emerge from self-organizing teams.”  Agile Manefesto Principles

Last responsible moment

The last responsible moment isn’t about encouraging procrastination, it is saying that you should delay decisions as long as you can but no longer. The longer you can afford to wait to make a design decision the more  information you’ll have on hand and the better placed you are to get it right. Decisions made too early in a project are hugely risky. These decisions often result in work that has to be thrown away. Even worse, those early decisions can have crippling and unavoidable consequences for the future of the project.

Early in a project you should make as few binding decisions as you can get away with. Start small with a few critical stories but aim for working end to end software. Establish a skeleton architecture or ‘steel thread’ with an end to end data flow and establish your test approach.The driving technical requirements for a system should be identified early to ensure they are properly handled in subsequent designs and implementations. Choices like the programming language and the database technology need to be made at the start of a project but deciding on the right level of services decomposition will emerge later on. The last responsible moment makes sense for decisions which are costly to reverse and it will keep you from over architecting and designing for functionality that may never arise.

Establish lightweight documentation

The Agile Manifesto prefers “working software over comprehensive documentation”. This doesn’t mean that you can ditch documentation entirely.Technical documentation is valuable  but it needs to be kept at the right level if it has any chance of being kept up to date and surviving the duration of your project. Documentation becomes much more valuable  when it takes on a collaboration nature. Wikis are a great way to socialise designs and to communicate both within your team and externally. The act of writing or sketching out a diagram helps you to think something through properly and increases your own understanding. You  should focus on keeping things lightweight and relevant – make sure there is value in what you are documenting and make sure there is an audience that finds it useful. In general, system diagrams,  design decisions , operational instructions and requirements should be documented to help you team understand what they are building and to help the others that come along after them.

Establish continuous integration and automation right from the get-go

Nothing builds or destroys agility more than a team’s commitment to continuous integration. Automated tests gives you a safety net that lets you refactor and change your code quickly knowing that you haven’t broken anything.

In order to  evolve an architecture over time you need to maintain and grow all your automated tests –  unit , integration, contract and end to end tests. Don’t get hung up on code coverage metrics but pay attention to tests that fail frequently, these will point you to the problem area’s in your code base that need your attention.

Without adequate automated tests your architecture won’t evolve freely. Making wholesale changes and restructuring existing code will becomes too risky and you’ll end up in a cycle of maintaining and extending poor code that compromises your architecture.

End to end tests are the slowest to run and the most brittle to maintain. When choosing the scenarios for an end to end test you should focus on the key workflows through your software. As the system grows don’t be afraid to throw away some of these tests and replace them with more valuable scenario’s. Your tests like you architecture need to evolve and sometimes that means they need to be deleted.

Simple code and simple designs are always best

Writing code is easy, writing code that is easy for others to understand is not so simple. Striving for simplicity when building complex systems should always be front of mind. Don’t let team members work alone, pair programming and code reviews help to make code more understandable and readable. When it comes to design, the easier things are to understand the better. Simple code and simple designs takes less time to understand, have fewer bugs, and are easier to modify. Beware of shiney new frameworks and abstractions for abstractions sake!

Remember Conways laws 

Many years ago, Melvin Conway wrote a paper that proposed that the way an organization is structured would have a strong impact on how a system is created. He wrote

“Any organization that designs a system (defined more broadly here than just information systems) will inevitably produce a design whose structure is a copy of the organization’s communication structure.”

It is all too easy to focus purely on the technical challenges when architecting a system  but you need to think about your organisation structure and assign the right work to the right teams. Having a single team work on and own an individual service is far better than having joint ownership across teams. Coordination and communication across teams is hard and all too often people find ways to avoid this altogether and you end up with large hard to maintain codebases with duplicate functionality added per team.

Finally, a word on robustness

Postels Law also known as the robustness principle is a great guideline when it comes to designing message contracts

“Be conservative in what you send, be liberal in what you accept”

As soon as you publish an API either internally or externally other systems will start to rely on it. Once it is the wild your API’s become much harder to change. When it comes to exposing data you should expose the bare minimum and no more and you should version all message contracts. Conversely when consuming an API its best to ignore parts of the message you aren’t interested in, you don’t care if these change over time.

Evolutionary architecture works but only when you focus and continually works through these guiding principles.

Hope this helps

Blue-Green Deployments with Azure Web Apps

Blue-green deployment is a technique that reduces the downtime and risk of releasing new versions of an application by running two identical production environments called blue and green. At any time, only one of these environments is live, with the live environment serving all production traffic. For example, blue is currently live and green is idle. To release a new version, you deploy and test in the green environment . When you testing is completed you switch the routing so all incoming requests now go to green instead of blue. Green is now live, and blue is idle, now wash, rinse and repeat..

There are many benefits to adopting this technique – you can release to production as often as you like with zero-downtime and you can easily rollback your changes and swap from green to blue if needs be.

Azure Web Apps provides an out-of-the box solution for blue-green deployments through the use of deployment slots. When you provision a web application you can create up to 4 additional deployment slots. Deployment slots are actual live web apps with their own host names, you can push code to individual deployment slots and the content and configurations elements can be swapped through a simple API call. Azure manages all the traffic redirection when you swap your blue-green slots and guarantees that no requests are dropped during the swap.

Azure Resource Manager allows you define all the resources that make up your deployment environment in a single template file. Once defined, you can deploy, monitor and manage these resources as one atomic group.

By combining web apps, deployment slots and  azure resource manager it’s pretty easy to build  a continuous blue green deployment pipeline.

I’ve published a set of scripts and templates to enable blue-green deployments for a WebAPI backed by a azure SQL database, you can grab all the code here



Create a new environment

Our stack consists of Web App and a SQL Azure database. these are defined in the file webapi-deploy.json.  All service specific settings are externalised and defined in a seperate paramters file. To create a brand new stack  invoke the New-AzureResourceGroupDeployment 


 "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
 "contentVersion": "",
 "parameters": {
 "siteName": {
 "value": "CustomerService"
 "hostingPlanName": {
 "value": "NewServiceAppPlan"
 "siteLocation": {
 "value": "North Europe"
 "sku": {
 "value": "Standard"
 "serverName": {
 "value": "mydatabaseserver"
 "serverLocation": {
 "value": "North Europe"
 "administratorLogin": {
 "value": "dbuser"
 "administratorLoginPassword": {
 "value": "your-password"
 "databaseName": {
 "value": "CustomerDatabase"

Once the web app has been created you can add a second deployment slot

function Add-StagingSlot([string]$sitename,[string]$location)
New-AzureWebsite -Name $sitename -Location $location -Slot "Stage"

Deploy to a staging slot and hot swap

The Publish-Azure-Website cmdlet lets you deploy a .NET webdeploy package to a named deployment slot on  you running Web App.  When you are ready to hot swap the blue and green enviornments call Switch-AzureWebsiteSlot

function Publish-Website([string]$name, [string]$package)
Switch-AzureMode AzureServiceManagement
Write-Host "publishing " + $name + "..."
Publish-AzureWebsiteProject -Name $name -Package $package

function Stage-Website([string]$name, [string]$package)
Switch-AzureMode AzureServiceManagement
Write-Host "publishing " + $name + "..."
Publish-AzureWebsiteProject -Name $name -Package $package -Slot "Stage"

function Swap-Website([string]$name)
Switch-AzureWebsiteSlot –Name $name -Force

A word on database changes

Handling database changes is the most complex part of a  blue-green deployment. the simplest approach is to have your blue and green applications share the same database. You need to ensure that all schema changes are backward compatible with both versions of the running application. The simplest way to run the database upgrade scripts is to bootstrap it to the Application_Start method in your WebApi project. FluentMigrator is a great open source tool which allows you to define your database schema changes in .NET code.

That’s, pretty much it, one last point about resource groups. When you are done with your stack and you’d like to tear everything down you can delete all the resources in your resource group by calling Remove-AzureResourceGroup

Useful Reading

Martin Fowler on Blue Green Deployments

Quickstart Resource Manager Templates

hope this helps !