Saturday, June 19, 2010

Live Collaboration on Dropbox

The only major shortcoming on Dropbox is that users cannot simultaneously collaborate on their shared project files. Successful integration of live editing applications into Dropbox has the potential to be massively awesome.

Dropbox recently exposed a beta API, but after receiving my developer key and researching it more thoroughly, I was underwhelmed. Applications are restricted to using a single sandboxed folder in the user's dropbox. I emailed the Dropbox team to find out why this restriction was put in place. The response is here:

You are right, for web applications we restrict access to a specific sandbox in order to reduce the risk that, should your web application get hacked, user's entire set of files are not at risk. Combined with OAuth and tokens this gives us a good balance between giving your application access, but keeping the users safe.

We are looking at some alternative security ideas, such as mime type based, or explicit folders, but right now there's not enough demand for that yet.

Sorry about that.

So, back to the drawing boards. For round two my main sources of inspiration were TiddlyWiki and LaTeXLab's CLSI. The proposed solution is a crafty combination of TiddlyWiki's local saving capabilities, Dropbox's Xtreme syncing capabilities, and a p2p collaborative system developed by some dear friends of mine. Check out the system outline.

Gush Architecture

Each "app" is a single, local HTML file that loads the .jar file as applet to handle file and collaboration operations. The .jar file is responsible for loading, saving, pushing and integrating mutations. When a file is opened for editing, a temporary folder is created next to the file. This folder contains pending mutation files and a editors file that keeps track of users that are currently editing the file and who the "leader" is. The leader is responsible for consuming all the pending mutations and updating the file being edited. The last editor to exit is assigned the task of consuming any pending mutations and deleting the temporary folder.

The applications are "installed" by visiting the Gush Management website, which allows users to install the Gush application to their Dropbox. This adds a sandboxed folder that houses the HTML apps, the .jar file, configuration and usage information (not collected, but used to smooth the user's experience).

No comments :

Post a Comment