views:

256

answers:

3

Hi,

I am currently designing architecture for my new project. This has ASP.Net MVC web client and WCF web services for third party integration as front-end.

Currently this application will be hosted by us on rented rack space in datacenter, but in future we might move it to Microsoft Azure.

Do I have to do specific planning for Azure in my architecture? Or my current architecture which has IIS, MSMQ, SQL Server, Velocity, etc will work in Azure without too much issues? I have been ignorent about Azure due to lack of available time, but need to make sure that I get the architecure right for future need.

What are the things I need to watch for?

Thanks & Regards,

Ajay

+2  A: 

I'd say no.

Design for your current platform, and modify for Azure only when you're actually going to use it. There's a good chance You Aren't Gonna Need It, so don't waste your time.

Decent design of your application should result in a fair amount of abstraction from the underlying architecture anyway, so if or when you switch platforms changes should be localized by default.

Rik
@Rik, out of interest, have you used Azure? I haven't seen a decent sized app yet that didn't require a fairly fundamental change in architecture to support it.
Michael Hart
@Rik, which isn't to say that it won't be easier in the future - but I still think moving to the cloud will always require thinking about your app and business needs differently.
Michael Hart
You're absolutely right. Just don't think it's very helpful to start thinking about Azure if you're not sure you're going to use, precisely because of the inevitable fundamental changes. If when you try to account for them, you're still going to need to re-think exactly how you're going to Azure to support your app. That's why I say: one step at a time.
Rik
+9  A: 

It depends on how seriously you're considering moving to Azure and how soon. If you are, then I'd say yes.

Unfortunately, the idea of being able to write once run anywhere is a bit of a pipe dream. The concept of abstracting everything away just doesn't work if the platform limits your architecture choices - and nearly every platform does. Even if you can choose your data persistence technology for example, you're almost guaranteed to run into an impedance mismatch problem at some point that will affect your design.

So in Azure's case there are a number of issues you'll need to think about.

Firstly, no MSMQ or Velocity at this stage. Azure has it's own queueing component that has more of a passive model (poll for messages, no routing, etc), so you may be able to use that, but it's not transactional in the same way that MSMQ is, and you'll need to ensure all messages are idempotent. Distributed caching is on it's way I believe, but it's not there yet (and may not be Velocity).

Secondly, you can either choose Azure's Table Storage or SQL Azure Database for your table-like persistence. Which one you choose probably depends on where you scale pain points are. The easiest option would be to go the SQL route, but there are certain limitations there with DB size, and you won't be able to use many of the services around SQL Server, like the job agent, dependencies (for cache callbacks), etc. And if you're running into issues where SQL Server isn't scaling, then running in the cloud isn't likely to help much, just by the fact that it's still an RDBMS. If you want a more scalable solution, then Azure Table Storage is your man - but it's non-relational and you'll need to modify your architecture to accommodate the more limited scope of transactions that it supports - as well as the inherent limitations of its querying mechanism and latency of the REST-HTTP architecture. Think BASE, not ACID.

Thirdly, you'll need to think about file storage differently. As each of your instances is running in a VM, any local storage disappears when the VM shuts down, so for long term persistence, you'll need to use Azure Blob Storage and design your app keeping that in mind.

Fourthly, you've got a choice of two types of roles - web roles, running IIS (that you currently have no control of, in terms of tweaking IIS parameters) and worker roles, which are more like windows services. And there's no mechanism for your roles to be aware of each other - so communication from web to worker happens via the queues, or table/blob storage. So you'll need to keep this in mind too.

So all up, lots of design decisions will need to be made if you want to move to Azure - the platform, by it's very nature, limits what technologies you can use, and therefore what design options are open to you. If you do design with Azure in mind, then you will end up with a more inherently scalable system, but there are certain decisions that need to made along the way - and some may be deal breakers.

[Edit: I should add that this answer is more aimed at the consideration of moving your entire app to Azure. This, of course, isn't the only option - you might want to only move certain components to the cloud and keep the rest on-premise, interacting using something like Azure .NET Service Bus for example]

Michael Hart
Excellent answer!
John Saunders
I agree. You need to consider both the different technologies available (i.e. Azure Blob Storage vs Windows File System) as well as the architectural differences between traditional hosting and Azure hosting.
Sam
+1  A: 

I don't know much about the current offerings of the Azure platform, but I'd say that in general, I'd design against the requirements that you have now. Guessing how requirements might change in the future is very difficult, and can affect the success of the whole project.

JustABitOfCode