Developer EventsWindows Azure Developer Stories
General ResourcesWindows PhoneWindows Azure
D³: LIVE & INTERACTiVE Monthly, 1st Wednesday
These postings are provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use.
Resident Bloggers
Jonathan Rozenblit
Paul Laberge
Frédéric Harper
Susan Ibach
Marc Gagné
Windows Azure is a platform with many different services that you, the developer can piece together to create your solutions. But when do you use which service and how? In this blog series, you’ll discover the answer to that by using different scenarios used by developers working with Windows Azure today.
I’ll never forget this one time (at band camp? LOL) I was doing a presentation and after a full 2 hours of going through the Windows Azure platform, a developer at the back of the room stood up and said to me “Jonathan, now that I understand what Windows Azure is, what do I use when?” I took a minute to reflect on the question – to understand exactly what he was asking me. I thought he was joking at first, but after thinking about it for a bit, the question made sense. It’s very easy to understand what each individual service does, but it is a bit harder to piece together how all the different services work together.
In the next few posts, I’ll go through some scenarios that I see often being used today and will endeavour to highlight how different services can be used to meet certain requirements.
Previous Post
If you need a crash course or a refresher on the Windows Azure platform, check out my Azure Camp Online series or visit an Azure Camp in a city near you.
This week, we’ll talk about devices. I would have said we’ll talk about mobile applications, but why stop there? Granted, common devices would be phones like Windows Phone, Android, and the iPhone; and tablets like the Android tablets and the iPads; but there are so many device applications that can leverage the power of the Cloud. Basically, anything that can send and receive data via the Internet can use Windows Azure, like Blu-ray players, gaming consoles, etc.
Attributes of Devices
Before going to into the which, the when, and the how of Windows Azure services for devices, let’s take a moment to understand some of the key attributes of a devices:
There are definitely more, but we’ll focus on these for this discussion.
Mapping Attributes to Services
Now that we know the above, we can map these attributes to Windows Azure services:
The above uses a web service as a proxy into your Windows Azure environment, but technically, you could remove the web service from the equation all together and communicate with roles in Windows Azure by reading and writing to a queue via the Queue (Storage) Service. Since the Queue service is a REST based web service in and of itself, you can have the device app read and write to it quite easily. Whether to use a web proxy or work with the Queue service directly is an architectural decision that you’ll need to make based on the requirements of your application, specifically around security as the Queue service requires a security key which would have to be saved on the device.
When outsourcing computing resources to Windows Azure, there’s an additional attribute to add to the attribute list above – varying demand needs. Varying demand needs relate to scale. With device applications, scale refers to the backend services that support the application – i.e. the services that the application connects to and works with. Scale is achieved by using one or more Windows Azure Compute instances. The more compute instances you add, the more “horse power” the backend services will have and therefore the more they will be able to take on. This will increase the speed at which they respond to requests from the device application. Then when the demand is not there, you remove compute instances.
Note: You’ll need to decide whether your application will communicate with the Blob Service directly, via its REST-based web services or whether it will communicate with a web proxy that will communicate with the Blob Service. Using the Blob Service directly will require some additional security considerations.
Using the attributes of device applications as a guide, we’ve now been able to map Windows Azure services to meet the requirements of each.
Next Steps
If you’ve read the previous post in this series, you know what I’m going to say - as with everything in technology, there is always more than one way of achieving the same result, but one way will work better than another for the requirements of your particular application. The best way to figure out which one is best, is to try it out yourself.
If you’re thinking of developing applications for Windows Phone, iOS (iPhone/iPad), and/or Android (phone/table), you can download great toolkits that were specifically designed to make it easier for you to integrate Windows Azure into your device applications. The toolkits contain the native libraries for each of the platforms, samples that you can peruse and learn from, project templates, and of course, documentation.
Download:
Keep In Mind
Testing with the emulators that are included with the Windows Azure SDK (while it is definitely something you should do before deploying)will not give you as accurate of an idea as testing with the live production environment. In order to truly determine what will work best, you’ll definitely want to test with Windows Azure itself.
If you’re an MSDN, MPN, or BizSpark member, you have Windows Azure benefits included with your subscription that give you ample resources with which to test Windows Azure. If you’re not a member, you can use the 90 day free trial which also gives you ample resources with which to test. The only difference is that you’ll have 90 days to do it in. For most scenarios, 90 days is sufficient to do the necessary testing.
TIP: You can now set usage limits on your Windows Azure deployments. This will help you ensure that you don’t go over the resources that are included with the trial or MSDN, MPN, and BizSpark memberships. This will then prevent any unwanted charges going on your credit card.
Get a Conversation Going
Do you have any questions about Windows Azure as it relates to devices? Have you already tried different services and architectures for your solution and learned a few things along the way? Start a conversation on LinkedIn and ask or share with others.
Disclosure
As I mentioned above, there is more than one way to do anything mentioned above and different scenarios will call for different architectures. What’s mentioned in this post is just A way of architecting the solution. Don’t take this post to mean that it is the only way or the best way.