Knowing Application Virtualization
The last blog on Virtualization provided what you could term a 'laundry listing' of a number of Virtualization types to reinforce the fact that -'Virtualization means a lot of different things ...'. Another growing Virtualization concept is called 'Application Virtualization' and Microsoft's Application Virtualization Solution (App-V) is an interesting advancement of this virtualization type.
It is often the case that applications are designed (unknowingly) to cause a change in the state of the machine on which they run. Installation of applications often cause existing files to be overwritten, cause changes in common locations like the Program Files directory or affect the settings in registry locations like the COM registration database for example. The net result of such an application installation is that other applications that had been running well and fine start to complain. This happens because a new application installation mingles it's state with the state of the machine thus affecting existing applications. Despite you trying to install an application in a specific folder (during the process of installation), there is usually something that the application installation ends up doing in common locations like C:\Windows\System32 etc. (driver files etc.) which changes system state by overwriting/replacing configurations or files. This might be a necessity for the application to execute as per it's design.
Microsoft has obviously put in a lot of thought in such issues (one of the manifestations of which is the DLL Hell problem) and that shows in the introduction of concepts like manifests, the global assembly cache etc. which to a certain extent help prevent existing applications from being affected by new installations. But, then expecting a re-write of existing legacy applications is a hard ask when you would ofcourse want to stay ahead of your competitors by adding new features to your product rather than re-write the complete application (ofcourse a pros and cons analysis could also favour an application rewrite considering the sheer benefits of new technology).
Microsoft's Microsoft Application Virtualization (App-V) is one such solution that allows applications to run within a virtual environment (a virtual bubble), thus allowing application updates and state changes in isolation from the original environment where the original applications execute. The idea is to fool the application running within the virtual bubble into believing that it is running on the actual system and making updates on the system folders and registries, when those updates are actually diverted to what is called a Virtual File System and Virtual Registries.
The App-V solution contains client side and server side components which combine to provide the complete application virtualization experience. The client component, which runs in both the user mode and kernel mode, simulates the virtual bubble which intercepts the application's I/O requests and diverts them to the Virtual File System and Virtual Registry. The server side component hosts the actual application (as a collection of bytes) and streams it down to the client whenever requested. This sort of an architecture reflects facets of what is the SaaS or S+S model because the application is streamed down to the host only on demand ('click to run' starts the process of streaming down and starting the application on the host) as a service at a minor scale.
One noteworthy architectural detail is that the concept of demand paging (the OS demand paging scheme is mimiced at the network level to some extent) is implemented here where only parts of the application that need to be initially displayed and used are streamed down first and then based on demand (in case the user maneuvers to a part of the application that has not been streamed down to the client), a request for the corresponding block is made and delivered. Even without a demand being made, necessary parts of the application are streamed down in blocks of bytes of data to slowly build up the application image on the host, even as the user is already using it. (Application streaming needed not be internet (http/https) based though but can also be accessed over a CD or a USB drive)
The end result of the process is an application running on your machine as if installed (though not really installed) providing you all the facilities of an installed application without messing up the system state. User data is stored in the host machine file system just as one would in a normal application.
Application Virtualization extend the life of legacy applications on newer systems by executing them in a virtual bubble. In addition, one can run multiple applications side by side (which might not have been possible earlier in case they affected each other's state) without each application affecting the other. An often quoted example is the execution of two versions of MS Office (2007 and 2003 for example) at the same time on the same machine (with no virtual machine to run them in).
One of the complexities in Application Virtualization solutions is to identify what in the application causes changes in system state and then isolate them. The designing of an application on Windows today needs careful thought as regards the components being used and the affect on the state of the machine if these components are removed or updated. As mentioned earlier, Microsoft's assembly versioning concepts, advice to application designers to using avoid registry (in favour of application configuration files as provided in .NET application development) are pointers to ways of avoiding state changes in the system. It is important that changes be localized to a particular known location rather than spread across the system. (Wonder if that was one little consideration in the security attributes feature in Vista which prevented easy updates to the contents of C:/Program Files folder). Doing this might help in easing the process of hosting applications virtually thus enabling ease of deployment on client machines (no installation required) and easier software life cyclemanagement (with the software being hosted,maintained and patched centrally).
Though the focus here has been on Microsoft's Application Virtualization Solution (formerly SoftGrid), there are other players in the market like VMWare with Thinstall and Citrix who are contributors to solutions in the Application Virtualization space. However, each vendor is different as regards the methodology adopted.

