Title: How to choose a communication protocol
Author: Solène
Date: 25 June 2021
Tags: internet
Description: 

# Introduction

As a human being I have to communicate with other people and now we
have many ways to speak to each other, so many that it's hard to speak
to other people.  This is a simple list of communication protocol and
why you would use them.  This is an opinionated text.

# Protocols

We rely on protocols to speak to each other, the natural way would be
language with spoken words using vocal chords, we could imagine other
way like emitting sound in Morse.  With computers we need to define how
to send a message from A to B and there are many many possibilities for
such a simple task.

* 1. The protocol could be open source, meaning anyone can create a
client or a server for this protocol.
* 2. The protocol can be centralized, federated or peer to peer.  In a
centralized situation, there is only one service provider and people
must be on the same server to communicate.  In a federated or
peer-to-peer architecture, people can join the communication network
with their own infrastructure, without relying on a service provider
(federated and peer to peer are different in implementation but their
end result is very close)
* 3. The protocol can provide many features in addition to contact
someone.

## IRC

The simplest communication protocol and an old one.  It's open source
and you can easily host your own server.  It works very well and
doesn't require a lot of resources (bandwidth, CPU, memory) to run,
although it is quite limited in features.

* you need to stay connected to know what happen
* you can't stay connected if you don't keep a session opened 24/7
* multi device (computer / phone for instance) is not possible without
an extra setup (bouncer or tmux session)

I like to use it to communicate with many people on some topic, I find
they are a good equivalent of forums.  IRC has a strong culture and
limitations but I love it.

## XMPP (ex Jabber)

Behind this acronym stands a long lived protocol that supports many
features and has proven to work, unfortunately the XMPP clients never
really shined by their user interface.  Recently the protocol is seeing
a good adoption rate, clients are getting better, servers are easy to
deploy and doesn't draw much resources (i/o, CPU, memory).

XMPP uses a federation model, anyone can host their server and
communicate with people from other servers.  You can share files,
create rooms, do private messages. Audio and video is supported based
on the client.  It's also able to bridge to IRC or some other protocol
using the correct software.  Multiples options for end-to-end
encryption are available but the most recent named OMEMO is definitely
the best choice.

The free/open source Android client « Conversations » is really good,
on a computer you can use Gajim or Dino with a nice graphical
interface, and finally profanity or poezio for a console client.
XMPP on Wikipedia
## Matrix

Matrix is a recent protocol in the list although it saw an incredible
adoption rate and since the recent Freenode drama many projects
switched to their own Matrix room.  It's fully open source in client or
servers and is federated so anyone can be independent with their own
server.

As it's young, Matrix has only one client that proposes all the
features which is Element, a very resource hungry web program (web page
or run "natively using Electron, a program to turn website in desktop
application) and a python server named Synapse that requires a lot of
CPU to work correctly.

In regards to features, Matrix proposes end to end encryption, rooms,
direct chat, encryption done well, file sharing, audio/video etc...

While it's a good alternative to XMPP, I prefer XMPP because of the
poor choice of clients and servers in Matrix at the moment.  Hopefully
it may get better in the future.
Matrix protocol on Wikipedia
## Email

This way is well known, most people have an email address and it may
have been your first touch with the Internet.  Email works well, it's
federated and anyone can host an email server although it's not an easy
task.

Mails are not instant but with performant servers it can only takes a
few seconds for an email to be sent and delivered.  They can support
end to end encryption using GPG which is not always easy to use.  You
have a huge choice for email clients and most of them allow incredible
settings choice.

I really like emails, it's a very practical way to communicate ideas or
thoughts to someone.

### Delta Chat

I found a nice program named Delta Chat that is built on top of emails
to communicate "instantly" with your friends who also use Delta Chat,
messages are automatically encrypted.

The client user interface looks like an instant messaging program but
will uses emails to transport the messages.  While the program is open
source and Free, it requires electron for desktop and I didn't find a
way to participate to an encrypted thread using an email client (even
using the according GPG key).  I really found that software practical
because your recipients doesn't need to create a new account, it will
reuse an existing email address.  You can also use it without
encryption to write to someone who will reply using their own mail
client but you use delta chat.
Delta Chat website
## Telegram

Open source client but proprietary server, I don't recommend anyone to
use such a system that lock you to their server.  You would have to
rely on a company and you empower them by using their service.
Telegram on Wikipedia
## Signal

Open source client / server but the main server where everybody is
doesn't allow federation.  So far, hosting your own server doesn't seem
a possible and viable solution.  I don't recommend using it because you
rely on a company offering a service.
Signal on Wikipedia
## WhatsApp

Proprietary software and service, please don't use it.

# Conclusion

I daily use IRC, Emails and XMPP to communicate with friends, family,
crew from open source projects or meet new people sharing my interests.
 My main requirement for private messages is end to end encryption and
being independent so I absolutely require federated protocol.