UP | HOME

Distributed systems

Distributed systems could be used for various purposes, from inter-process communication (possibly in a local network), to instant messaging, and any other kinds of data transmission, on higher distances. They are attractive for a few reasons:

1 Existing systems

There is plenty of them; I am going to write mostly about those which work over Internet, though mesh networks which are based on lower levels are interesting, too. Grid computing systems, like BOINC, are nice as well, but it is not about them. I have not tried much, and there is much more of such systems around, but here is a little overview.

There's also a related wiki category.

1.1 Search

YaCy and a few more (some of which are dead by now) distributed search engines exist. I have only tried YaCy, and it works, though it is not easy to find its technical documentation.

1.2 Generic networks

Usually privacy-oriented and censorship-resistant:

  • Tor and I2P: both support "hidden services", on top of which regular protocols could be used, but it is more about privacy (and a bit about routing), than about decentralization: they provide NAT traversal and static addresses, but that's it. Tor documentation is relatively nice, and there is plenty of I2P docs.
  • Freenet is a distributed data store, apparently not very interactive. Or maybe it is; it's in Java, and I didn't try it myself.

1.3 Mesh networks

Some mesh networks, like Telehash, provide routing as well, though advantages for decentralization seem to be similar to those of Tor and I2P; just better in that they extend it beyond internet. Telehash documentation is also pretty nice and full of references.

1.4 IM and other social services

  • Tox implements its own network (DHT, onion routing, NAT traversal, etc), and has some documentation. Works, though not particularly easy to build, and toxic (apparently the primary implementation) ceases to work after a few days here, requiring a restart.
  • Rival Messenger and Bleep are based on Telehash and BitTorrent, respectively, and IIRC there are some Bitcoin-based messengers as well. Have not tried those.
  • PSYC: though it's rather federated, it is pretty nice, and it's used by secushare, along with gnunet. Can be accessed over IRC, XMPP, or telnet. Although it's rather strange how some parts of PSYC (just as of gnunet and secushare) documentation and software seem to be obsolete/outdated/abandoned, while there is some activity.
  • RetroShare provides a bunch of things, but with a web-based UI, and I gave up on building it.
  • Matrix seems to be getting relatively popular, but uses HTTP APIs, the specification is not available without JS, mentions IoT, there are SDKs (I wonder whether it's ever a useful thing to provide an SDK instead of a single documented library; usually it's just additional pain to work with), web-based clients, etc – seems to be pretty unpleasant overall.
  • Ricochet reuses Tor network, its protocol is documented and doesn't seem to be bloated. Unfortunately, it's bundled with GUI, apparently there is no separate library, and it's in C++ anyway, what would make bindings harder if there was one. Probably it wouldn't be that hard to reimplement (or to extract the non-GUI code bits and make C bindings, to get a reusable library).
  • Other IMs: there is a nice comparison of privacy-oriented IMs, file sharing services, and social networks on the secushare website.
  • Other social networking tools: there is a wiki comparison of those.

1.5 File sharing

BitTorrent, of course, with Mainline DHT.

IPFS seems to be getting, well, maybe not popular, but mentioned here and there. There are papers and it is documented, but the implementations are currently in Go (reference), JS (incomplete), and Python (started). So, that would involve setting the whole Go thing to try.

1.6 Cryptocurrencies

Somehow plenty of those popped up recently.

1.7 Decentralized systems

Some common systems, like XMPP, and even mail, are decentralized, though the latter has a few huge centers nowadays, because of spammers, big companies, and lazy users. It is not exactly what this note is about, but perhaps worth mentioning.

1.8 GNUnet

Not sure how to classify it, but here are some links: gnunet.org, wiki://GNUnet, A Secure and Resilent Communication Infrastructure for Decentralized Networking Applications. Seems promising, but tricky to build, to figure how it all works, and to do anything with it now (a lack of documentation seems to be the primary issue, though probably there's more).

Taler and secushare are getting built on top of it, but as mentioned in context of PSYC above, it's not clear how's it going, how abandoned or alive it is, etc.

2 Ad hoc messaging

Pretty much every distributed IM tries to reinvent everything, and virtually none are satisfactory, but at least some of the problems are already solved separately, and there are:

  • iptables and plain TCP or Tor (which supports transparent proxying, does encryption, and helps to preserve privacy) for routing.
  • TLS/SSH/PGP/SASL/GSSAPI/OTR/etc for encryption and authentication.
  • netcat, socat, pipes, etc for sorting/composing/testing those; also rlwrap to make cli programs such as netcat usable for chatting.
  • IRC, PSYC, XMPP, SMTP for authentication and messaging.
  • Whole multi-user operating systems for all kinds of interaction. And QEMU to isolate those a bit (though VM escaping is not unheard of, so that's just for friend-to-friend activities).

So, maybe just setting Tor, XMPP/PSYC/IRC, and then using OTR is the way to go.

3 Users

Distributed systems, particularly when used for social activities, require users – so that there would be somebody to send messages to in case of an IM. That's quite a problem, since even by sticking to federated networks it is easy to lose or decrease contact with most people one knows, even if those are familiar with techy stuff; apparently it's even easier when moving to distributed and less common ones. Even programmers are quite terrible at using computers, unfortunately.