Technical aspects of Ring

Ring is a combination of technologies and innovations. Here are some elements.

  1. 1. Layered Architecture
  2. 2. External Libraries

 

1. Layered Architecture

Ring software relies on various components which interact together. They are divided into four layers.

architecture-ring

  1. The client layer offers different interfaces: GNU/Linux (Gnome), Windows, Mac OSX and Android. It formalizes the use-case.

  2. The LRC layer (LibRingClient) is written in QtCore and facilitates clients' portability between operating systems. It does not interact with the Android client.

  3. The Inter-process layer uses D-BUS. It enables communication between LibRingClient and LibRing for the GNU/Linux client only.

  4. The business layer is the core of Ring. Called LibRing, it does not interact with users but it is involved in every command.

These layers include external libraries that manage open and specialised technologies or protocols.

 

2. External Libraries

Ring is based on four external libraries, each one performing specific functions.

 

external-libraries

 

OpenDHT - Decentralizing Communications

Ensuring confidentiality of communications is the essential purpose of Ring. This is the reason why we have built a system with no central server and based on peer-to-peer communication. With this model, critical data is not stored in one unique place but it is spread among many users.

To find a data in a peer-to-peer architecture, you need to make the search easy. This is the role of the freely licensed OpenDHT hash table library developed by our team. This table is written in C++ and is inspired by dht (Distributed Hash Table). Of course, OpenDHT fully meets Ring's requirements.

Basic hash tables are used only to find a user's IP address. In addition, our library allows access to other light data. For example, OpenDHT can associate a public key with a Ring ID in order to encrypt your messages.

 

 

PJSIP - A Connection With Traditional Telephony

In order to make Ring accessible to as many people as possible, we have opted for PJSIP — the open SIP protocol — for managing user sessions.

This protocol is popular in the telephony community and it does not transport data — it is a mediator. It just connects compatible communication channels between users.

Although SIP originally relies on centralized servers, our team has modified the protocol to fit in OpenDHT and allow for decentralization.

In just one app, the protocol joins traditional telephony (with a SIP account) and modern communication (with a Ring account) in a user-friendly way.

 

GnuTLS - A Reinforce security manager

The GnuTLS library manages our certificates, keys and encryption methods for audio, video and text.

  • The audio and video circulate through secure channels and follow the strict SRTP standards (Secure Real-time Transport Protocol). This protocol requires that encrypted passwords are negociated according to Deffie-Hellman method.

  • Text communications circulate either in real-time through the SIP channel or via OpenDHT when the message recipient is offline. Security for these two modes is provided by the TLS protocol.

 

FFMPEG and LIBAV - Audio and Video Administrators

In order to make data transfer faster and lighter, Ring uses codecs for compressing and decompressing it during the transport. These codecs are managed by the FFMPEG and LIBAV libraries for audio and video.
 

Codecs

Audio Video
OPUS H264
SPEEX VP8
PCM_ALAW MPEG4         
PCM_MULAW H263
G.722