In this document you will learn some of the key ways that you can use virtualization technologies to improve your application development experience.
It used to be that we talked about DLL hell. This was a place where everyone who was evil enough to try to run too many applications on their computer ended up. One day you would install a new application and you would be instantly transported into DLL hell. You would try replacing one DLL after another. You would move DLLs to individual application directories. In the end you would end up feeling as if you were just shuffling the DLLs, trading one problem for another.
While we've made some progress from the days when DLL hell was inflicted on most developers at some time or another, we have not fundamentally resolved all of the issues that are caused by trying to take one machine and get it to serve multiple masters. A more current day challenge might be trying to run multiple versions of Windows on one hard drive, or Linux and Windows side by side on multiple partitions. No matter where we are in the technology lifecycle, we've seen how we can try to get one system to do too many things and have had to live with the challenges. This is where virtualization technology comes to the rescue.
No longer do you have to mix two applications that don't get along together just because you only have one PC on which to work. Virtualization technologies allow you to run multiple, independent operating systems which have the ability to be isolated completely from other processes running on your PC.
In this article you'll learn some of the key ways that you can use virtualization technologies to improve your development experience.
You've got to keep them separated
In the situation described above there was no avoiding DLL hell. If you wanted to run multiple applications on the same machine you had to be concerned about whether or not you were going to have incompatible DLLs installed by two necessary applications. However, virtualization provides a completely independent operating environment, complete with its own allocation of memory, hard disk, and use of processor time.
Virtualization is, in essence, creating multiple miniature (virtual) PCs inside of your primary PC. One of the great benefits of this is that it allows you to isolate and test an application or set of applications in an environment that is free of other things to interfere. It used to be that in order to get a new machine with a new development environment on it you had to have another piece of hardware, or you had to rebuild your system to the new environment. With virtualization, you simply install the new environment that you need into one of the virtual machines and you run it as necessary. When you're done you can shut it down.
Virtualization is the ultimate in isolation -- it can allow you to do things on one piece of hardware that are simply not possible without it. For instance, you can install software in a test environment on a member server because it won't run on a domain controller. You simply fire up two virtual machines at the same time -- one being the domain controller and the other being the member server. Both virtual machines can run on the same physical hardware at the same time without either being aware that they are sharing a machine. The result is a quick way to implement testing environments.
In a typical organization when you end your work for the day you shut down all of your applications and log off of your computer. You must stop whatever development or debugging activity that you were working on and let the machine hum quietly away at night, waiting on the network team to send patches and updates. The next morning you dutifully log in and spin up all of the things that you were working on. While neither of these activities are particularly difficult or individually time consuming, when multiplied across dozens of developers across the course of years, the time spent just starting up and shutting down development environments and reestablishing the context of a development or testing effort can be substantial.
Those developers fortunate enough to be on laptops know that using hibernate or standby on the laptop can be a great benefit -- even if there are times when it causes odd things to happen. As a consultant who moves from client to client the ability to stop my computer and resume what I was working on when I arrive at the client is a huge time saver.
While standby and hibernate are a great start, they do have their limitations. It may preserve your overall context, but it doesn't save any project specific context that you may have. The development environment doesn't have the important files for your project open. It doesn't have the special settings to facilitate debugging that the project needs.
Virtualization technology allows for the virtual systems to be frozen in place. In other words, the exact spot in the machine that you are at can be frozen for an indefinite period of time. If you work on one project until it's released and stable and need to come back in a year and start working on it again, you can freeze the system when you stop working on the project and then restart it a year -- or more – later. When the system is restarted it will be like time had not passed. The system will be restored exactly as it was left.
This particular feature is great for developers who support multiple systems including consultants who have different clients with different projects that they will have to support over time. You don't have to worry about recreating an environment to test a bug fix; you simply thaw out your virtual machine and go.
Turn back time
Have you ever made a mistake? Everyone has made mistakes; it's a part of the human condition. However, sometimes mistakes aren't so easy to recover from. If you write a piece of code that accidentally destroys your registry or corrupts your user profile you may find hours, or even several days worth of work ahead of you. We've all had those moments when we know we've made a big mistake. Most of us deal with the consequences of making a mistake by moving forward and making the best of it. However, virtualization technology allows us to turn back the hands of time.
Virtualization programs have a feature described as Undo disks. Undo disks allow you to operate on the system and if you decide that you don't want to save your work you simply don’t' accept the changes in the undo disks. Poof. Like magic everything that you did is undone and it's like it never happened.
Imagine that you're working on an installer for your application and you need to install your application on a "clean" machine. Of course, building the install is an iterative process while you identify problems in the installer. How do you get a clean machine for each run? Leveraging the undo feature allows you to install over and over again on a single virtual machine. After each failed or incorrect installation you simply discard the undo disks (the changes) and prepare to start again.
Suppose that you're working on a program to delete duplicate files and something runs amuck with the program and it starts wildly deleting files. If you're using undo disks you can simply discard the changes and the files will be instantly restored.
Two admissions when it comes to undo disks. First, they take more space. They will require space for each sector on the hard drive that is written during the course of the session. This can be a substantial amount of storage for large operations. Second, they slow things down a bit. Because of some extra lookups to determine where the data is and non-sequential disk access running with undo disks on takes more time. Of course, if you can live with the slightly slower performance it's a great tool to back you out of a jam.
Virtualization technology is what the buzz is about today. People are talking about reducing servers, consolidation, and other ways that virtualization impacts the IT landscape, however, little awareness has been created at the benefits that virtualization technology brings the developer. The ability to maintain isolated environments, keep your place when shifting to another project, and the ability to roll back unintended changes are great (legal) performance enhancers for software developers.