Scattered Thoughts
2011/05/11

I have a new secret project. It's called Mist. The goal is to make it easy to build, use, distribute and maintain small-scale p2p apps. By small-scale I mean apps where each invocation has at most a few dozen users. You would use Mist to build the next etherpad, not the next bittorrent.

The main inspiration behind Mist is Sugar. Sugar supports seamless sharing of activities (applications) across local mesh networks or the internet, even if some of the peers don't even have the activity installed. Where Sugar is focused on providing a working system here and now, I am more interested in how distributed programming can be made easier in the future. I also want to build applications that I can use myself so my initial target is Ubuntu/Gnome.

Starting from September, I'm going to be doing just enough freelance work to support full time work on Mist. I'm aware that this is a huge project and probably doomed to failure so there a few key principles that I hope will keep me on track. Wherever possible I will reuse existing code and protocols. Mist will be built out of small components each of which are useful by themselves. Where practical Mist will be compatible with Sugar, so that any improvements can be folded back into the Sugar codebase. Finally, Mist is a prototype. The goal will be to get something up and running to experiment with different ways of building distributed apps.

So without further ado here is a misty outline of what Mist might one day look like:

  • Seamless connectivity, serverless presence and activity discovery

    • Mostly borrowed from Sugar

    • Apps communicate over Telepathy tubes

    • Use Sugar presence service for activity discovery

    • LAN / ad-hoc networks supported by Telepathy Salut and Avahi

    • Centralized communication supported using Telepathy Gabble to talk to Jabber servers

    • Decentralized communication supported using a Telepathy plugin for erl-telehash

      • Use telehash peers for ICE

      • Use link-local XMMP to talk

      • Use telehash taps to implement Avahi compatible mDNS

    • Use pgp for authentication and end-to-end encryption

  • Securely portable applications

    • Use an existing system. Some options which will need to be researched:

      • Bitfrost is specific to the XO laptop and probably too hard to port

      • Browsers provide well-tested sandboxes and mobile code but limit access to hardware. Perhaps ChromeOS or Firefox Chromeless?

      • Java apps can possibly be installed securely. Looking at the Android source may be instructive.

  • Development tools for distributed apps

    • Want to experiment with Bloom. I have some ideas for static analysis of bloom programs that might be fun.

    • Expose libraries/APIs for common patterns eg leader election, operational transform

    • Support serverless syncing of contacts, bookmarks, mail etc using DHT with enforced reciprocal storage (pretty sure I've read a paper on this somewhere)

The immediate plan for the next few months (during which I'm still working full time) is:

  • Get erl-telehash working (currently has no test suite and doesn't support taps, _ring/_line or rate limiting)

  • Get ICE working between telehash peers

  • Write a Telepathy backend using erl-telehash and link-local XMPP

  • Extend Empathy to use the telehash Telepathy backend

If you are wondering where Mist gets its name from - it's not the cloud.

P.S.
I am often available for freelance work - check out my resume
Copyright © Jamie Brandon 2011