The vision of Jami was always to provide users a fully distributed communication system, using direct peer-to-peer connections as much as possible.

Today, the Jami team presents the first Technical Preview of a new generation of distributed text conversations: Swarms. Swarms will fill the gap between previous capabilities of Jami and users expectations:

  • Swarms are fully distributed and peer-to-peer text conversations, with a potentially unlimited number of participants.
  • Swarm conversations are synced across all of your devices and with all participants
  • Despite providing group communication capabilities and syncing, Swarms are fully distributed and require no server or organization to be used.
  • Under the hood, Swarms use Git to store the conversation, along with peer-to-peer TLS connections for syncing. We'll talk more about the Swarm protocol and implementation in other articles.

Swarm for users

The peer-to-peer nature of Jami allows it to be as resilient as possible. In classic applications, you need to be connected to a service to be able to communicate with your contacts, even if you talk to someone in your company or your network. With Swarms, the idea is to be able to continue the discussion whenever possible. So, imagine students in two different universities in a single Swarm conversation. If an Internet shutdown occurs at a university, both sides will be able to chat separately and, when the shutdown will be over, the conversation will merge for every student.

Thereby Swarms allow Jami to sync messages across all devices of a conversation, and users to create conversations with multiple participants. Although work on the first technological bricks started more than a year ago, providing those features without any server is not an easy task and takes time to come. To quote Jen Simmons speaking about Rust in Firefox, it's like replacing the jet engine while still flying.

We plan to integrate Swarms in three different phases:

  • In the first phase, we want to start using Swarms for new one-to-one conversations only. This allows us to keep a large part of the existing logic and avoid breaking any feature. For current users, this won't change a lot of things. The interface will be as it is today and old conversations will not be synchronized. However, new conversations will be Swarms and will be synchronized. This is the current phase, and Technical Previews will be available to test for some platforms in the next few days (macOS, Qt, Android).
  • We then plan to start deploying Swarms group conversations with a limited maximum number of users (our current goal is 8 users in a conversation). This part will bring a lot of changes to the interfaces. This is the most wanted phase because Jami users will be finally able to chat with multiple users at the same time. This is also the moment where video conferences will get integrated with Swarm chats.
  • Finally, a third part will come to include conversations with more users and ideally public groups.

Under the hood

Swarms are group chats with the ability to split and merge depending on connectivity. Because we can't rely on any service, all messages need to be synced between devices and all related data (banned members, the role of every member, invitations, etc.) need to be stored in the conversation. This is why we choose to use the Git protocol to share and sync messages.
Indeed, Git is distributed by design and can work without any server. Moreover, the protocol is already well defined and known to be able to sync a tree of messages. It supports pluggable transports, allowing Git to use our peer-to-peer TLS session between devices to transfer data. Commits already support signatures and can be linked to our signature system (an x509 chain). Finally, Git already has a huge ecosystem that can be used. So, to summarize, a swarm is a repository where messages are commits synced across all devices.

How to follow and test swarms

Swarms will be testable in Technical Preview and will evolve quickly in the following weeks. Note: we recommend having a clean and separated environment to test Swarms.

GNU/Linux

For 1:1 conversations

wget https://dl.jami.net/alpha/Jami-Swarm-x86_64.AppImage
chmod +x ./Jami-Swarm-x86_64.AppImage
./Jami-Swarm-x86_64.AppImage

If you want to test with more participants (need to be built from sources):
https://github.com/AmarOk1412/jami-cli/

Technical Previews for macOS and Android will follow soon.

macOS

To test on macOS, follow the instructions below:

  • Jami test version use the same folder to save data as regular version. If you have previously installed Jami from jami.net, it is better to first backup Jami folder from ~/Library/Application Support/ to a safe place, and restore it when your test is finished. This folder contains account info so they would not be messed up. If you are using the version from the app store, you can skip this step.
  • Download dmg file from https://dl.jami.net/alpha/mac/
  • Double click to unpack
  • It can then be used like any normal Jami version. One thing may differ when accepting a new conversation request, it may take a few seconds before the conversation is updated. Please note that the file transfer feature is not supported yet.
  • Important: other client also must use swarm

Links to go deeper:

By Adrien Béraud - Jami Project Director & Sébastien Blin - Jami Developer