Moving forward, single points of failure for our data and daily computing is becoming dangerous. The traditional metaphors of centralized servers and local storage will inevitably become obsolete in an age of ever growing data, and an ever growing threat to the data. IPD, or InterPlanetary Desktops, is a decentralized, blockchain based method of storing and accessing secure and reliable virtual machines. IPD set out to solve the problems of centralized and vulnerable computing, while making use of new technologies that can better improve convenience, and security.
What it does
IPD uses IPFS (InterPlanetary File System), a blockchain based technology, allowing for a secure, reliable, and a decentralized method of storing user data and operating system. A user's standard operating system (such as Ubuntu or Windows), is replaced with the IPD OS. IPD OS can load Virtual Machines from IPFS on the fly, meaning your data is never stored locally and vulnerably, but stored on the IPFS Blockchain.
Effectively, you can access your personal virtual desktop from anywhere in the world, from any computer running the IPD Operating System.
How we built it
The centerpiece of IPD is IPFS, a blockchain based, peer to peer, decentralized storage system. A user's virtual machine is seamlessly uploaded and synced on IPFS, and loaded from any computer running the IPD Operating System.
The IPD OS is derived from Ubuntu Linux, running a custom user interface written in Electron. This UI is run independently on the computer, using OpenBox and X11. The UI allows the user to login and access their virtual machine. The VM's themselves are run using QEMU/KVM, a fast and consistent virtualization platform. This means that a user's virtual desktop will run the same, regardless of the computer they are accessing it from.
User's register their accounts from a Registry. A registry is a standalone node.js server that keeps track of registered users, and their virtual desktops (represented as IPFS hashs). There doesn't have to be any single registry, as users can choose a hosted solution, or run their own. The important data (this is, the VM image) is stored on IPFS.
The registry is an important feature of IPD. A file uploaded to IPFS is referenced using a unique hash. If changes are made to a file, a new hash is generated. The registry keeps track of these hashs and let's the IPD OS load the correct one.
The IPD reference registry is run on Azure. The Azure VM has a couple of roles, including running the registry, running the IPFS Daemon (ensuring fast delivery of VM images), and distributing "base" OS images (from which user images are derived from).
That is: user VMs are stored (decentralized) on IPFS. From any computer running the IPD Operating System (based on Linux), from any place in the world, a user can run and access their virtual desktop by logging into a IPD Registry. The virtual desktop is fetched from IPFS and is run on QEMU/KVM. After they log out, the data is synced back with IPFS, ready to be accessed once again.
Challenges we ran into
Besides code, we only ran into a few issues. We spent some time on working on IPD OS. In the end we use the "nodm" display manager to launch OpenBox, which starts our UI frontend. Another small issue we ran into was with registering our Azure VM. The Azure panel is quite slow at times, and we ran into one issue where a new virtual network wasn't being created with the new VM, causing the setup to hang.
Accomplishments that we're proud of
For us, the fact that we were able to pull this off in the timeframe given is, quite frankly, amazing. There was a lot to deal with, and an equal amount of debugging, but we have a (more or less) prototype that has everything we envisioned. Another big accomplishment was in the efficiency in implementation. Rather than saving the full VM image to the blockchain, which would be slow (an image for Windows 10 is about 7GB), we use QEMU's Copy on Write feature. This means that images that are saved to the blockchain are simply the difference from the base image (that is, the user's custom data).
What we learned
We learned quite a broad range of topics. For one, we learned quite a bit about blockchains and IPFS. We also got much more familiar with NodeJS and Electron (and it's many quirks). Finally, we learned more about the architecture of a Linux-based OS, such as running a custom application on X11 on boot.
What's next for InterPlanetary Desktop
We believe IPD has a bright future ahead of it. For one, we will definitely refactor parts of the code that were written subpar (due to the time limitations). There are lots of little enhancements and tweaks we would do to improve the overall user experience. For example, a progress bar when fetching the users image from the blockchain.
How to install IPD OS Manually
Use the utility nodm to start IPD on boot from any Linux distribution.