Hacker News new | ask | show | jobs
by jamii 5526 days ago
I've been thinking about this sort of thing a lot lately. Sugar (http://www.sugarlabs.org/) get a lot of things right in terms of p2p user interaction. If you want to, say, edit a document with a friend you just click invite and Sugar will handle everything else. It will even send them a copy of the editor app if they don't have it installed.

I think developing small-scale p2p apps (eg IM, 1-1 audio/video, multiplayer-editors ala etherpad) can be made a lot easier than it is today. My rough plan of attack is to use erl-telehash (https://github.com/jamii/erl-telehash) for addressing and NAT traversal with something similar to bloom (http://www.bloom-lang.net/) for coordination / logging / debugging. Add libraries for at-least-once messaging, leader election and operational transform. Maybe piggyback on chromeos or android to get secure p2p app installation.

I also had some thoughts about the CALM hypothesis (http://www.bloom-lang.net/calm/) which I haven't seen mentioned in the literature. A monotonic bloom program is one in which every delivery order for a given set of messages results in the same state. For many protocols what I actually care about is that every possible end state is equivalent, for some protocol-specific notion of equivalence. For example, for leader election all I care about is that every end state should have exactly one leader. Monotonic programs are easy to model check and I think explicitly stating the desired equivalence relations will reduce the state space explosion at points of order. It might be possible to get good results from a very simple/naive model checker by exploiting this.

Not hugely related to the article, but its been on my mind a lot lately.