400 likes | 586 Views
Applying Virtualization Techniques to Software Engineering. Ben Sabel. Table of Contents. What is Virtualization? Keywords Types of Virtualization Applying Virtualization to the Software Development Lifecycle Disadvantages. What is Virtualization?.
E N D
Applying Virtualization Techniques to Software Engineering Ben Sabel
Table of Contents • What is Virtualization? • Keywords • Types of Virtualization • Applying Virtualization to the Software Development Lifecycle • Disadvantages
What is Virtualization? • Virtualization is the act of abstracting the physical boundaries of a technology • Practical application involves using software to emulate hardware (or software) • Virtualization software creates a virtualization layer within host’s OS or directly on the hardware
What is Virtualization? • Electrical switches example: • Model a computer as processing bits (on or off) • Easy to write software that mimics this • This is the basic premise of virtualization
Keywords • Virtual machine (VM): A software implementation of a machine that executes programs like the actual machine • Host: The system “below” the virtualization layer • Guest: The VM running on the host system
VM Types • Hardware Emulators • Application Virtual Machines (AVMs) • OS Virtual Machines(OSVMs) • Mainframe Virtual Machines (MVMs) • Parallel VMs (PVMs) • Clustering • Cloud Computing • Storage Virtualization
VM Types – Hardware Emulators • Programmatically duplicate physical architectures to provide native functionality for software • Useful for recreating hardware that no longer exists, sharing expensive resources, porting software to different computing system architectures
VM Types – Hardware Emulators • e.g. – Microsoft Virtual PC for Mac emulates the i386 architecture for the powerPC chip http://www.macosxtricks.com/wp-content/uploads/2008/04/microsoft-virtual-pc-7-for-macintosh-full.jpg
VM Types – Application Virtual Machines (AVMs) • Any application written for the VM can be run on any computer capable of running the VM • If this wasn’t used, developers would need to rewrite applications for every different architecture. • e.g. Java VM, .NET
VM Types – OS Virtual Machines(OSVMs) • Creates environment of an operating system for a user • Map physical computer environment on guest operating system • e.g. VMware workstation, GSX server http://www.recomp.org.ve/blog/wp-content/uploads/2010/01/vm-ware-workstation-7.jpg
VM Types – Mainframe Virtual Machines (MVMs) • Allow illusion that each user is in control of a physical computer and OS • Important in that it allows sharing of computing resources • Prevents concurrently running guest VMs from interfering with each other • e.g. IBM’s z/Architecture mainframe systems
VM Types – Parallel VMs (PVMs) • One computing environment running on multiple computers employing distributed processing • Create illusion that only one computer is being used
VM Types – Parallel VMs (PVMs) • Similar to parallel processing, but different in that workload is spread across multiple computers, as opposed to multiple processors in the same computer. http://library.thinkquest.org/C007645/english/images/108-parallel.jpg
VM Types - Clustering • A subset of PVMs, clustering takes a group of computers connected on a network and applies a virtualization layer to make them act as a PVM • Different than normal PVMs in that it can be set up to only draw processing power from computers in the network while they are idle
VM Types - Cloud Computing • A subset of clustering, cloud computing relies on distributing resources over the internet, as compared to simply over a LAN like clustering. • Traditionally refers to storage/hosting, but can also be applied to processing
VM Types – Storage Virtualization • A virtualization layer is applied across multiple storage devices to make them seem like a single resource • Useful in disaster mitigation; if one storage device goes down, only that device is lost as opposed to all storage
Applying Virtualization to Software Engineering • Software virtualization techniques can be used in nearly all stages of the software life cycle (regardless of type of development methodology used) to both improve software quality and accelerate the software lifecycle, therefore increasing efficiency and, presumably, profit
Virtualization in the SDLC • Requirements gathering • Analysis/design • Implementation • Testing • Releases • Maintenance
Virtualization in Requirements Gathering • Can be used as a tool for rapid prototyping and proof of concept development • Reduces the dependency on committing to producing expensive and time consuming hardware early on in process, where company may not be committed to project
Virtualization in Analysis/Design • Virtualization can be used to provide environments for demos for customers before parts for hardware could be collected
Virtualization in Implementation • Can provide a consistent environment for all developers • Large scale projects can be more easily broken into units with assumed virtual units in place of parts of the project a particular group of developers are not involved in
Virtualization in Implementation • Software development can continue separate from hardware using hardware emulators/creation of VMs • Reduces demand to test on limited and expensive hardware – sometimes this hardware may not be available until release • Developers using VM instead of hardware have full access to state of the system, so debugging in many cases is easier • This is especially relevant in embedded systems; allows software and hardware development to occur simultaneously
Virtualization in Testing • A consistent testing environment can rapidly be developed to be used amongst QA team (especially useful in geographically separated teams) • If QA team finds errors, they can quickly take a screenshot of the virtualized testing environment, passing this screenshot to developers
Virtualization in Testing • Sandboxing allows untested code to be separated from other important systems (i.e. critical systems) so errors will not cause harm to host system • A jail is a set of resource limits imposed on programs. These limits can include I/O bandwidth caps, network access restrictions, restricted namespaces, and memory access/usage
Virtualization in Testing • An extension of sandboxing: • Because guest runs on top of host system, monitors can be ran parallel to tests in order to document vital data while testing in case of a crash
Virtualization in Testing • Any time multiple configurations need to be tested (e.g. different printers, operating systems, browsers, audio/video cards), virtualization can take the place of testing on each individual environment • Regression tests and other processing intensive tasks can utilize PVMs to take advantage of increased computing power and decreased time to complete
Virtualization in Testing • Branching tests: • Assume a path is reached where test goes from step A -> B -> C1OR C2 and once you reach C, you can't go back with out having to reset the system and rerun A and B. Also, assume that A and B are much more time consuming than either C1 or C2. By using a virtual environment, we can simply reset the VM instead of physical system or, can take a snapshot at B, and run both paths in parallel
Virtualization in Testing Test 1 Test 2 Tests 1 & 2
Virtualization in Releases • Snapshots of virtualized environments can be easily saved should the system need to be reverted • The goal of integrating virtualization in development is to shorten time to market and ensure release dates are met!
Virtualization in Software Maintenance • Much like in testing, can easily replicate customer scenarios and reproduce errors by taking snapshots of environments and show these environments to developers; making the point of error easier to identify.
Disadvantages • VMs take time to develop, purchase, and/or deploy; may not be an option for small scale projects • VMs add a level of complexity by introducing another layer • Ultimately, hardware emulators only take you so far. Testing still needs to be done on finalized hardware
Disadvantages • VMs are expensive!!! • OSVMs range from free to several hundred dollars per workstation • Emulators range from free to tens of thousands of dollars
Conclusion • Virtualization is a tool that can be used to varying degrees to benefit any type of software project • Virtualization techniques can be applied to any stage in the software development lifecycle, but is especially effective in testing • Applying virtualization techniques provides benefits in cost efficiency, time to market reductions, and a higher product quality
Resources [1] Wolf & Halter, M. (2005). Virtualization from the desktop to the enterprise. New York, NY: Springer-Verlag.[2] Maruyama & Tsutomu (2008). Sharing io devices using hardware virtualization method for component-based industrial controllers. IEEE Software, 705-708.[3] Perrier, (2010, January 26). Embedded system virtualization for executable specifications and use case modeling. Retrieved from http://www.embedded.com/design/222500193[4] Parallel processing: the power in more processors. (2010). Retrieved from http://library.thinkquest.org/C007645/english/1-parallel.htm[5] Matthews, C.; Coady, Y.; , "Virtualized recomposition: Cloudy or clear?," Software Engineering Challenges of Cloud Computing, 2009. CLOUD ’09. ISCE Workshop on, vol., no., pp. 38-43, 23-23 May 2009 [6] Palangala, S. (2009, January 6). The Uses of virtualization in software engineering. Retrieved from http://blog.vmlogix.com/2009/01/06/the-uses-of-virtualization-in-software-engineering/