Brussels / 2 & 3 February 2019

schedule

Breaking the 100 bits per second barrier with Matrix

An entirely new transport for Matrix for really terrible networks.


The Matrix team has had a lot of fun recently investigating radically more efficient transports thanks to a challenge to get usable client-server and server-server communication on links as bad as 100bps. In this talk we're give a tour of the network simulation environment we've built and the transports, encodings and routing algorithms we've used to slash our network resource utilisation. We'll also look at what this could mean for open source push notification implementations.

Matrix is an open protocol and network for secure decentralised communication which uses HTTPS+JSON as its baseline transport and encoding. Whilst HTTP is convenient for developers, it's not the most resource-efficient solution for instant messaging. Matrix has always theoretically supported alternative transports, and we finally got an excuse to build one and push it to a ludicrous extreme - to try to operate usably over links as low as 100bps, as high as 4s latency, and up to 40% jitter. The approaches we've taken include:

  • Building a Matrix simulator (FOSS) which lets you dynamically spin up hundreds of real containerised homeservers in a virtual physical network to investigate and model performance
  • Switching from full-mesh routing to spanning-tree and thicket-based fan-out routing to avoid overloading links
  • Switching from HTTPS+JSON to compressed CBOR over CoAP with DTLS+PSK (ChaCha20-Poly1305)
  • Investigation of CoAP-over-QUIC and performance comparison with HTTP/3
  • Comparison with MQTT
  • Investigation into using this to power open source decentralised push notifications service.

We'll talk through our findings, show off the simulator (which is ridiculously fun), spin up a ton of servers and log into them, break the network, and see just how well everything holds up...

Speakers

Photo of Matthew Hodgson Matthew Hodgson

Links