Breaking the 100bps barrier with Matrix, meshsim & coap-proxy | Matrix.org

matrix.org
5 min read
standard
Article URL: https://matrix.org/blog/2019/03/12/breaking-the-100-bps-barrier-with-matrix-meshsim-coap-proxy/ Comments URL: https://news.ycombinator.com/item?id=28638375 Points: 1 # Comments: 0
Hi all,

Last month at FOSDEM 2019 we gave a talk about a new experimental ultra-low-bandwidth transport for Matrix which swaps our baseline HTTPS+JSON transport for a custom one built on CoAP+CBOR+Noise+Flate+UDP. (CoAP is the RPC protocol; CBOR is the encoding; Noise powers the transport layer encryption; Flate compresses everything uses predefined compression maps).

The challenge here was to see if we could demonstrate Matrix working usably over networks running at around 100 bits per second of throughput (where it'd take 2 minutes to send a typical 1500 byte ethernet packet!!) and very high latencies. You can see the original FOSDEM talk below, or check out the slides here.



Now, it's taken us a little while to find time to tidy up the stuff we demo'd in the talk to be (relatively) suitable for public consumption, but we're happy to finally release the four projects which powered the demo:

https://github.com/matrix-org/meshsim - meshsim is the network simulator which provides an interactive web interface to draw a network topology and let you spin up dockerized homeservers on a simulated network with whatever preferred latency, jitter, packet loss etc.

https://github.com/matrix-org/meshsim-docker - meshsim-docker is the custom synapse + coap-proxy Dockerfile used to define the containers which meshsim instantiates

https://github.com/matrix-org/coap-proxy - coap-proxy is the golang proxy which converts HTTPS+JSON into CoAP+CBOR+Noise+Flate and vice versa, letting you squish Matrix CS API and SS API traffic in & out of CoAP.

https://github.com/matrix-org/go-coap - go-coap is a fork of the Kistler-Group's go-ocf/go-coap (in turn originally a fork of dustin/go-coap) which adds encryption using Noise, retries, and hooks for compression.

In order to get up and running, the meshsim README has all the details.

It's important to understand that this is very much a proof of concept, and shouldn't be used in production yet, and almost certainly has some glaring…
Matrix.org
Read full article