Tuesday, October 30, 2012

Virtualization in Retail: an Azure Discussion

Today at BUILD I had the chance to chat with a couple of Microsoft folks from the Windows Azure and Windows Server team. Azure has come a long way since its first public appearance. It is now a business reality and a potential solution not only for big companies, but also for start ups and individuals. I hope to be able to learn more about the new features, enhancements and offerings.

Cloud Services: essentially a virtualized solution that provides not only the virtual machines, but an OS decoupled solution following industry best practices. This allows you to deploy and update packages instead of whole VM’s while maintaining up time.

Virtual Machines: full range of virtual machines available for the user to control and manage. Updates require the full VM and users need to manage and control up time while patching and updating.

The guys were quite honest when I asked them how Azure compares to Amazon Web Services and similar offerings. They said that regarding Virtualization, it was mostly a case of preference and existing knowledge and infrastructure. However, they claimed that the Cloud Services offering was a step beyond, and that the Web Hosting offering had some unique advantages, like free initial web sites and free small databases. Additionally they claim that the mobile offering is unique. Prices are still based on an hour rate, but there is a price calculation tool to have a better sense on expected costs.

The Retail Case

While talking about the different offerings and the mechanics behind it, I brought in the scenario of virtualizing client machines in retail spaces. This sounds weird even for me, but is something a few colleagues at work had proposed for big retail events, where we have to setup many machines.

See, when you have to setup a couple dozen Windows machines, which will host a Kiosk retail app, open source guys easily jump in proposing that you should use Virtual Machines.Normally, we will just create a full image from a master PC, and then copy that image across all the other machines. The problem is that sometimes you get hardware variations (different CPU, RAM or hardware peripherals) among the machines, and the image fails.

Although my first reaction when my colleagues proposed the use of VMs was to dismiss the idea (I can’t make much sense of creating a Windows VM to run on a Windows machine for a retail machine supposed to run a Windows app in Kiosk mode with full resource access need). However, it is always good to hear different opinions and learn from the discussion. Sometimes you realize that it was you who jumped to a hasty incorrect conclusion.

The Azure folks comment was that generally speaking, running a VM will have less performance than a native machine, and that external hardware access and overall resources availability might be affected. This can be corrected by optimizing the VM and the hardware for the specific scenario, which is what they actually do on the cloud. They have full control over the hardware details and homogeneity of the hardware, and they optimize the core server OS and the VMs for maximum performance. However, in the case of my scenario, hardware might be different, and OS and VM optimization might be actually longer and more complex than just setup the native environment (including cleaning up each machine, tuning it for Kiosk mode and installing the application files and required dependencies). After all, you can easily create batch files to run some setup processes and use third party tools for the clean up.

This conversation was quite interesting for me, not only because I learned more about Azure offerings from the team itself, but because I could discuss my retail scenario and get some validation from guys that have actual real world experience with virtualization.

The Conclusion

The conclusion is that even if you can virtualize anything, it doesn’t mean you should do it !

The Linux Side note (since I remembered after writing all of the above)

Actually, I know that we run into issues changing simple settings of a Linux VM, running on a Linux machine that we where using for one of the servers. It was frustrating to see how the VM just stopped working after changing some basic networking settings, and the actual conclusion was that maybe using a Linux VM was not as good as just running the server side code natively on a Linux machine. See, even virtualizing Linux on Linux might give you problems if the hardware, OS and app software is not optimized for the environment !