Devoxx: Developing Beyond localhost by Brian Leonard

Brian demoed how combining VirtualBox and ZFS can provide a very flexible and dynamic development and testing platform for web-developers. VirtualBox is a simple, free yet powerful virtualization tool. It allows you to setup very easily virtual machines having multiple OS's and configurations. You don't even have boot those virtual machines over and over again: a snapshot can be saved, and restored almost instantly. After setting up several virtual machines, you quickly get a relevant set of client-machines on which you can test your webapp. All virtual machines get a unique ip address, so connecting to the web server from you virtual client is as simple as finding out your local IP serving the web app. Since all vm's are simple files, you can backup the 'clean' vm's and start playing around with them. Restoring a vm is as simple as restoring the original snapshot file. Virtual Systems can run windows outside of the 'vm-box', or on contrary, you can run the Virtual machine full-screen; that way it's easy to forget that you were actually playing in a virtual environment.

I really do like the Virtual machine principle and Virtual Box is a pretty neat solution -- for free! The issues however start with closed OS's: Windows e.g. requires new license keys and Mac OS doesn't run on Virtual Box.

The ZFS (file system) is a crown-jewel of Sun. Its feature-set (security, backup ...) really stands out compared to legacy NFS, ext2/3 etc. In ZFS creating a volume is almost as cheap as creating a directory. Brian used this on his OpenSolaris laptop to create a dedicate ZFS volume under his home directory for Virtual Box snapshots. ZFS-volumes can be configured to take regular snapshots, or to take the snapshot on request. After messing around with his Virtual Box snapshots, he simply undoed everything with a single ZFS "restore snapshot" command in only a few seconds. Truly amazing.

I really think ZFS should be supported in Linux, although the CDDL license is not compatible with GPL v2. There is a zfs-on-Fuse project (=file system in userspace), but it is still in beta fase and performance should be lower than native kernel support. Although the excellent ntfs-support (ntfs-3g) also uses fuse with good performance.

Post a Comment