Despite the title of this post, there will be no rapping or dancing of any sort going on here. Only talk of Windows Azure, which is quite possibly the most confusing product rollout that Microsoft has attempted since Vista. With Vista it was a plethora of versions… do I need Home, Home Premium, Business, Ultimate, Super Deluxe Extra Gooey edition???? I just don’t know! Well, with Windows Azure the problem seems to be the opposite. It seems that they are trying to cram a ton of stuff under a single umbrella. In a way reminiscent of the direction that they originally went with .NET, and then later backed up on quite a bit. Did you know that Windows Server 2003 was going to originally be named Windows .NET Server?
Anyways, I have spent some time over the last few days really digging into Windows Azure and trying to figure out exactly what all of the stuff is in that massive slide that kept showing up at PDC. You can see what I am referring to about half way down this page. I don’t want to reprint it here since I may incur the wrath of my mighty overlords.
First I am going to clear up what I think was the single biggest mistake they made when they created that image, and maybe I am an idiot for thinking this, but I had assumed that they were trying to show the five pieces of Windows Azure at the bottom. But they aren’t really. What they are showing is five services that can be used in conjunction with Windows Azure. Windows Azure is really big because it is much more badass than the rest. 🙂 Of the five pieces that are sitting above Azure, we are going to completely ignore “Microsoft Sharepoint Services” and “Microsoft Dynamics CRM Services” because I don’t really have anything to say about them. The three parts that we will look at are “Live Services”, “.NET Services”, and “SQL Services”, but these aren’t part of Windows Azure. They are part of the “Azure Services Platform”, and that is what confused me. I can’t imagine why that would be confusing!
Windows Azure is a separate service that is closely related with many of the other services list, but even Windows Azure is broken down into a few parts! Clearly Microsoft has invested ridiculous amounts of money, people, and whatever else Microsoft has (gold bullion?) into this.
Part 1: Windows Azure
Windows Azure is a hosted platform for writing applications that can scale easily. Inside of Windows Azure there are two very distinct different services that are running. The first is “Hosted Services” and the second is the “Storage Services”. I say that these are distinct because they are almost entirely unrelated. Sure you interact with them inside of the same control panel, but their interactions and versioning are handled in very different ways.
You have a concept of a “Web Role” and a “Worker Role”. You can think of a “Web Role” as an ASP.NET application, and a “Worker Role” as a Windows service. All that these services do is fire up .NET code in Microsoft’s datacenters and allow for you to spin up an arbitrary number of each role in order to do your bidding. Microsoft seamlessly handles the rolling out, load balancing, etc… But this part of Windows Azure is really all about code, there is no way for you to store any kind of state. This is how they let you scale, because if you need more instances, just fire them up! If you have no state, then your roles shouldn’t care where they are running. The problem is that without state, your application is probably pretty useless. This is where the “Storage Services” come in handy.
This is another confusing part of the whole Azure stuff. We have a storage service inside of Azure, but then we also have “SQL Services” which isn’t part of Azure, but it is a part of the “Azure Services Platform”…. whaaaaa??? So yeah, there are two storage solutions. One is part of Azure, and that is Azure storage. The second one has little to do with Azure, and it is called “SQL Services”. Azure storage is a very simple storage solution. You have three storage options “Queues”, “Tables”, and “Blobs”. Queues are just that, a Queue. If you don’t know what that is then you probably ended up at this page by accident. You can plop items on a queue and then pick items off. Tables are a very simple row storage mechanism. You can do some simple queries over the data, but you are very limited. The tables aren’t relational so you can’t have a foreign key to another table. There is a Linq provider, but it only supports “where”, “select”, and “take”. Notice that there is no “skip”, so you really can just retrieve items and you can’t do any storage side paging. The tables also only support a small subset of data types. One of them is not “decimal”. Yeah, no decimals. Ouch. Blobs are for storing things like images, files, etc… They can even be made public so that you can access them through urls just like you would any other web resource.
As you can see, it is the combination of the hosted services and storage services that allow you to actually do something with Windows Azure. As I said earlier, the blobs are useful for storing website assets, and the tables are useful for storing whatever data you need to drive your websites/service/etc… You may be wondering about the queues though, what kind of use do they have? Well, remember that we had both “Worker” and “Web” roles. The queues are the perfect place for a site or service to place work on the queue for a backend process such as a Worker role to deal with. Then the worker role can put another message on a queue, or update a piece of data in a table when it is done processing the work item. It allows for very distributable asynch processing of work. The kind of thing that you would normally use something like MSMQ for.
These two pieces are what actually comprise Windows Azure. There is one additional piece, and that is the web portal, but that is simply where you perform the administration and deployment of your applications. I’ll give you a few quick screenshots so that you can see what I am talking about:
Here is the main project page that shows the different projects I have created:
Here you see that my “Hosted Service” project (the top one) and my “Storage Service” project are two entirely different things inside of the admin panel. If I go inside of the hosted project you can see that we have a “Staging” environment and a “Production” environment. We can initially deploy our application into the Staging Environment where it is allocated and started. Then we have a special url that can be used to hit this staging deployment to test it. Then when we are ready to roll it into production, you just click the blue button you see in the screenshot below and the load-balancer is points the production url to the staging deployment, and voila, you are deployed!
I’m not going to go into any further detail about this (maybe in a future post), but I just wanted to give you an idea of how you got your applications into the “cloud”.
For the rest of the services I am only going to give you a cursory explanation of what they are. Mainly because I have not worked with them to any extent, and secondly because right now I am mostly interested in the hosted Azure platform.
Part 2: Live Services
Live Services are another gargantuan offering that has even swallowed up a few services that already existed before this branding was announced. To sum it up in Microsoft’s own words:
Live Services are a set of building blocks for handling user data and application resources.
Sounds pretty simple, until you see this guy. Holy crap. So this poster is actually about the “Live Framework” which is built on top of “Live Services” and provides a uniform way to access all of the “Live Services”. Okay, so what are all of these services that you speak of? Well, I’m glad you asked. A few of them are “Live Alerts”, “Live Contacts”, “FeedSync” (Which Live Mesh is built on top of), “Messenger”, “Virtual Earth”, etc… there are actually quite a few more of them. Some of these are services that users can interact with directly, but virtually all of them are going to be interacted with through the “Live Framework”.
Part 3: .NET Services
.NET Services are formerly known as BizTalk services, or at least part of it was. BizTalk services appear to have disappeared in a way reminiscent of Soviet era style cleansing. Can you say “persona non grata”? I remember hearing about BizTalk services at Mix 08 and the presenter actually said that he didn’t know why they were called “BizTalk” services since they had nothing to do with BizTalk. Well, I guess Microsoft listened, and they have now been renamed. .NET Services provide three different pieces of functionality, and are the completely developer focused side of their service offering. The three pieces are “Access Control Service”, “.NET Service Bus”, and “Workflow Service”.
The “Access Control Service” allows application developers to move authentication and authorization out of their application and into a hosted service. This allows users to authenticate into an application from anywhere using a set of well known services. This service also provides the authorization mechanism needed to interact with the rest of the .NET services.
The “Service Bus” is surprisingly not really all that much of a service bus. 🙂 If you were expecting something like MassTransit or NServiceBus then you will probably be disappointed. Think of “Service Bus” as more of a hosted replacement for MSMQ. It has a very simple pub/sub model that allows you to pass messages across the internet. I’m not saying that it is bad (in fact I have never used it), it is just made to be simple and to only provide basic messaging support. If you need an async hosted messaging system though, and don’t mind writing some of the more complex features yourself then this may be an excellent option.
The last piece is “Workflow Service” which is a service that allows you to host workflows written in with Windows Workflow Foundation. It can be connected with remotely through http or it can use messages off of the .NET Service bus. Other than that I don’t really know much about it, so I’ll leave it to you to explore. It sounds like it might be neat to perform more advanced .NET Service bus interactions and routing using the Workflow Service. You could have the Workflow Service pick up messages at endpoints, process them, and then deliver them to other endpoints that are delivered to recipients. The idea though of having a hosted platform for distributed – long running processes is pretty enticing though.
Part 4: SQL Services
SQL Services are probably the only self-explanatory part of the entire Azure Services offering. It is SQL Server in the cloud! Mmmmmm…. cloud. SQL Services are an interesting beast. Just like the Azure data storge, they only support a small subset of types. SQL Services looks to support decimal, so it is all good in my book. The interesting part about SQL Services is how it is setup. It supports joins, so you’d think that it was relational, but it is not. In fact, it doesn’t even have schemas! At the top most level there is a concept of an “Authority”. In an authority there are “Containers”. Inside of these containers there are “Entities”. From this you may wrongly expect that Authority = Database, Container = Table, Entity = Row, but in reality the mapping is quite different. Authority is more or less like a SQL Server Instance and then a Container is like a Database. But an Entity is a table and a row? Yep, kinda.
The “Containers” could be thought of as a table, but since there are no schemas we can just put whatever kind of entity we want into them. So containers could hold both “Order” entities and “LineItem” entities. But why would we want to do this? Well, because remember earlier how I said that we could do joins, well they are only within a container. You may be screaming right now about this, but remember that SQL Services are meant to be distributed and scalable, if you have data in two containers, which may reside in two different services or data centers then how do you know how expensive joins will be? Microsoft hints in their docs that cross container queries may be possible in the future, but I’m guessing that they will have to do some kind of data syncing in order to enable this feature.
In the end SQL Services provide you with a bit more flexible data storage engine than what Azure provides out of the box. In the future Microsoft has plans to make SQL Services even more rich and bring it closer and closer to what we expect out of a full fledge relational database. I’m pretty excited to see where Microsoft takes SQL Services and it is certainly something that I will look more into in the future.
The Windows Azure services platform can be quite daunting to approach, but once you figure out that you can just tackle it one piece at a time it becomes much easier to manage. I for one have started to dig into Azure Data Storage and Hosting and will hopefully have a few more posts on this in the near future. Microsoft has clearly invested a huge amount of resources into this so I would imagine that you are going to be hearing quite a bit about it in the future. Also, if anyone out there is interested in potentially leveraging the Azure platform and doesn’t know where to start, contact me because I am always interested in consulting work!
Loved the article? Hated it? Didn’t even read it?
We’d love to hear from you.
Yayay.. Windows Azure Breaking it Down.. 🙂
Leave a comment