I've been an absolute Dropbox fanboy for years. Its background resident daemon is an engineering marvel that has saved my life countless times when syncing my code projects between my desktop PC and my laptop. But a few weeks ago, Google finally made a move and launched its highly anticipated Google Drive, transforming the old Google Docs into a full virtual hard drive.
The initial offer of 5 GB free compared to the miserable 2 GB you start with in Dropbox was enough bait to make me bite. I've been migrating my stuff this weekend, and on a technical level, there's a lot to unpack.
The black magic of synchronization: Inotify and deltas
For the average user, dropping a file into a folder and having it appear on another computer is magic. For those of us who write code, we know that behind the scenes there is a complex file system monitoring system. In Linux, for example, this is usually done with the inotify API, which notifies the synchronization daemon as soon as a file is modified.
This is where I've noticed the first major technical difference. Dropbox uses a delta synchronization algorithm (inspired by rsync). If you have a 100 MB Photoshop file and you only change one layer, Dropbox chunks the file, calculates the hash of the blocks, detects exactly which 4 MB block has changed, and only uploads that to the network.
Google Drive, in this initial version I'm testing, seems much less smart. On many large files, I've noticed that, faced with a minor modification, it decides to re-upload the entire file.
On the other hand, Drive has something Dropbox doesn't: native integration with the browser-based office suite. Even so, to synchronize folders that are outside the official Drive directory, I still use the old symlink trick from the Windows terminal:
:: Enlazar mi carpeta de proyectos en D:\ al directorio de Google Drive
mklink /D "C:\Users\user\Google Drive\Proyectos" "D:\Proyectos"
It works like a charm, tricking the client into syncing what I want without moving the files from their original location.
Reflection: The end of local storage?
This cloud storage war, with Microsoft also pushing hard with their SkyDrive, makes me think that gigantic local hard drives' days are numbered for the home user. We are moving towards a "thin clients" model where our computer will simply be a window to a server in Google's server farm.
What worries me about Drive compared to Dropbox is privacy. Dropbox charges you to store bits. Google is an advertising company. If I upload the source code of my personal projects or financial documents, I know that Google has the technical capability to extract keywords. At a corporate level, convincing a client to upload their databases to the cloud is already hard; putting the board's documents on Google's servers is going to require a lot of pedagogy about encryption and legal privacy terms. Convenience always has a price, and today, I'm paying with my data.