October 2019 Archives

Sat 26 Oct 2019 03:51:39 PM UTC

Messaging over the Internet (and why I like XMPP)

Given the current state of messaging/chatting over the Internet, the popular options are WhatsApp, Facebook Messenger, Telegram and so on. All these are owned by corporations and pretty much black boxes. Apps like Signal and Keybase are also available that primarily advertise privacy and encryption. They are also partially open-source. However, they lack one important aspect that I will come to shortly. Since all these are pretty-much well-known alternatives, let me cover a couple of others briefly.

IRC

Around 2011, I came across IRC where lots of open-source developers hang out on "channels". It is their Slack. These channels are open to public where you can join and ask around your questions (in a smart way, though) and talk directly to developers. I found this accessibility really cool and started to hang out on few channels. However the problem with IRC is that once you lose connectivity even for a short time, you are disconnected from server and you lose messages during that time. So it is kind of stateless. I wondered why there isn't something that is more like Yahoo! Messenger (Remember?), but didn't dig into it much. Shortly after having an Android phone, I installed an IRC client on it and used it a few times to chat while on the go. But that much was as far as my interaction with IRC.

XMPP

Sometime in early 2019, I came across disroot.org as an alternative to few Google services and while browsing the services they offered, I saw XMPP as one of the services. I tried it and found that it was what I was looking for in an IRC alternative years ago as XMPP stores messages on server when you are not logged in. I browsed couple of XMPP servers and group chats (or MUCs - Multi User Chats in XMPP parlance) but found majority of them either Russian or other Europian languages, so was kind of put off. XMPP, however, is an old protocol and Google Talk used XMPP too, although, it dropped support for it and went onto a different path.

Fast forward to couple of months back, when I started setting up this server I was looking for things that people host on their own. And there I found XMPP server! I will cover the details of that part in another post, but since then I became a regular user of XMPP. Using the profile I created on my server, I joined few group chats (MUCs) and made few friends with whom I often chat 1:1.

After using XMPP, what do I look for in a messaging solution?

With the experience of using different messaging platforms and hosting own XMPP server, I have few preferences for an Internet messaging solution.

  • Federation: This is the aspect that I talked about that most messaging platforms lack. It means that through common standards, multiple providers achieve interoperability and provide compatibility to users. Today you can not sign up on WhatsApp and talk to someone on Facebook Messenger even though they are now owned by a single company. They would be having totally different standards and implementation that would take Facebook some work to achieve interoperability. Why this compatibility is not present out of the box brings me to the second aspet that I look for.
  • Protocol, not platform: When choosing one solution over the other, I would see which one is a defined protocol and not a developed 'platform'. The reason why WhatsApp and Facebook Messenger wouldn't easily talk to each other is because neither declares - "Hey! I talk this standard protocol. Anyone talking according to this protocal can talk to me!". Internal to companies there may be a design specfication but it's not public. In contrast to these, let's talk about XMPP now. As the name itself suggests - it's "eXtensible Messaging and Presence Protocol". Since it's a simple protocol, it allows for two huge benefits - first, anyone is open to implement it in whatever way they like; and second, anyone is open to host their own server and it would be able to talk to any other XMPP server! This allows federation out of the box without any overhead. Even IRC is an application layer protocol. But by its specification it doesn't allow federation. A user has N different identities on N different IRC servers. However, it being a protocol allows you to host your own IRC server in case you wish so.
  • Easy to self-host: If the above two aspects are theoretical, this one manifests as a strong practical effect of both. A solution that gives you ability to self-host gives you the entire ownership that is not achieved by any solution that lacks it. Self-hosting in general gives you control over where and how your data lives, what information is logged and how secure you have kept things. Talking about XMPP, it is fairly simple to bring up your own instance with security enough for practical purposes. If you wish that only your friends and family register on it, you can always do that too. Or otherwise if you just want to get started quickly, you can register on any of the available public servers, both free and paid.
  • Encryption: Today when every possible solution advertises encryption among their top three features, lacking it isn't an option on the table. XMPP has support for OMEMO as well as OpenPGP, so it is a pretty strong contender there as well.

All in all, after using XMPP for couple of months, I have realized that it has everything that can be expected from a modern Internet messaging solution. You can log in simultaneously from multiple devices from your mobile as well as computers, you can send images, videos, files, etc., emoji support (yay!) and just one XMPP account allows you to talk to any other user and group on any XMPP server! I am hopeful that more and more people will use it.


Posted by Shaarad | Permanent link | File under: linux