Jami relies on OpenDHT to establish peer to peer connections between devices. This technology allows users to find each other on the Internet without having to rely on a central server. Every Jami device is a node on the OpenDHT network and each node maintains a list of known neighbours for which they have their Jami ID and IP address.

When you make a call or send a message with Jami, your device makes use of the OpenDHT distributed network to find your contact’s IP address and establish a P2P connection. OpenDHT needs to know the address of at least one other node of the distributed network in order to join it for the first time. This node is called the “bootstrap node” and it is configurable in your Jami settings.

However, Jami is also intended to function on premise in a private network that could potentially be disconnected from the Internet. In this case, the default node that comes preconfigured in Jami wouldn’t work because it is located outside of the network. Furthermore, even if the local network is not disconnected from the Internet, using a remote bootstrap node makes little sense for communication between local devices.  

This is why we introduced the new automatic peer discovery feature in OpenDHT. It allows devices to find each other on a local network and establish connectivity automatically, even without Internet access or custom configuration. The secret behind this is the use of IP Multicast, a group communication method possible only within local networks where data transmission is addressed to multiple destination computers simultaneously.

OpenDHT is part of Jami, but it can also be used independently for other purposes. It could replace central infrastructures in a large number of use cases and serve as a communication middleware for embedded systems. However, the configuration necessary to bootstrap nodes can be a pain or bring back the need for a central infrastructure. Thanks to the new peer discovery feature, it is now automatically managed by OpenDHT internally. This feature was released with OpenDHT 1.9.0 and is currently being deployed with Jami, but it will be disabled by default until we make sure it is reliable enough for use by everyone.

In the future, Jami will take advantage of this functionality by providing a new way to discover other users connected to the same local network. Users will be able to decide whether to publish their presence on the local network and discover other nearby friends. This can be useful in many social cases. For instance, during a battle for controlling the Gym in Pokémon GO, you definitely would like to discover more friends on your side to gain the advantage. We will complete this functionality in future releases.

To contact us: contact@jami.net

By Mingrui Zhangt, Adrien Béraud and François Naggar-Tremblay