Found on the web: "Introducing P2P Matrix"

Today I learned that Matrix, the federated chat service, is experimenting with a P2P version. A bit of background detail: as a federated service, Matrix has ‘homeservers’ where users have their accounts. In practice, there are a couple outsized homeservers and lots of little ones. If you’re joining Matrix for the first time, you’re likely to pick one of the big two, hosted by Matrix themselves.

The Matrix devs did a really “hamfisted but genius” thing to get it fully P2P: just move the homeserver code into the browser and just put a ‘rendezvous’ (peer discovery/forwarding) server in the middle! Apparently it Just Worked.

Why am I bringing this up here? Three reasons:

  • It’s super exciting to see other DWeb projects succeeding, growing, and empowering people.
  • It reminds me of how we’re intending to progressively replace more and more of sim2h with full P2P, kinda (but not exactly) like how Matrix is going federated → P2P w/ centralised discovery and forwarding → P2P w/ centralised discovery only (future task).
  • It’s not discussed in the above article, but Matrix’s clever eventual consistency algorithm based on a tangle-like DAG is really clever. If you’re building something that requires global events to be ordered, and you don’t require a strict total ordering, it’s worth looking at their algorithm. Go to their home page and scroll down to ‘How does it work?’ for a brief animated introduction. If you conflate Alice, Bob, and Charlie with their homeservers, you can see how you could use their algo in exactly the same way.

Yes! Absolutely, reminds me of how hash-chains with headers work in holochain, although with very different assumptions (local order of the headers matters and cannot be branched by any other agent). Very interesting indeed!

1 Like

Yeah, different assumptions but both part of that lovely world of using DAGs for causal ordering. I think it’s something that hApp devs could use for chronological data on the DHT that comes from multiple source chains. Anything that can tolerate histories that branch briefly without confusing people – chat logs, for example.