Sam's Blog

XMPP vs Matrix

by Sam on February 11, 2022

I’m personally a fan of both XMPP and Matrix. While I can admit that I’m a bit biased in favor of XMPP, I do see huge potential with Matrix. Realistically I probably use Signal more than XMPP and Matrix combined, it was easier for my friends and family to adopt than registering an account on some “weird messaging app” and it offered a level of privacy and security that I was comfortable with. Despite that, I believe that both XMPP and Matrix offer a lot of advantages over signal, mainly the fact that they’re both decentralized. With no central authority (server or company) controlling how the networks can be used, they become very resistant to censorship.

Big differences

While both protocols are very similar when used for chat, there are two major differences that I’ve found.

  • XMPP is an open standard developed by the community, whereas Matrix has a company behind it making decisions on the direction of the protocol.

  • Matrix rooms exist on all servers through room federation, whereas XMPP rooms only exist on the server in which they were created. The advantage that Matrix has here is that if the server in which the room was created goes down, the room will remain active as long as another server was federating in that room.

What should I use?

While at the moment I happen to think Matrix/Element is far closer to Discord or Slack than any XMPP client, and it’s probably what I would recommend to the average user, my personal choice ends up being XMPP + Mumble. While it’s slightly inconvenient using two programs instead of something like Discord or Matrix, the difference between speed and resource usage is really unmatched. Prosody and Mumble-server use 1% of my cpu and less than 100mb of ram combined. Synapse and Dendrite both currently use at least 1gb, with Dendrite peaking at 2gb and Synapse at 4gb. There is a massive difference between Matrix and XMPP at the moment, and while I think Matrix has massive potential, it has yet to reach that point.

Bridging

One of the great things about Matrix is that they aim to “consume” all other chat programs via bridging. You can currently chat with any user or join any room on the Matrix protocol via XMPP and vice-versa. This means hosting a low-resource XMPP server allows you to communicate with the entire Matrix network, with the only downside being no access to chat encryption or voice/video calling. It works great for group chats, however. (for more information check out the matrix-bifrost github page.)

————-Feb 19, 2022————-

For those who found interest in the matrix-bifrost bridge, Aria-net.org hosts their own version with some improvements. Definitely worth checking it out here.