Brussels / 1 & 2 February 2020

schedule

The Path to Peer-to-Peer Matrix

In which we throw away DNS and run Matrix clientside over libp2p and friends


Matrix is an open source project run by the non-profit Matrix.org Foundation dedicated to building an open protocol and communication network for decentralised, encrypted communication - providing a viable open alternative to WhatsApp, Slack, Discord an other proprietary communication silos. In this talk we will show of the work we've been doing over the last year to shift Matrix from being a decentralised-server architecture to a fully decentralised-client p2p architecture, through running clientside homeservers and experimenting with libp2p and friends as a p2p transport. We'll also show the route we'll be following over the year to go from proof-of-concept to the live Matrix network.

Traditionally Matrix decentralises communication by replicating conversation history over a mesh of servers, so that no single server has ownership of a given conversation. Meanwhile, users connect to their given homeserver from clients via plain HTTPS + DNS. This has the significant disadvantage that for a user to have full control and ownership over their communication, they need to run their own server - which comes with a cost, and requires you to be a proficient sysadmin. In order to fully democratise communication and eliminate a compulsory dependency on a homeserver, we've started seriously working on making Matrix run as a P2P protocol by compiling homeservers to run clientside and using P2P transports such as libp2p - while seamlessly supporting all existing Matrix clients (e.g. Riot.im), bots and bridges with negligible changes. This work includes:

  • Compiling Matrix homeservers (e.g. Dendrite) to efficiently run clientside
  • Layering HTTPS over P2P transports such as libp2p (e.g. https://github.com/matrix-org/libp2p-proxy)
  • Switching Matrix identifiers from @user:domain tuples to be Curve25519 public keys (MSC1228)
  • Decentralising accounts so they can be hosted concurrently on multiple nodes (e.g. a mix of server-side and client-side homeservers)
  • Experimenting with node discovery from DNS to DHTs and other mechanisms (e.g. gossip mechanisms)
  • Experimenting with smarter bandwidth-efficient routing algorithms than full-mesh (e.g. combinations of spanning trees, overlapping spanning trees, gossip mechanisms)
  • Making Matrix's low-bandwidth CoAP transport production grade
  • Experimenting with metadata-protecting relay mechanisms rather than using full homeservers for server-side relaying.

In this talk we'll show off our progress so far, and lay out the path forwards over the coming year as we go from proof-of-concept to the live Matrix network.

Speakers

Photo of Matthew Hodgson Matthew Hodgson

Links