How LivePCs™ Work
A virtual machine is an image of a computer's state. Typically, most of the state consists of the the contents of the computer's disks, and includes the operating system and software installed on the computer. If the computer is running, the state also includes the contents of the computer's RAM.
A LivePC™ is a series of these images, that captures the evolution of the computer's state. Every update of the LivePC, say, due to installation of new software or update of existing software, creates a new image. These images are immutable, and are represented as a series of differences for efficient storage and transport.
Operations on LivePCs
Playing LivePCs. Every time a LivePC is played, the moka5 LivePC Engine™ runs the latest LivePC image if it is connected to the network. Conceptually, the Engine downloads the latest image from over the network every time a LivePC is played. Since computer images can be gigabytes in size, a direct implementation of this concept would be very slow. The moka5 LivePC Engine, however, has several optimizations such as demand paging, prefetching, and caching to eliminate transfer overhead.
Sharing LivePCs. The moka5 LivePC Engine allows you to create new LivePCs, either from scratch or by deriving from another users' LivePC. You can then share your LivePC in a few steps:
- 'Package' up the LivePC.
- Host the LivePC and subsequent updates on a http server.
- 'Post a New LivePC' at moka5's web site. You can choose to include your LivePC in the LivePC Library, or you can share it with your friends by posting it on your web site or by sending the link to your LivePC in email messages.
As you make changes to your LivePC, you can repeat these steps to package and host your LivePC updates. The only difference is that you will edit the existing LivePC entry on moka5's web site instead of posting a new LivePC.
LivePC subscriptions. Users can click on a LivePC to subscribe to it and moka5 LivePC Engine will provide automatic updates to the subscribed LivePCs.
User's Personal Data
The state of a LivePC is separated into system state and user state. The system state consists of the operating system and all the installed software, while the user state consists of the user's personal data (e.g., the user's profile in Microsoft Windows XP). The LivePC's system state is maintained by the LivePC administrator. Here are some details on how the LivePC Engine manages the user data.
Location of User Data. A LivePC can have its user data stored in a separate virtual disk or in a network mounted file system. When stored as a virtual disk, the disk is made to persist across updates to the system state. Furthermore, the moka5 LivePC Engine also allows a LivePC to mount a folder on the host computer as the 'My Documents' folder in the LivePC. If authorized by the user, it also allows trusted LivePCs to mount a 'shared' folder on the host computer and thus share data between multiple LivePCs.
Backing Up Removable Storage Devices. When a LivePC Engine is installed onto a Removable Storage Device (e.g., portable USB drives or iPods), the user gets to choose if user data should be backed up onto the home PC. The backup takes place in the background whenever the Removable Storage Device is plugged into the home PC. The LivePC Engine displays the status of the backup, and indicates when the backup is complete.
Losing a Removable Storage Device. It is easy to recover from losing a Removable Storage Device. Simply get a new device, plug it into your home PC and install the LivePC Engine; the installer will detect the backups of your lost Removable Storage Device, and prompt you to restore your data onto the new device.
Under the Hood
Subscriptions. Every LivePC has an XML feed associated with it on the moka5 LivePC Library server. The XML feed points to the URL of the most recent image of the LivePC. When a user subscribes to a LivePC, the moka5 LivePC Engine subscribes to the XML feed of the LivePC, and thereby gets the URL of the LivePC's recent image. Every update to the LivePC causes the XML feed to be updated; LivePC Engines subscribed to this feed will see the update and begin using the new image.
After a user subscribes to a LivePC, the LivePC Engine uses the URL in the XML feed to fetch the most recent image of the LivePC. It prefetches the image block by block from the http server hosting the image, and stores it in a local cache. When the LivePC Engine runs a LivePC, it uses the blocks in the local cache, if present; otherwise, it demand pages the block from the network and stores them in the local cache for future use.
LivePC Management. LivePCs have a self-healing property by default, whereby the system state is restored to its published image on every reboot. The LivePC Engine supports self-healing quickly by isolating all changes made during a session to the system state using a copy-on-write virtual disk. The next time the LivePC is restarted, these changes are discarded.
When a LivePC is created by deriving from another LivePC, the creator can choose to just package up the differences. Subscribers who have cached the original LivePC need to transfer only the modified blocks.
The LivePC Engine is constantly prefetching blocks for the LivePCs you have subscribed to. This is throttled so it should not impact your normal computer usage. When you package a LivePC, optimization information is included that helps the prefetcher to fetch the most useful LivePC blocks first, such as those needed for bootup and performing common tasks in common applications.
When you choose 'Let me use this LivePC offline', you are pinning all blocks associated with that LivePC in your local cache, so they will not be evicted by another LivePC later if your cache gets full. This guarantees that once the LivePC is fully in cache, it will stay there - making it safe to use the LivePC even without an Internet connection.
Back up When the LivePC Engine is first installed, it can be associated with a home computer. Subsequently, it recognizes the home computer whenever it is plugged into it. The backup software identifies the files that have changed since the last backup and backs them up in the background. It throttles its activity whenever the computer is used so as not to have a negative impact on users' interactivity.
Example Scenarios
Here are some interesting scenarios that show off the LivePC Engine.
SP2 update. The traditional approach involves each computer downloading the SP2 update in the background, and individually applying the SP2 update; applying the update itself could take up to half an hour. The update may or may not succeed, and each end-user has to try out the result of the update.
With LivePCs, only the LivePC maintainer would download the SP2 update in the background, apply the update, test it, and publish it as an update to the LivePC. The subscribers will download the update to the LivePC in the background, and when the LivePC reboots, they get to use the result of the tested update without having to wait for the update to take place individually.
Trying out LivePCs. Often, you would like to check out some new software, but do not want to bother with the hassle of installing the software; worse still, the software you want to try out may mess up your computer. You may want to use a virtual machine to provide the isolation but VMs can take a long time to download.
We did an experiment with a moderately sized LivePC, of size 1.2 GB. On a DSL connection, it took about 200 minutes to download the entire LivePC VM image. With our optimizations, the LivePC was ready to run after transferring 5% of its blocks, which took about 10 minutes. Furthermore, if you don't like the looks of the LivePC after trying it once, you can simply delete it. Left on its own, the LivePC Engine will eventually fetch all the blocks.