jami-docs

Forked version of Jami documentation, see wrycode.com/jami-docs-demo
git clone git://git.wrycode.com/wrycode/jami-docs.git
Log | Files | Refs

commit 845eac7af65727b84ae3a37ea7fbe651a8e2c22e
parent f9911cbcfa66940610bf35a3f82db600f9ff9b9d
Author: Nick Econopouly <wry@mm.st>
Date:   Fri, 19 Feb 2021 16:55:28 -0500

Move uncategorized stuff into extra/

Diffstat:
Dbuilding-jami/build.md | 192-------------------------------------------------------------------------------
Mbuilding-jami/index.rst | 4++--
Dextra/Group-chat-feature-(design-draft).md | 2--
Aextra/HDMI-CEC-(fr).md | 23+++++++++++++++++++++++
Mextra/Jami-distributed-network.md | 2+-
Aextra/build.md | 203+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aextra/chatview-i18n-(design-draft).md | 118+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rtechnical/conference-protocol.md -> extra/conference-protocol.md | 0
Aextra/connection-manager.md | 66++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mextra/gsoc.md | 127++++++++++++++++++++++++++++++++++++++++---------------------------------------
Rtechnical/guidelines/Banned-Contact.md -> extra/guidelines/Banned-Contact.md | 0
Rtechnical/guidelines/Coding-rules.md -> extra/guidelines/Coding-rules.md | 0
Rtechnical/guidelines/Kde-guidelines.md -> extra/guidelines/Kde-guidelines.md | 0
Rtechnical/guidelines/Libringclient-Coding-Rules.md -> extra/guidelines/Libringclient-Coding-Rules.md | 0
Rtechnical/guidelines/Qt-and-QML-coding-guidelines.md -> extra/guidelines/Qt-and-QML-coding-guidelines.md | 0
Rtechnical/guidelines/Qt-and-QML-testing-tools.md -> extra/guidelines/Qt-and-QML-testing-tools.md | 0
Rtechnical/guidelines/UI-and-UX-development.md -> extra/guidelines/UI-and-UX-development.md | 0
Aextra/important-RFCs.md | 43+++++++++++++++++++++++++++++++++++++++++++
Aextra/improving-jami's-quality.md | 86+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mextra/index.rst | 6++----
Aextra/release-process.md | 186+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aextra/sync-protocol.md | 95+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rtechnical/working-with-gerrit.md -> extra/working-with-gerrit.md | 0
Dgeneral/distributed-network-topo.png | 0
Mgeneral/faq.txt | 36++++++++++++++++++------------------
Mgeneral/technical-overview.txt | 4++--
Mguides/index.rst | 2+-
Mindex.rst | 8--------
Dtechnical/HDMI-CEC-(fr).md | 26--------------------------
Dtechnical/LRC-documentation.md | 79-------------------------------------------------------------------------------
Mtechnical/advanced-features/index.rst | 4++--
Mtechnical/basic-features/index.rst | 4++--
Dtechnical/chatview-i18n-(design-draft).md | 116-------------------------------------------------------------------------------
Dtechnical/connection-manager.md | 67-------------------------------------------------------------------
Dtechnical/important-RFCs.md | 43-------------------------------------------
Dtechnical/improving-jami's-quality.md | 85-------------------------------------------------------------------------------
Mtechnical/index.rst | 5+++--
Atechnical/libjamiclient-documentation.md | 80+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dtechnical/release-process.md | 185-------------------------------------------------------------------------------
Dtechnical/sync-protocol.md | 94-------------------------------------------------------------------------------
40 files changed, 997 insertions(+), 994 deletions(-)

diff --git a/building-jami/build.md b/building-jami/build.md @@ -1,192 +0,0 @@ -2\. **LibRingClient** (or LRC) is written in -QtCore and facilitates clients' portability between operating systems. -It does not interact with the Android client. - -**Building gnome client without installing LibRing and LibRingClient** - -This allows you to build every component separately and to run them from -their location without having to install them. To do this, you must -first build LibRing and then tell LibRingClient where it is located. -Then, you build the LibRingClient and tell client-gnome where -LibRingClient it is located. Finally, you build client-gnome. - -1. Build the daemon as explained above. -2. Configure the build of LibRingClient by specifying the location of - the (non-installed) daemon with e.g.: - cd build && cmake .. -DRING_BUILD_DIR=$HOME/ring-project/daemon/src -DCMAKE_BUILD_TYPE=Debug - -3. Build LibRingClient by running "make". -4. Configure the build of client-gnome by specifying the location of - LibRingClient using the specific variable designed for it: - cd build && cmake .. -DLibRingClient_PROJECT_DIR=$HOME/ring-project/lrc -DCMAKE_BUILD_TYPE=Debug - -5. Build client-gnome by running "make". - -To run an install-less Jami, you must manually start the daemon and then -the client, e.g.: - - term1: $HOME/ring-project/daemon/bin/dring -cdp - term2: $HOME/ring-project/client-gnome/jami-gnome --debug - -Client Qt for Jami --------------------------------------------------- - -## On GNU/Linux - -+ LibRing and LibRingClient must be installed first. If you have not -already done so, go to the [How to Build LibRing (or -Daemon)](#how-to-build-libring-or-daemon) and [How to Build -LibRingClient (or LRC)](#how-to-build-libringclient-or-lrc) sections. - -+ **Qt 5.14**: In order to use the client Qt it is necessary to have the -Qt version 5.14 or higher. If your system does not have it you can install it -[from sources or download the binary installer](https://www.qt.io/download). -To compile the LibRingClient with a locally installed Qt you need to specify -its path, for example: -```sh -cmake -DQT5_VER=5.15.0 -DQT5_PATH=/home/<username>/Qt/5.15.0/gcc_64 -DRING_BUILD_DIR=<daemon-source-path> -DCMAKE_INSTALL_PREFIX=<lrc-installation-path> -DRING_XML_INTERFACES_DIR=<daemon-source-path>/bin/dbus .. -``` - -#### Installing Build Dependencies - -- For Debian based: -```bash -qtmultimedia5-dev libqt5svg5-dev qtwebengine5-dev qtdeclarative5-dev qtquickcontrols2-5-dev qml-module-qtquick2 qml-module-qtquick-controls qml-module-qtquick-controls2 qml-module-qtquick-dialogs qml-module-qtquick-layouts qml-module-qtquick-privatewidgets qml-module-qtquick-shapes qml-module-qtquick-window2 qml-module-qtquick-templates2 qml-module-qt-labs-platform qml-module-qtwebengine qml-module-qtwebchannel libqrencode-dev libnm-dev -``` -- For Fedora: -```bash -sudo dnf install qt5-qtsvg-devel qt5-qtwebengine-devel qt5-qtmultimedia-devel qt5-qtdeclarative-devel qt5-qtquickcontrols2-devel qt5-qtquickcontrols qrencode-devel NetworkManager-libnm-devel -``` - -#### Build Instructions -Once LibRingClient is built you can compile the client: - -```sh -cd client-qt -mkdir build -cd build -cmake .. -DQT5_VER=5.15.0 -DQT5_PATH=/home/<username>/Qt/5.15.0/gcc_64 -DLRC=<path_to_lrc> -DCMAKE_INSTALL_PREFIX=<installation_path> -make -``` -Variables `QT5_VER` and `QT5_PATH` are used to specify version and path for a custom installation of Qt. - -If lrc library is installed in a custom directory you can set its path with the variable LRC. Additionally you can specify built library location with `LRCLIB` (otherwise it will seach inside LRC with the suffixes `/lib`, `/build` and `/build-local`). - -Then, you are finally ready to launch jami-qt in your build directory. - -If you want to install it to the path provided by `CMAKE_INSTALL_PREFIX` you can run: - -```sh -make install -``` - -#### Debugging - -Compile the client and LibRingClient with `-DCMAKE_BUILD_TYPE=Debug` - -#### Known linker issues - - With Ubuntu 20.04, even if the build process finish with success, the linker might give you the following message: - -```sh -/usr/bin/ld: /home/<username>/Qt/5.15.0/gcc_64/lib/libQt5WebEngineCore.so: .dynsym local symbol at index 3 (>= sh_info of 3) -(...) -``` -This has been solved by switching to [gold linker](https://forum.qt.io/topic/109387/gammaray-build-error-on-ubuntu): - -```sh -sudo ln -sf /usr/bin/x86_64-linux-gnu-ld.gold /usr/bin/ld -``` - -## On native Windows - -- Make sure that daemon, lrc are built first - -```bash - cd client-windows - python make-client.py -d - python make-client.py -b - powershell -ExecutionPolicy Unrestricted -File copy-runtime-files.ps1 -``` -- ```--toolset```, ```--sdk``` options are available, as well. -- To control the version of qmake.exe, ```--qtver``` option can be used - -#### Packaging on native Windows - -- To be able to generate a msi package, first download and install [Wixtoolset](https://wixtoolset.org/releases/). -- In Visual Studio, download WiX Toolset Visual Studio Extension. -- Build client-windows project first, then the JamiInstaller project, msi package should be stored in ring-project\client-windows\JamiInstaller\bin\Release - -Mac OS X Client for Jami ---------------------------------------------------- - -+ LibRing and LibRingClient must be installed first. If you have not -already done so, go to the [How to Build LibRing (or -Daemon)](#how-to-build-libring-or-daemon) and [How to Build -LibRingClient (or LRC)](#how-to-build-libringclient-or-lrc) sections. - - -#### Other Requirements - -- Qt5 (we link against Qt5Core, Qt5Widgets, Qt5Gui) -- Cocoa framework and Xcode toolchains - -#### Getting the Source Code - -```bash -git clone https://review.jami.net/ring-client-macosx -``` - -#### Build Instructions - -```bash -mkdir build && cd build -export CMAKE_PREFIX_PATH=<dir_to_qt5> -``` - -##### Setting up Compilation with XCode - -Generate an Xcode project with CMake: - -```bash -cmake ../ -DCMAKE_INSTALL_PREFIX=<libringclient_install_path> -G Xcode -open Ring.xcodeproj/ -``` - - -Build and run it from Xcode. - -##### Setting up Compilation by Command Line - -```bash -cmake ../ -DCMAKE_INSTALL_PREFIX=<libringclient_install_path> -make -open Ring.app/ -``` - - -+ The app built using -'make' contains only links to required libraries. To fully build and -package as a standalone Bundle, see the **Packaging** section. - -##### Debugging - -For now, the build type of the client is "Debug" by default. However it -is useful to also have the debug symbols of LibRingClient. To do this, -specify `-DCMAKE_BUILD_TYPE=Debug` when compiling LibRingClient in the -cmake options. - -##### Packaging - -To make a standalone Bundle we use a cmake module: -[BundleUtilities](https://cmake.org/cmake/help/v3.0/module/BundleUtilities.html). -All dependencies are copied inside the Bundle and links are fixed. - -We can then generate a "DragNDrop" dmg file with -[CPack](https://cmake.org/Wiki/CMake:Packaging_With_CPack). - -```bash -cmake ../ -DCMAKE_INSTALL_PREFIX=<libringclient_install_path> -make install -j -cpack -G DragNDrop Ring -``` diff --git a/building-jami/index.rst b/building-jami/index.rst @@ -1,6 +1,6 @@ -########## +################# Building Jami -########## +################# A working Jami setup consists of three ingredients: diff --git a/extra/Group-chat-feature-(design-draft).md b/extra/Group-chat-feature-(design-draft).md @@ -1 +0,0 @@ -Moved to https://git.jami.net/savoirfairelinux/ring-project/wikis/technical/2.3.-Swarm- \ No newline at end of file diff --git a/extra/HDMI-CEC-(fr).md b/extra/HDMI-CEC-(fr).md @@ -0,0 +1,23 @@ +# Gérer le HDMI-CEC +Au 1er Mars 2018: + +- CEC est une norme encore sous utilisée et chaque constructeur en + fait sa propre version + - max compat : <http://libcec.pulse-eight.com/Vendor/Support> +- Framework android natif très élémentaire (api) et pas encore + implémenté par les constructeurs +- Libcec est un projet de Kodi qui permet le contrôle en cec + - les kernels android ne sont pas compatibles + - nécessite un accès root/adb + - même kodi ne fonctionne pas en cec, libcec a été retiré du build + android + - <http://kodi.wiki/view/NVIDIA_SHIELD_TV#Known_issues_and_limitations> +- Il existe des projets de driver permettant d'utiliser le cec sur + android, mais ils nécessitent tous de flasher l'appareil +- Il est possible d'utiliser un dongle pour envoyer les commandes cec + en usb puis usb -&gt; hdmi + - coûte 45 usd sans garantie de fonctionnement + - <https://stackoverflow.com/questions/45639210/use-libcec-usb-dongle-in-android-app> + - <https://www.pulse-eight.com/p/104/usb-hdmi-cec-adapter> +- La notion de user space driver pourrait nous servir pour écrire + notre propre pilote, mais elle n'existe pas sur AndroidTV diff --git a/extra/Jami-distributed-network.md b/extra/Jami-distributed-network.md @@ -11,7 +11,7 @@ advantages when compared to federated networks: - Do not depend on anything other than its users, - Trust amongst nodes is not necessary. -![Network-topo](/uploads/9b725e440c2705a2a3c4d0a3df092066/Network-topo.png) +![Network-topo](../media/distributed-network-topo.png) This network forms a Distributed Hash Table (DHT) diff --git a/extra/build.md b/extra/build.md @@ -0,0 +1,203 @@ +# old build instructions + + + + + + + + + + +2\. **LibRingClient** (or LRC) is written in +QtCore and facilitates clients' portability between operating systems. +It does not interact with the Android client. + +**Building gnome client without installing LibRing and LibRingClient** + +This allows you to build every component separately and to run them from +their location without having to install them. To do this, you must +first build LibRing and then tell LibRingClient where it is located. +Then, you build the LibRingClient and tell client-gnome where +LibRingClient it is located. Finally, you build client-gnome. + +1. Build the daemon as explained above. +2. Configure the build of LibRingClient by specifying the location of + the (non-installed) daemon with e.g.: + cd build && cmake .. -DRING_BUILD_DIR=$HOME/ring-project/daemon/src -DCMAKE_BUILD_TYPE=Debug + +3. Build LibRingClient by running "make". +4. Configure the build of client-gnome by specifying the location of + LibRingClient using the specific variable designed for it: + cd build && cmake .. -DLibRingClient_PROJECT_DIR=$HOME/ring-project/lrc -DCMAKE_BUILD_TYPE=Debug + +5. Build client-gnome by running "make". + +To run an install-less Jami, you must manually start the daemon and then +the client, e.g.: + + term1: $HOME/ring-project/daemon/bin/dring -cdp + term2: $HOME/ring-project/client-gnome/jami-gnome --debug + +Client Qt for Jami +-------------------------------------------------- + +## On GNU/Linux + ++ LibRing and LibRingClient must be installed first. If you have not +already done so, go to the [How to Build LibRing (or +Daemon)](#how-to-build-libring-or-daemon) and [How to Build +LibRingClient (or LRC)](#how-to-build-libringclient-or-lrc) sections. + ++ **Qt 5.14**: In order to use the client Qt it is necessary to have the +Qt version 5.14 or higher. If your system does not have it you can install it +[from sources or download the binary installer](https://www.qt.io/download). +To compile the LibRingClient with a locally installed Qt you need to specify +its path, for example: +```sh +cmake -DQT5_VER=5.15.0 -DQT5_PATH=/home/<username>/Qt/5.15.0/gcc_64 -DRING_BUILD_DIR=<daemon-source-path> -DCMAKE_INSTALL_PREFIX=<lrc-installation-path> -DRING_XML_INTERFACES_DIR=<daemon-source-path>/bin/dbus .. +``` + +#### Installing Build Dependencies + +- For Debian based: +```bash +qtmultimedia5-dev libqt5svg5-dev qtwebengine5-dev qtdeclarative5-dev qtquickcontrols2-5-dev qml-module-qtquick2 qml-module-qtquick-controls qml-module-qtquick-controls2 qml-module-qtquick-dialogs qml-module-qtquick-layouts qml-module-qtquick-privatewidgets qml-module-qtquick-shapes qml-module-qtquick-window2 qml-module-qtquick-templates2 qml-module-qt-labs-platform qml-module-qtwebengine qml-module-qtwebchannel libqrencode-dev libnm-dev +``` +- For Fedora: +```bash +sudo dnf install qt5-qtsvg-devel qt5-qtwebengine-devel qt5-qtmultimedia-devel qt5-qtdeclarative-devel qt5-qtquickcontrols2-devel qt5-qtquickcontrols qrencode-devel NetworkManager-libnm-devel +``` + +#### Build Instructions +Once LibRingClient is built you can compile the client: + +```sh +cd client-qt +mkdir build +cd build +cmake .. -DQT5_VER=5.15.0 -DQT5_PATH=/home/<username>/Qt/5.15.0/gcc_64 -DLRC=<path_to_lrc> -DCMAKE_INSTALL_PREFIX=<installation_path> +make +``` +Variables `QT5_VER` and `QT5_PATH` are used to specify version and path for a custom installation of Qt. + +If lrc library is installed in a custom directory you can set its path with the variable LRC. Additionally you can specify built library location with `LRCLIB` (otherwise it will seach inside LRC with the suffixes `/lib`, `/build` and `/build-local`). + +Then, you are finally ready to launch jami-qt in your build directory. + +If you want to install it to the path provided by `CMAKE_INSTALL_PREFIX` you can run: + +```sh +make install +``` + +#### Debugging + +Compile the client and LibRingClient with `-DCMAKE_BUILD_TYPE=Debug` + +#### Known linker issues + + With Ubuntu 20.04, even if the build process finish with success, the linker might give you the following message: + +```sh +/usr/bin/ld: /home/<username>/Qt/5.15.0/gcc_64/lib/libQt5WebEngineCore.so: .dynsym local symbol at index 3 (>= sh_info of 3) +(...) +``` +This has been solved by switching to [gold linker](https://forum.qt.io/topic/109387/gammaray-build-error-on-ubuntu): + +```sh +sudo ln -sf /usr/bin/x86_64-linux-gnu-ld.gold /usr/bin/ld +``` + +## On native Windows + +- Make sure that daemon, lrc are built first + +```bash + cd client-windows + python make-client.py -d + python make-client.py -b + powershell -ExecutionPolicy Unrestricted -File copy-runtime-files.ps1 +``` +- ```--toolset```, ```--sdk``` options are available, as well. +- To control the version of qmake.exe, ```--qtver``` option can be used + +#### Packaging on native Windows + +- To be able to generate a msi package, first download and install [Wixtoolset](https://wixtoolset.org/releases/). +- In Visual Studio, download WiX Toolset Visual Studio Extension. +- Build client-windows project first, then the JamiInstaller project, msi package should be stored in ring-project\client-windows\JamiInstaller\bin\Release + +Mac OS X Client for Jami +--------------------------------------------------- + ++ LibRing and LibRingClient must be installed first. If you have not +already done so, go to the [How to Build LibRing (or +Daemon)](#how-to-build-libring-or-daemon) and [How to Build +LibRingClient (or LRC)](#how-to-build-libringclient-or-lrc) sections. + + +#### Other Requirements + +- Qt5 (we link against Qt5Core, Qt5Widgets, Qt5Gui) +- Cocoa framework and Xcode toolchains + +#### Getting the Source Code + +```bash +git clone https://review.jami.net/ring-client-macosx +``` + +#### Build Instructions + +```bash +mkdir build && cd build +export CMAKE_PREFIX_PATH=<dir_to_qt5> +``` + +##### Setting up Compilation with XCode + +Generate an Xcode project with CMake: + +```bash +cmake ../ -DCMAKE_INSTALL_PREFIX=<libringclient_install_path> -G Xcode +open Ring.xcodeproj/ +``` + + +Build and run it from Xcode. + +##### Setting up Compilation by Command Line + +```bash +cmake ../ -DCMAKE_INSTALL_PREFIX=<libringclient_install_path> +make +open Ring.app/ +``` + + ++ The app built using +'make' contains only links to required libraries. To fully build and +package as a standalone Bundle, see the **Packaging** section. + +##### Debugging + +For now, the build type of the client is "Debug" by default. However it +is useful to also have the debug symbols of LibRingClient. To do this, +specify `-DCMAKE_BUILD_TYPE=Debug` when compiling LibRingClient in the +cmake options. + +##### Packaging + +To make a standalone Bundle we use a cmake module: +[BundleUtilities](https://cmake.org/cmake/help/v3.0/module/BundleUtilities.html). +All dependencies are copied inside the Bundle and links are fixed. + +We can then generate a "DragNDrop" dmg file with +[CPack](https://cmake.org/Wiki/CMake:Packaging_With_CPack). + +```bash +cmake ../ -DCMAKE_INSTALL_PREFIX=<libringclient_install_path> +make install -j +cpack -G DragNDrop Ring +``` diff --git a/extra/chatview-i18n-(design-draft).md b/extra/chatview-i18n-(design-draft).md @@ -0,0 +1,118 @@ +# chatview internationalization + +The GNOME client's chatview lacks proper i18n support. + +Related bug report: https://git.jami.net/savoirfairelinux/ring-client-gnome/issues/900 + +first ideas: + +* i18n functions provided by separate js library +* i18n not trivial, overhead of custom code extremely high => use existing js lib +* library will be embedded into the client => code base should be as mature as possible +* ideally the translation process would be exactly the same as for the C++ code + +# in short + +(1) either + +C++ tells JS code which language is currently used and JS code loads translations + +(2) or + +C++ loads translations and passes them to JS code together with info about currently used language + +# review exisiting js i18n libs + +## [i18next](https://www.i18next.com/) + +**The good** + +* very mature +* huge user base +* lots of documentation +* No runtime dependencies + +**The bad** + +* huge, overkill ? +* uses own JSON format not gettext .mo + +This will require translation of .po files to JSON format (using [i18next-gettext-converter](https://github.com/i18next/i18next-gettext-converter)). + +**The ugly** + +* keys do not have the same meaning as gettext keys (see [this thread](https://stackoverflow.com/questions/19403787/gettext-style-keys-with-i18next-and-general-workflow)), this might be very confusing for the translators +* i18next-gettext-converter requires nodeJS as build dependency + +## [jed](http://messageformat.github.io/Jed/) + +**The good** + +* looks quite mature +* good user base +* provides gettext API (will be very intuitive to translators) +* No runtime dependencies + +**The bad** + +* not very active currently (but it might very well just be stable) +* uses own JSON format not gettext .mo + +This will require translation of .po files to JSON format (e.g. using [po2json](https://github.com/mikeedwards/po2json)). +po2json also requires nodeJS as dependency, **but** it is [available as Debian package](https://packages.debian.org/stable/javascript/node-po2json), which makes it slightly less annoying + +![gettext_end](/uploads/0be97d3200bcac7ab4b4432c18f879c3/gettext_end.png) + +Source: [Internationalization in JavaScript](http://www.jeromesteunou.net/internationalisation-in-javascript.html) + +## [Polyglot](http://airbnb.io/polyglot.js/) + +**The good** + +* developed by airbnb, well maintained +* good user base + +**The bad** + +* uses own JSON format not gettext .mo + +**The ugly** + +* runtime dependency on nodeJS + +# using Jed + +* patch draft: + +https://gerrit-ring.savoirfairelinux.com/c/ring-client-gnome/+/10615 + +* Retrieve strings: + +``` +$ cd po/chatview +$ xgettext -o ring-client-gnome-chatview.pot -L Javascript --from-code=utf-8 -D ../../ -f POTFILES.in + +``` + +* Translate them: + +``` +$ cp ring-client-gnome-chatview.pot en.po +$ cp ring-client-gnome-chatview.pot fr.po +# translate ... +``` + +* Install po2json: + +``` +$ apt-get install node-po2json + +``` + +* Generate JSON files: + +``` +$ ./scripts/build-chatview-locales.sh web/i18n +``` + +That's it. JSON translations are loaded as gresource. The `webkitchatcontainer` class calls `init_i18n()`, passing appropriate translation resources to the chatview. diff --git a/technical/conference-protocol.md b/extra/conference-protocol.md diff --git a/extra/connection-manager.md b/extra/connection-manager.md @@ -0,0 +1,66 @@ +# connection manager + +The connection manager is the first piece of the group chat features. This class manages connections to peers and offer to the user multiplexed sockets to devices they want to connect. For example, if Alice wants to be connected to one of Bob's device to transfer 2 files, she will ask the ConnectionManager to open 2 channels (one per file) to Bob. This will give: + +```cpp + aliceAccount->connectionManager().connectDevice(bobDeviceId, "file://file1", + [](std::shared_ptr<ChannelSocket> socket) { + if (socket) { + // transfer first file + } + }); + + aliceAccount->connectionManager().connectDevice(bobDeviceId, "file://file2", + [](std::shared_ptr<ChannelSocket> socket) { + if (socket) { + // transfer second file + } + }); +``` + +Behind that, the ConnectionManager will first connect to Bob's device via the DHT (via ICE) and setup a TLS Socket. Then, it will ask for a channel, and when the channel is ready, inform Alice via a callback. For the second file, it will use the first socket and will just open a new channel (only needs 2 TLS packet, so it's fast) + +## DHT side + +It's the same as [calls](https://git.jami.net/savoirfairelinux/ring-project/wikis/technical/2.4.%20Let's%20do%20a%20call), see **Exchange ICE candidates**, **ICE negotiation**, **Encrypt the control socket** but only in TCP. + +However, when a side receives a new ICE request, the callback set by ` void onICERequest(onICERequestCallback&& cb);` is triggered. + +## Negotiating a new channel + +A channel is defined by an id (unique) and a uri (not unique). For example (1, 'git://*') + +When ready, the ConnectionManager considers that the channel 0 exists. This channel is called the *CONTROL* channel and is used to ask for new channels. + +The protocol used is pretty simple and looks like the RTP protocol: + +1. 16 bits are used to store the length of the body. +2. 16 bits for the channel id (destination) +3. body + +So all packets have a 32 bits len header. + +To ask for a new channel, the ConnectionManager will send a `ChannelRequest` object (msgpack is used to serialize the struct) in the channel 0 to send the id and the name of the new channel to the peer (with `isAnswer = false`). The peer will call the callback given with ̀ void onChannelRequest(ChannelRequestCallBack&& cb);` and will refuse or accept the request. If accepted, the peer will answer with a ChannelRequest with the same data (and ̀`isAnswer = true`) and then both peers callbacks will be triggered to inform that the ChannelSock is usable. + +## Closing a channel + +A *EOF* is transmitted for a channel if the length of the content is 0. + +## Structure of the connectionManager + +### Ownership + +1. A JamiAccount owns the ConnectionManager and have access to the ChannelSocket objects (shared_ptr owned with the MultiplexedSocket. +2. The ConnectionManager owns MultiplexedSockets and ICE objects +3. MultiplexedSockets owns the TLS transport and the ChannelSocket objects +4. ChannelSocket owns the data buffers + +### Roles + +1. ConnectionManager is used to manage connections to peers. +2. MultiplexedSockets are used to send data over the TLSSocket, read the incoming packets and manage channels. +3. ChannelSockets are used by the client to interact with the other peer. + +## Usage + +Scenarios are described in the corresponding unit tests (`test/unitTest/connectionManager/connectionManager.cpp`) diff --git a/extra/gsoc.md b/extra/gsoc.md @@ -1,3 +1,5 @@ +# GSOC + The Ring project has previously participated in the Google Summer of Code program on 2016 and 2017 under the umbrella of the [Debian project](https://www.debian.org/) and the [GNU @@ -20,35 +22,35 @@ also contribute to Ring's documentation. Likely mentor(s): Olivier, Philippe - For the moment ring uses a slider to set video stream quality disregarding the connection quality. - The student will explore the RTCP and RTSP protocols implementation in FFmpeg to later implement an automation of the video stream quality setting, though the informations furnished by the control packets. - - Renegotiate SDP depending on network conditions (change codec parameters or codecs, limit data flow, etc) - - Improve algorithm so it can maximize quality without going over a maximum bit rate, or maintain a certain quality regardless of network traffic - - Use other RTCP facilities to improve video quality (Ring only uses packet loss) + For the moment ring uses a slider to set video stream quality disregarding the connection quality. + The student will explore the RTCP and RTSP protocols implementation in FFmpeg to later implement an automation of the video stream quality setting, though the informations furnished by the control packets. + - Renegotiate SDP depending on network conditions (change codec parameters or codecs, limit data flow, etc) + - Improve algorithm so it can maximize quality without going over a maximum bit rate, or maintain a certain quality regardless of network traffic + - Use other RTCP facilities to improve video quality (Ring only uses packet loss) #### Ring IoT Likely mentor(s): Anthony - The ring-client-iot project, started last year by a previous GSoC student, can be used as a base for a headless Ring client. Using it to start a new client, more focused - on little devices without direct human interaction, would enable new applications in the embedded field. From this point, multiple directions can be followed as a GSoC - project : - - Build Ring daemon and client-iot on ARM platforms (possibly including it in the Buildroot ecosystem). - - Add commands to read sensor values, trigger actions on system and eventual peripherals, etc. - - Improve manageability of accounts authorized to send commands to the device. - - Integrate the recent file transfer feature with IoT applications (display any picture received by Ring on a screen, etc.) + The ring-client-iot project, started last year by a previous GSoC student, can be used as a base for a headless Ring client. Using it to start a new client, more focused + on little devices without direct human interaction, would enable new applications in the embedded field. From this point, multiple directions can be followed as a GSoC + project : + - Build Ring daemon and client-iot on ARM platforms (possibly including it in the Buildroot ecosystem). + - Add commands to read sensor values, trigger actions on system and eventual peripherals, etc. + - Improve manageability of accounts authorized to send commands to the device. + - Integrate the recent file transfer feature with IoT applications (display any picture received by Ring on a screen, etc.) #### Add video surveillance features to Ring Likely mentor(s): Maxim, Nicolas - The goal of this project is to enable remote video surveillance capabilities in Ring which would allow someone to keep an eye on their home, a child, etc. When a sound or movement event is triggered, a notification should be sent and the video should be recorded and stored on both the local and remote device to provide forensic evidence. + The goal of this project is to enable remote video surveillance capabilities in Ring which would allow someone to keep an eye on their home, a child, etc. When a sound or movement event is triggered, a notification should be sent and the video should be recorded and stored on both the local and remote device to provide forensic evidence. - Tasks: + Tasks: - - Implement/integrate movement/sound detection algorithms in the Ring daemon. - - Leverage the features already present in Ring to implement the message notifications as well as the video streaming and recording. - - Design and implement the UI elements of at least one client that will define how this functionality is enabled and used. + - Implement/integrate movement/sound detection algorithms in the Ring daemon. + - Leverage the features already present in Ring to implement the message notifications as well as the video streaming and recording. + - Design and implement the UI elements of at least one client that will define how this functionality is enabled and used. #### Refactoring User Interfaces @@ -56,45 +58,45 @@ Likely mentor(s): Maxim, Nicolas Likely mentor(s): Olivier - A previous work was initiated in 2016 for the integration of Ring in Telepathy [https://github.com/alok4nand/telepathy-bell], WIP: - 1. Improving the Account Management, text messaging, and Contact Management: Making the connection manager usable as a Ring client for text messaging for a non tech user + A previous work was initiated in 2016 for the integration of Ring in Telepathy [https://github.com/alok4nand/telepathy-bell], WIP: + 1. Improving the Account Management, text messaging, and Contact Management: Making the connection manager usable as a Ring client for text messaging for a non tech user - 2. Exploring video calls: Currently the daemon handles video one frame at a time (not a video stream). If using dbus the actual frames are shared via shm (shared memory), would the video via frames model work with Telepathy/Empathy? + 2. Exploring video calls: Currently the daemon handles video one frame at a time (not a video stream). If using dbus the actual frames are shared via shm (shared memory), would the video via frames model work with Telepathy/Empathy? - 3. Implement trust requests (ie: friend requests) + 3. Implement trust requests (ie: friend requests) #### Ring as a WebRTC service Likely mentor(s): Guillaume - For all communications LibRing uses simple system sockets (mainly UDP, and TCP for data transfer). - The idea is to add a WebRTC connectivity to extend Ring and facilitate portage of Ring. - This project needs to add new settings to indicate how and when to use WebRTC sockets and re-design most of libring low-level implementations. + For all communications LibRing uses simple system sockets (mainly UDP, and TCP for data transfer). + The idea is to add a WebRTC connectivity to extend Ring and facilitate portage of Ring. + This project needs to add new settings to indicate how and when to use WebRTC sockets and re-design most of libring low-level implementations. - Example of tasks to be done: - - Identify impacted code. - - Make a WebRTC small client as validation test. - - Implement WebRTC connectivity at low-level. - - Change libring API and settings if needed. - - Modify/Test a currently supported client to validate the full chain. + Example of tasks to be done: + - Identify impacted code. + - Make a WebRTC small client as validation test. + - Implement WebRTC connectivity at low-level. + - Change libring API and settings if needed. + - Modify/Test a currently supported client to validate the full chain. #### Peer to peer file transfer Likely mentor(s): Guillaume - Current code base uses a TURN only connection (TURN/TCP/TLS) to manage a peer connectivity for our reliable data transfer feature. - TURN is a relay protocol to solve connectivity issues between peers behind NAT or firewall. The side effects are latency and non-scalability. + Current code base uses a TURN only connection (TURN/TCP/TLS) to manage a peer connectivity for our reliable data transfer feature. + TURN is a relay protocol to solve connectivity issues between peers behind NAT or firewall. The side effects are latency and non-scalability. - To reduce these effects we want to introduce a non-relay connection, true P2P, usable for hosts on the same network as example. - To make connection transparent to the application (so to the user), the true P2P-way is tried as first stage and the TURN-way is used as fallback. - This change doesn't require to change the libring API. It's only an implementation change. The data-transfer protocol (i.e. data exchanged over DHT at connection request) could be changed. + To reduce these effects we want to introduce a non-relay connection, true P2P, usable for hosts on the same network as example. + To make connection transparent to the application (so to the user), the true P2P-way is tried as first stage and the TURN-way is used as fallback. + This change doesn't require to change the libring API. It's only an implementation change. The data-transfer protocol (i.e. data exchanged over DHT at connection request) could be changed. - Example of tasks to be done: - - Identify impacted code. - - Create a validation test. - - Implement the true P2P in data-transfer code. - - Support the TURN fallback. - - Verify the data-transfer using validation tests created earlier. + Example of tasks to be done: + - Identify impacted code. + - Create a validation test. + - Implement the true P2P in data-transfer code. + - Support the TURN fallback. + - Verify the data-transfer using validation tests created earlier. #### Conference server @@ -102,50 +104,50 @@ Likely mentor(s): Guillaume Likely mentor(s): Pierre, Anthony -In the same spirit as <https://github.com/matrix-org/matrix-appservice-irc> or <https://github.com/jfrederickson/matrix-xmpp-bridge>, the goal of this project is to integrate Ring to Matrix as well as possible. +In the same spirit as <https://github.com/matrix-org/matrix-appservice-irc> or <https://github.com/jfrederickson/matrix-xmpp-bridge>, the goal of this project is to integrate Ring to Matrix as well as possible. That way, communication between users of Ring and users of Matrix would be possible. #### Redesign of the media system Likely mentor(s): Philippe, Andreas - Ring's media system is massive and needs an overhaul. - The goals of this project are: - - Implement zero-copy video frame buffer manipulations (ex: OpenGL/OpenCL, VDPAU). - - Update the usage of Ring's media APIs and codecs to conform to current standards, - - Provide a cleaner and better design for platform specific implementations and reduce conditionally compiled code clutter. - - Extend the audio API to allow for client implementations on platforms where media device access is restricted to client specific APIs. + Ring's media system is massive and needs an overhaul. + The goals of this project are: + - Implement zero-copy video frame buffer manipulations (ex: OpenGL/OpenCL, VDPAU). + - Update the usage of Ring's media APIs and codecs to conform to current standards, + - Provide a cleaner and better design for platform specific implementations and reduce conditionally compiled code clutter. + - Extend the audio API to allow for client implementations on platforms where media device access is restricted to client specific APIs. #### Create a clean wrapper for AndroidTV's API. Likely mentor(s): Pierre, Adrien - For now, Ring is the only video chat client available on AndroidTV. This client is more basic than the Android one mainly because it's hard to get good quality and maintainable code with the current state of the AndroidTV framework. - Right now, the Ring AndroidTV client contains a wrapper for AndroidTV's API, but there's still boilerplate code. - The goals of this project are: - - To identify improvements that can be made on this wrapper - - To create an API for Leanback easily usable in the context of Ring (will leverage any knowledge on design patterns and API design) - - To implement the new API in Ring - - To create an external library, independent of Ring and usable in the context of any AndroidTV application. + For now, Ring is the only video chat client available on AndroidTV. This client is more basic than the Android one mainly because it's hard to get good quality and maintainable code with the current state of the AndroidTV framework. + Right now, the Ring AndroidTV client contains a wrapper for AndroidTV's API, but there's still boilerplate code. + The goals of this project are: + - To identify improvements that can be made on this wrapper + - To create an API for Leanback easily usable in the context of Ring (will leverage any knowledge on design patterns and API design) + - To implement the new API in Ring + - To create an external library, independent of Ring and usable in the context of any AndroidTV application. ------------------------------------------------------------------------ ### Contributions GSoC 2016: 1. Improving distributed and secure communication using free software - [(link)](https://summerofcode.withgoogle.com/archive/2016/projects/4886025126019072/) + [(link)](https://summerofcode.withgoogle.com/archive/2016/projects/4886025126019072/) 2. Indexation over a distributed network - [(link)](https://summerofcode.withgoogle.com/archive/2016/projects/6573755878866944/) + [(link)](https://summerofcode.withgoogle.com/archive/2016/projects/6573755878866944/) 3. Ring project - [(link)](https://summerofcode.withgoogle.com/archive/2016/projects/6477112403820544/) + [(link)](https://summerofcode.withgoogle.com/archive/2016/projects/6477112403820544/) 4. Telepathy Connection Manager for Ring protocol - [(link)](https://summerofcode.withgoogle.com/archive/2016/projects/5047255782391808/) + [(link)](https://summerofcode.withgoogle.com/archive/2016/projects/5047255782391808/) ### Contributions GSoC 2017 1. Setting up unit tests for SIP calls in Ring - [(link)](https://summerofcode.withgoogle.com/archive/2017/projects/5836252280520704/) + [(link)](https://summerofcode.withgoogle.com/archive/2017/projects/5836252280520704/) 2. Ring - Create a C++ plugin for Ring - [(link)](https://summerofcode.withgoogle.com/archive/2017/projects/5704614754123776/) + [(link)](https://summerofcode.withgoogle.com/archive/2017/projects/5704614754123776/) 3. Ring: NodeJS Plugin for Seamless Cross-platform Client Development - [(link)](https://summerofcode.withgoogle.com/archive/2017/projects/6532521776906240/)- \ No newline at end of file + [(link)](https://summerofcode.withgoogle.com/archive/2017/projects/6532521776906240/) diff --git a/technical/guidelines/Banned-Contact.md b/extra/guidelines/Banned-Contact.md diff --git a/technical/guidelines/Coding-rules.md b/extra/guidelines/Coding-rules.md diff --git a/technical/guidelines/Kde-guidelines.md b/extra/guidelines/Kde-guidelines.md diff --git a/technical/guidelines/Libringclient-Coding-Rules.md b/extra/guidelines/Libringclient-Coding-Rules.md diff --git a/technical/guidelines/Qt-and-QML-coding-guidelines.md b/extra/guidelines/Qt-and-QML-coding-guidelines.md diff --git a/technical/guidelines/Qt-and-QML-testing-tools.md b/extra/guidelines/Qt-and-QML-testing-tools.md diff --git a/technical/guidelines/UI-and-UX-development.md b/extra/guidelines/UI-and-UX-development.md diff --git a/extra/important-RFCs.md b/extra/important-RFCs.md @@ -0,0 +1,43 @@ +# Important RFCs + +## SIP + +Reference: <http://tools.ietf.org/html/rfc3261> + +Valuable updates and extensions: + ++ SIP Re-INVITE: <http://tools.ietf.org/html/rfc6141> + +## ICE + +Reference: <http://tools.ietf.org/html/rfc5245> + +## SDP + +Reference: <http://tools.ietf.org/html/rfc4566> + +How to use SDP: <http://tools.ietf.org/html/rfc3264> +Valuable updates and extensions: + ++ SDP and IPv6: <http://tools.ietf.org/html/rfc6157> ++ SDP for SRTP: <http://tools.ietf.org/html/rfc4568> + + +## RTP + +Reference: <http://tools.ietf.org/html/rfc3550> + +Valuable updates and extensions: + ++ RTP and RTCP on same port: <http://tools.ietf.org/html/rfc5761> + + +## SRTP + +Reference: <http://tools.ietf.org/html/rfc3711> + +Valuable updates and extensions: + ++ DTLS for SRTP: <https://tools.ietf.org/html/rfc5763> et <http://tools.ietf.org/html/rfc5764> ++ AES-192 and AES-256: <https://tools.ietf.org/html/rfc6188> ++ AES-GCM: <https://tools.ietf.org/html/rfc7714> diff --git a/extra/improving-jami's-quality.md b/extra/improving-jami's-quality.md @@ -0,0 +1,86 @@ +# Improving Jami's Quality + +## Unit-tests + +* It is harder to make unit-test on Jami project because of the race conditions on multi-level dependance. + +* There is about 30 unit-tests and 26% coverage. Due to Jami high demand to give new functionalities to user quickly, they are not maintained by the developers or by a QA dept. + +* We use lcov for the coverage, you can find the lcov’s configuration in the daemon’s Makefile.am. Also, the coverage can be found at https://docs.jami.net/coverage/ + +* A system needs to be implemented to start convincing the team to make a unit-test for new code before merging + +* You can launch them by doing ‘make check’ in the daemon folder or separately in the unit-test folder with gdb: ‘gdb ut_media_encoder’ + +* The environment needs to be set with ‘--disable-shared’ during the ’./configure’ command + +## Framework Tests + +* You can find framework tests in the daemon’s Makefile.am and lunch it with ‘make integration’. This calls jami_test.py script in the tools/dringctrl folder. It uses dringctrl.py and controller.py which let you control Jami through bash. + +* This makes a series of calls to assure jami’s opendht network is stable. + +* Other framework tests need to be implemented in the future to tests Jami’s functionalities as a whole. + +## Integration tests + +* Each commit goes through integration tests in dockers on the build machines you can find the details at: jenkins.jami.net + +* Code-review is made by a fellow developer, sometimes the code is reviewed by the same developer, this should be avoided to emphasize Linus’ law. The ‘Jenkins verified’ label is sometimes discarded and replaced by +1 from a developer, this should also be avoided. + +* Sonarqube lets Jenkins build Jami and verify linting. You can find filters and results at: sonar- jami.savoirfairelinux.net Sonar uses clang-tidy as a preprocessor linting compilator, you can find clang’s filters in .clang-tidy file in the daemon folder. + +* On sflvault sonarqube can be found at service m#2637 and admin logins at service s#7169 + +## Doc and feedback: + +* You can find all the documentation on docs.jami.net + +* Issues are made by developers or users on git.jami.net + +## Monitoring + +* A script is called every 30 minutes on a virtual machine jami-monitorpeervm-01. You can find it on sflvault service s#7209 and is calling an other client viratual jami- monitorpeer-02 (service s#7224). A series of calls is being made and it returns the failure rate. You can find all the details at https://wiki.savoirfairelinux.com/wiki/Jami-monitorpeervm-01.mtl.sfl. + +* If needed, the manual command is ./script.sh –peer 031acbb73f2a3385b2babc7161f13325be103431 + +* It traces a real time point by point graph on https://monitoring.savoirfairelinux.com/grafana/dashboard/script/dyndash.js?host=jami-monitorpeervm-01.mtl.sfl&service=Check%20JamiCall&panelId=1&fullscreen&orgId=1 + +## Smoke tests + +Before each releases every clients MUST past a list of scenarios. + +Scenarios are described here: +[SmokeTestsJami.ods](uploads/264048655e2b25e1c1c207b84febec95/SmokeTestsJami.ods) + +They are reviewed by QA dpt. before sending it to the developers if needed. + +If a release contains a network commit that has been merged, the QA dept. Should be able to automate the different connectivity tests (as descibed below in Calls configurations) + +### Calls configurations. + +This is the list of network configurations that need to be tested: + +(IPv4 | IPv6) + (TURN | !TURN) + (STUN | !STUN) + (UPnP | !UPnP) for both sides. + +If both sides are IPv4 only without TURN/STUN/UPnP, the call should be only local. + +## Special note: FDroid + +The script to generate MR is in the client-android repo (fdroidMergeRequest.sh) + +## What needs to be done + +* Push coverage closer to 60% + +* Establish a system within the team to assure maintenance and creation of unit-tests. + +* Each major functionality should be tested as whole by adding a framework test (i.e. making sure a message was received, the call was ended well on both side, etc...) + +* Each new functionality should be tested on each platform before merging it to reduce regression + +* Integrate sonarqube on each client + +* Automate the testing of Jami’s behaviour on network compatibility + +* Make a make_ring.py script adaptable to windows also diff --git a/extra/index.rst b/extra/index.rst @@ -7,8 +7,6 @@ categorized yet: .. toctree:: :maxdepth: 1 + :glob: - introduction - faq - All-features-by-client - feature-requests + ./* diff --git a/extra/release-process.md b/extra/release-process.md @@ -0,0 +1,186 @@ +# Release Process + +Each Ring sub-project has its own repository, build process, integration +cycle and so on. More over the **Ring architecture is split into two +independent modules**: LibRing *(daemon)* and clients. + +Having a unique revision is not a solution in this situation. The +retained idea is having a global "state" and **various updates per +module**. + +For consistency, **each Ring module has to follow the same process** as +described in following points. But not all modules have to be modified +in same time. + +------------------------------------------------------------------------ + +**PROCESS FLOW:** + +1 | 2 | 3 | 4 | 5 | 6 +:-----:|:-----:|:-----:|:-----:|:-----:|:-----: +Redmine Ticket |Repository Preparation |Testing |Push tags |Packaging | Advertisement + +------------------------------------------------------------------------ + +Redmine Ticket +-------------- + +Create a new Task on redmine attached to the release story, for the +right sub-module. Set the title to "Release Major.Minor.Micro", with the +appropriate version number. + +Repository Preparation +---------------------- + +**This section was outdated and removed** + +Testing +------- + +* Remove any existing Ring installations from your machine. +* Start with clean git tree by running `git clean -d -f -x` from the top +level directory of the project. +* Build and install the daemon and client, see How\\\_to\\\_build +* Run the test suite in daemon and client, on different distributions and +machines. +* Run manual tests + * Try registering and using different accounts. + * Try making calls between Ring and other free softphones (Ekiga, +Linphone), as well as hardware VoIP phones. + * To catch uninitialized values being used, memory leaks, invalid frees, +etc. run `valgrind --track-origins=yes --db-attach=yes ./bin/dring` + +Push tags +-------- + +`git push --tags` + +Packaging +--------- + +```bash +git clone ssh://tcohen@gerrit-ring.savoirfairelinux.com:29420/ring +cd ring +git checkout packaging-releases +``` + +### RPM + +```bash +vim ring-daemon.spec +``` +```bash +%define version 2.2.0 +%define release 1 +... +... +... +%changelog +* Tue Apr 14 2015 Thibault Cohen <thibault.cohen@savoirfairelinux.com> - 2.2.0-1 +- New upstream version +``` + +### DEB + +```bash +vim debian/changelog +``` +```bash +ring-daemon (2.2.0-1) unstable; urgency=medium + + [ Thibault Cohen] + * New upstream version + + -- Thibault Cohen <thibault.cohen@savoirfairelinux.com> Tue, 14 Apr 2015 12:40:24 -0400 +``` + +### Release + +You just have to launch release script. This script launch build, +download and update files and repositories... + +``` +sflvault connect 525 +... +... +cd /root/repos/ring/ +./ring-release-daemon.sh +``` + +## Gnome + +```bash +git clone ssh://tcohen@gerrit-sflphone.savoirfairelinux.com:29420/ring-client-gnome +cd ring-client-gnome +git checkout packaging-releases +``` + +### RPM + +vim ring-daemon.spec + +```bash +%define version 0.2.1 +%define release 1 +%define daemon_tag 2.1.0 +%define lrc_tag 0.2.1 +%define gnome_tag %{version} +... +... +... +%changelog +* Tue Apr 14 2015 Thibault Cohen <thibault.cohen@savoirfairelinux.com> - 0.2.1-1 +- New upstream version +``` + +### DEB + +```bash +debian/changelog +``` + +```bash +ring-gnome (0.2.1-1) unstable; urgency=medium + + [ Thibault Cohen] + * New Upstream version + + -- Thibault Cohen <thibault.cohen@savoirfairelinux.com> Tue, 14 Apr 2015 13:16:38 -0400 +``` + +```bash +debian/rules +``` + +```bash +DAEMON_TAG = 2.1.0 +LRC_TAG = 0.2.1 +GNOME_TAG = $(VER) +``` + +### Release + + +You just have to launch release script. This script launch build, download and update files and repositories... + +```bash +sflvault connect 525 +... +... +cd /root/repos/ring/ +./ring-release-gnome.sh +``` + + +------------------------------------------------------------------------ + +Advertisement +------------- + +When the packaging is finished, test that they are installable. Then +announce the release + +* on the official website <https://ring.cx> +* on Twitter <https://twitter.com/JoinTheRing> +* by email to ring@lists.savoirfairelinux.net with the subject line: "Ring +Major.Minor.Patch released" diff --git a/extra/sync-protocol.md b/extra/sync-protocol.md @@ -0,0 +1,95 @@ +# Sync protocol + +The swarm chat provides new possibilities for every device. Now, it's possible to sync history between devices by sharing the related repository. Devices sync needs to be redefined to follow those changes. + +A lot of scenarios are defined in the [RFC for swarms](https://git.jami.net/savoirfairelinux/ring-project/wikis/Group-chat-feature-(design-draft)), however, this doesn't imply for syncing conversations between devices for the same user. Some new scenarios must be written. + +## Old method + +Device sync were done via the DHT. Because every value MUST NOT exceed 64k, conversations were not sent in device sync, nor member profiles, because it's too heavy. This is a problem and MUST be improved. + +In the old method, the daemon is listening on "inbox:DEVICE_ID" for DeviceSync values which contains the contact list to sync (cf `AccountManager::startSync()`); + +**NOTE:** The curretn **DeviceSync** value present on the **DHT** is deprecated with this draft. + +## New method + +Since Jami has the [ConnectionManager](https://git.jami.net/savoirfairelinux/ring-project/wikis/technical/5.2.%20The%20connection%20manager), using p2p socket is possible to perform sync quickly with big values (cause the socket is not limited in data) + +Now, this is the scenario used to sync: + +1. When the device (*A*) goes online, it announces its presence via a DeviceAnnouncement like the OldMethod +2. Other devices (*!A*) will detect that announce and will ask this device through the **ConnectionManager** to open a new channel named "sync://DEVICE_ID_A". (Note: A will get announcement from other devices, so it will asks for sync channels too). +3. As soon as this channel is opened, the device which is asking this channel will send a **DeviceSync** (cf next part) value containing its known conversations and contacts. +4. *A* will check the **DeviceSync** value and: + + Remove contacts if it detects removed contacts + + Add contacts if it detects added contacts + + Remove conversations if it detects removed conversations + + Add conversations if it detects added conversations + + Remove conversation's requests if request is accepted (now in conversations)/declined + + Add conversation's requests if detected + +Note: If *A* detects new conversations, it will asks the device which announced that conversation to clone the repository through a git channel (so like described in [Swarm chat design](https://git.jami.net/savoirfairelinux/ring-project/wikis/Group-chat-feature-(design-draft))) + +## Device Sync + +This value is a JSON containing: +```json +{ + "contacts": [/* Contacts (TODO) */], + "conversation": [ + { "id":"convID", "created":TIMESTAMP, "removed":OPTIONAL_TIMESTAMP }, + { "id":"convID2", "created":TIMESTAMP2, "removed":OPTIONAL_TIMESTAMP2 } /* ... */ + ], + "conversationsRequests": [ + { "id":"convID", "received":TIMESTAMP, "declined":OPTIONAL_TIMESTAMP, + "members":[], "metadatas:[] }, + { "id":"convID2", "received":TIMESTAMP2, "declined":OPTIONAL_TIMESTAMP2 + "members":[], "metadatas:[] } /* ... */ + ], +} +``` + +## User stories + +### Sync when adding device + ++ Alice creates a conversation ++ (Optional) Alice add some messages ++ Alice adds another device ++ The other device should receives and sync the conversation previously created + +### Sync when connect a device + ++ Alice creates a conversation ++ (Optional) Alice add some messages ++ Alice connects another device ++ The other device should receives and sync the conversation previously created + +### Sync between multiple devices + ++ Alice got 2 devices ++ Alice creates a conversation ++ The other device should receives and sync the conversation created on one of the devices + +### Sync for detecting new requests + ++ Alice receives a conversation's request ++ Alice add a new device ++ The other device should retrieve the requests from device A + +### Sync for accepted requests + ++ Alice has 2 devices ++ Alice accepts a conversation's request ++ The other device should detect the accepted request + +### Sync for decline requests + ++ Alice has 2 devices ++ Alice declines a conversation's request ++ The other device should detect the declined request + +## Current implementation + +https://review.jami.net/c/ring-daemon/+/15584 implements this page diff --git a/technical/working-with-gerrit.md b/extra/working-with-gerrit.md diff --git a/general/distributed-network-topo.png b/general/distributed-network-topo.png Binary files differ. diff --git a/general/faq.txt b/general/faq.txt @@ -1,5 +1,5 @@ FAQ -=== +===== This is an exhaustive list of frequently asked questions, including some technical questions. @@ -17,12 +17,12 @@ What is Jami? Read the :doc:`Introduction <introduction>`. What makes Jami different from other communication platforms? -~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Jami doesn't work like most communication platforms because it is *distributed*: -.. image:: distributed-network-topo.png +.. image:: ../media/distributed-network-topo.png Some of the consequences may seem surprising. For instance, since accounts are stored on your device, passwords are optional. However, @@ -32,7 +32,7 @@ the most significant practical differences are that you have more TODO: expand on this What do the red/green status circles next to avatars mean? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ On your own account, a red circle means that you aren't connected to the DHT. You may need to check your connection or restart the app. @@ -49,7 +49,7 @@ firewall. Why is a feature missing on my client? -~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Not every client implements all features; check the list :doc:`here <all-features-by-client>` to see if your client is missing the @@ -66,7 +66,7 @@ only have partial or no support. Please see :doc:`All Features by Client <all-features-by-client>` for the current status. Does Jami support typing notifications? Can I turn them on or off? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Most of the client support sending and receiving typing notifications. You can enable/disable them in the general settings. @@ -91,14 +91,14 @@ Not yet. Group chats are `coming soon Why is my contact not seeing my avatar? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Due to technical limitation, avatars are only transfered to your contacts during a video or audio call. This limitation will disappear when `group chats <technical-overview.html#swarms>`_ are released. Why aren't my sent messages showing up on all linked devices? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ All of your devices receive the same messages from your contacts, but *sent* messages will not show up on all of your devices. @@ -110,12 +110,12 @@ full conversation sync between linked devices for all conversations How can I make a bug report? -~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Please see :doc:`How to Make a Bug Report <../guides/how-to-make-a-bug-report>`. Where are the configuration files located? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Jami saves its configuration (account, certificates, history) at different locations depending the platform. @@ -144,7 +144,7 @@ folder: ``sent_data`` TODO: check this ^^^ and add note about file downloads (like images) How much bandwidth do I need for calls? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ For audio calls, Jami uses about 100 Kbps. For a video call, you need about 2 Mbit/s for medium quality. If your connection is slower, the @@ -160,7 +160,7 @@ Auto-adaptation is done between 200Kbit/s / max:6Mbit/s TODO: ^^^^^^^^^^^^^ What does this last line mean? TODO: How can SFL afford to give Jami away for free? How does/will SFL make money off Jami? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Summary: ethical company, they will make money supporting managed Jami solutions for organizations; their main source of income is elsewhere; @@ -202,14 +202,14 @@ For more information about Jami accounts, see `the Technical Overview <technical-overview.html#what-is-a-jami-account>`_. Where is my Jami ID? -~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Your Jami ID should be displayed prominently in whichever app you're using. It looks like a long string of numbers and letters: ``f2c815f5554bcc22689ce84d45aefdda1bce9146`` Why don't I have to use a password? -~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You are not forced to have a password on your account. On a centralized system you would use your password to authenticate with a @@ -225,7 +225,7 @@ If your device is encrypted, you may not want or need to use a password. Why don't I have to register a username? -~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The most permanent, secure identifier is your `Jami Id <#where-is-my-jami-id>`_, but since these are difficult to use for @@ -242,7 +242,7 @@ Can I change my username? With the default nameserver you cannot change your username. What is the difference between a username and a display name? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can use your username as an identifier. The username points to your `Jami Id <#where-is-my-jami-id>`_, which is your permanent, @@ -280,14 +280,14 @@ For more information about name servers, see `the Technical Overview <technical-overview.html#name-servers>`_. Can I recover my account if I forget my password? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ No. There can't be a traditional account recovery process; you are the only person with access to your data. If you are worried about forgetting your password, please use a password manager. What happens when I delete my account? -~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Your account is only stored on your own devices. If you delete your account from each device, the account is gone and you cannot get it diff --git a/general/technical-overview.txt b/general/technical-overview.txt @@ -226,7 +226,7 @@ Group conference calls ---------------------- Optional servers: DHT proxy, TURN, STUN ----------------------------- +---------------------------------------- DHT proxy and push notifications ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -245,4 +245,4 @@ ns.jami.net ~~~~~~~~~~~~~~~~~~~~ JAMS: Managed Jami networks for organizations --------------------------------------------- +------------------------------------------------- diff --git a/guides/index.rst b/guides/index.rst @@ -11,5 +11,5 @@ These are how-to guides that should `follow this format how-to-make-a-bug-report how-to-contribute-to-this-documentation how-to-submit-a-patch - how-to-set-up-a-TURN-server + how-to-set-up-a-turn-server how-to-set-up-a-dhtproxy-or-bootstrap-server diff --git a/index.rst b/index.rst @@ -24,11 +24,3 @@ contribute<guides/how-to-contribute-to-this-documentation>`! technical/index extra/index changelog -.. - - Indices and tables - ================== - - * :ref:`genindex` - * :ref:`modindex` - * :ref:`search` diff --git a/technical/HDMI-CEC-(fr).md b/technical/HDMI-CEC-(fr).md @@ -1,25 +0,0 @@ -Au 1er Mars 2018: - -Gérer le HDMI-CEC ------------------ - -- CEC est une norme encore sous utilisée et chaque constructeur en - fait sa propre version - - max compat : <http://libcec.pulse-eight.com/Vendor/Support> -- Framework android natif très élémentaire (api) et pas encore - implémenté par les constructeurs -- Libcec est un projet de Kodi qui permet le contrôle en cec - - les kernels android ne sont pas compatibles - - nécessite un accès root/adb - - même kodi ne fonctionne pas en cec, libcec a été retiré du build - android - - <http://kodi.wiki/view/NVIDIA_SHIELD_TV#Known_issues_and_limitations> -- Il existe des projets de driver permettant d'utiliser le cec sur - android, mais ils nécessitent tous de flasher l'appareil -- Il est possible d'utiliser un dongle pour envoyer les commandes cec - en usb puis usb -&gt; hdmi - - coûte 45 usd sans garantie de fonctionnement - - <https://stackoverflow.com/questions/45639210/use-libcec-usb-dongle-in-android-app> - - <https://www.pulse-eight.com/p/104/usb-hdmi-cec-adapter> -- La notion de user space driver pourrait nous servir pour écrire - notre propre pilote, mais elle n'existe pas sur AndroidTV- \ No newline at end of file diff --git a/technical/LRC-documentation.md b/technical/LRC-documentation.md @@ -1,78 +0,0 @@ -*This page is a stub.* - -### Introduction - -- Lrc (Libringclient) is an interface between the clients and - the daemon. It ensures to get the same behaviour for all client - using it. -![Introduction](/uploads/01896b43f2a29d29e5148ad60e608846/Introduction.png) - -note: red = missing feature. - -### DatabaseManager - -- this class is an interface between lrc and the sqlite database. This - class should not be called directly from the client. - -![Databasemanager](/uploads/896f30e099c7bb7b40451b528aefda6e/Databasemanager.png) - -### NewCallModel class and NewCall namespace - -- NewCallModel is an interface used to manage the calls. - -<!-- --> - -- When we need information about calls, members functions from the - model can return NewCall::Info. - -<!-- --> - -- When we need to perform some operation on a call, we pass it callId - to the delegate performing the operation. - -<!-- --> - -- note about the name : we are using New as prefix to avoid conflict - with the current CallModel and Call objects. - -![Newcallmodel_newcall](/uploads/c9ba7bec82a6d2cd3bc5ba1cde018f4a/Newcallmodel_newcall.png) - -### ContactModel class and Contact namespace - -- ContactModel is an interface to manage the contacts. - -<!-- --> - -- When we need information about contact(s), members functions from - the model can return Contact::Info - -<!-- --> - -- When we need to perform some operation on a contact, we pass it uri - to the delegate performing the operation. - -![Contactmodel_contact](/uploads/42c32722576a7a25de813419503805f5/Contactmodel_contact.png) - -### ConversationModel class, Conversation namespace and Message namespace - -- ConversationModel is an interface used to manage conversations - and messages. - -<!-- --> - -- When we need information about some conversation(s), members - functions from the model can return Conversation::Info. - Conversation::Info contains Messages. - -<!-- --> - -- note about Message : so far, we didn't need a MessageModel, but this - could be come soon. - -![Conversationmodel_conversation_message](/uploads/1b1ad190ef65b5aa088bbcb785645099/Conversationmodel_conversation_message.png) - -### resources - -[Diagram1.dia](/uploads/f6d0a81d67b075c13c57b7d9771ca065/Diagram1.dia) - -[Diagram2.dia](/uploads/00b3212a7642e58fd35b74c48e712332/Diagram2.dia)- \ No newline at end of file diff --git a/technical/advanced-features/index.rst b/technical/advanced-features/index.rst @@ -1,6 +1,6 @@ -########## +################### Advanced Features -########## +####################### .. toctree:: :maxdepth: 1 diff --git a/technical/basic-features/index.rst b/technical/basic-features/index.rst @@ -1,6 +1,6 @@ -########## +#################### Basic Features -########## +####################### .. toctree:: :maxdepth: 1 diff --git a/technical/chatview-i18n-(design-draft).md b/technical/chatview-i18n-(design-draft).md @@ -1,116 +0,0 @@ -The GNOME client's chatview lacks proper i18n support. - -Related bug report: https://git.jami.net/savoirfairelinux/ring-client-gnome/issues/900 - -first ideas: - -* i18n functions provided by separate js library -* i18n not trivial, overhead of custom code extremely high => use existing js lib -* library will be embedded into the client => code base should be as mature as possible -* ideally the translation process would be exactly the same as for the C++ code - -# in short - -(1) either - -C++ tells JS code which language is currently used and JS code loads translations - -(2) or - -C++ loads translations and passes them to JS code together with info about currently used language - -# review exisiting js i18n libs - -## [i18next](https://www.i18next.com/) - -**The good** - -* very mature -* huge user base -* lots of documentation -* No runtime dependencies - -**The bad** - -* huge, overkill ? -* uses own JSON format not gettext .mo - -This will require translation of .po files to JSON format (using [i18next-gettext-converter](https://github.com/i18next/i18next-gettext-converter)). - -**The ugly** - -* keys do not have the same meaning as gettext keys (see [this thread](https://stackoverflow.com/questions/19403787/gettext-style-keys-with-i18next-and-general-workflow)), this might be very confusing for the translators -* i18next-gettext-converter requires nodeJS as build dependency - -## [jed](http://messageformat.github.io/Jed/) - -**The good** - -* looks quite mature -* good user base -* provides gettext API (will be very intuitive to translators) -* No runtime dependencies - -**The bad** - -* not very active currently (but it might very well just be stable) -* uses own JSON format not gettext .mo - -This will require translation of .po files to JSON format (e.g. using [po2json](https://github.com/mikeedwards/po2json)). -po2json also requires nodeJS as dependency, **but** it is [available as Debian package](https://packages.debian.org/stable/javascript/node-po2json), which makes it slightly less annoying - -![gettext_end](/uploads/0be97d3200bcac7ab4b4432c18f879c3/gettext_end.png) - -Source: [Internationalization in JavaScript](http://www.jeromesteunou.net/internationalisation-in-javascript.html) - -## [Polyglot](http://airbnb.io/polyglot.js/) - -**The good** - -* developed by airbnb, well maintained -* good user base - -**The bad** - -* uses own JSON format not gettext .mo - -**The ugly** - -* runtime dependency on nodeJS - -# using Jed - -* patch draft: - -https://gerrit-ring.savoirfairelinux.com/c/ring-client-gnome/+/10615 - -* Retrieve strings: - -``` -$ cd po/chatview -$ xgettext -o ring-client-gnome-chatview.pot -L Javascript --from-code=utf-8 -D ../../ -f POTFILES.in - -``` - -* Translate them: - -``` -$ cp ring-client-gnome-chatview.pot en.po -$ cp ring-client-gnome-chatview.pot fr.po -# translate ... -``` - -* Install po2json: - -``` -$ apt-get install node-po2json - -``` - -* Generate JSON files: - -``` -$ ./scripts/build-chatview-locales.sh web/i18n -``` - -That's it. JSON translations are loaded as gresource. The `webkitchatcontainer` class calls `init_i18n()`, passing appropriate translation resources to the chatview. diff --git a/technical/connection-manager.md b/technical/connection-manager.md @@ -1,66 +0,0 @@ -# Introduction - -The connection manager is the first piece of the group chat features. This class manages connections to peers and offer to the user multiplexed sockets to devices they want to connect. For example, if Alice wants to be connected to one of Bob's device to transfer 2 files, she will ask the ConnectionManager to open 2 channels (one per file) to Bob. This will give: - -```cpp - aliceAccount->connectionManager().connectDevice(bobDeviceId, "file://file1", - [](std::shared_ptr<ChannelSocket> socket) { - if (socket) { - // transfer first file - } - }); - - aliceAccount->connectionManager().connectDevice(bobDeviceId, "file://file2", - [](std::shared_ptr<ChannelSocket> socket) { - if (socket) { - // transfer second file - } - }); -``` - -Behind that, the ConnectionManager will first connect to Bob's device via the DHT (via ICE) and setup a TLS Socket. Then, it will ask for a channel, and when the channel is ready, inform Alice via a callback. For the second file, it will use the first socket and will just open a new channel (only needs 2 TLS packet, so it's fast) - -# DHT side - -It's the same as [calls](https://git.jami.net/savoirfairelinux/ring-project/wikis/technical/2.4.%20Let's%20do%20a%20call), see **Exchange ICE candidates**, **ICE negotiation**, **Encrypt the control socket** but only in TCP. - -However, when a side receives a new ICE request, the callback set by ` void onICERequest(onICERequestCallback&& cb);` is triggered. - -# Negotiating a new channel - -A channel is defined by an id (unique) and a uri (not unique). For example (1, 'git://*') - -When ready, the ConnectionManager considers that the channel 0 exists. This channel is called the *CONTROL* channel and is used to ask for new channels. - -The protocol used is pretty simple and looks like the RTP protocol: - -1. 16 bits are used to store the length of the body. -2. 16 bits for the channel id (destination) -3. body - -So all packets have a 32 bits len header. - -To ask for a new channel, the ConnectionManager will send a `ChannelRequest` object (msgpack is used to serialize the struct) in the channel 0 to send the id and the name of the new channel to the peer (with `isAnswer = false`). The peer will call the callback given with ̀ void onChannelRequest(ChannelRequestCallBack&& cb);` and will refuse or accept the request. If accepted, the peer will answer with a ChannelRequest with the same data (and ̀`isAnswer = true`) and then both peers callbacks will be triggered to inform that the ChannelSock is usable. - -# Closing a channel - -A *EOF* is transmitted for a channel if the length of the content is 0. - -# Structure of the connectionManager - -## Ownership - -1. A JamiAccount owns the ConnectionManager and have access to the ChannelSocket objects (shared_ptr owned with the MultiplexedSocket. -2. The ConnectionManager owns MultiplexedSockets and ICE objects -3. MultiplexedSockets owns the TLS transport and the ChannelSocket objects -4. ChannelSocket owns the data buffers - -## Roles - -1. ConnectionManager is used to manage connections to peers. -2. MultiplexedSockets are used to send data over the TLSSocket, read the incoming packets and manage channels. -3. ChannelSockets are used by the client to interact with the other peer. - -# Usage - -Scenarios are described in the corresponding unit tests (`test/unitTest/connectionManager/connectionManager.cpp`)- \ No newline at end of file diff --git a/technical/important-RFCs.md b/technical/important-RFCs.md @@ -1,42 +0,0 @@ -# SIP - -Reference: <http://tools.ietf.org/html/rfc3261> - -Valuable updates and extensions: - -+ SIP Re-INVITE: <http://tools.ietf.org/html/rfc6141> - -# ICE - -Reference: <http://tools.ietf.org/html/rfc5245> - -# SDP - -Reference: <http://tools.ietf.org/html/rfc4566> - -How to use SDP: <http://tools.ietf.org/html/rfc3264> -Valuable updates and extensions: - -+ SDP and IPv6: <http://tools.ietf.org/html/rfc6157> -+ SDP for SRTP: <http://tools.ietf.org/html/rfc4568> - - -# RTP - -Reference: <http://tools.ietf.org/html/rfc3550> - -Valuable updates and extensions: - -+ RTP and RTCP on same port: <http://tools.ietf.org/html/rfc5761> - - -# SRTP - -Reference: <http://tools.ietf.org/html/rfc3711> - -Valuable updates and extensions: - -+ DTLS for SRTP: <https://tools.ietf.org/html/rfc5763> et <http://tools.ietf.org/html/rfc5764> -+ AES-192 and AES-256: <https://tools.ietf.org/html/rfc6188> -+ AES-GCM: <https://tools.ietf.org/html/rfc7714> - - \ No newline at end of file diff --git a/technical/improving-jami's-quality.md b/technical/improving-jami's-quality.md @@ -1,84 +0,0 @@ -## Unit-tests - -* It is harder to make unit-test on Jami project because of the race conditions on multi-level dependance. - -* There is about 30 unit-tests and 26% coverage. Due to Jami high demand to give new functionalities to user quickly, they are not maintained by the developers or by a QA dept. - -* We use lcov for the coverage, you can find the lcov’s configuration in the daemon’s Makefile.am. Also, the coverage can be found at https://docs.jami.net/coverage/ - -* A system needs to be implemented to start convincing the team to make a unit-test for new code before merging - -* You can launch them by doing ‘make check’ in the daemon folder or separately in the unit-test folder with gdb: ‘gdb ut_media_encoder’ - -* The environment needs to be set with ‘--disable-shared’ during the ’./configure’ command - -## Framework Tests - -* You can find framework tests in the daemon’s Makefile.am and lunch it with ‘make integration’. This calls jami_test.py script in the tools/dringctrl folder. It uses dringctrl.py and controller.py which let you control Jami through bash. - -* This makes a series of calls to assure jami’s opendht network is stable. - -* Other framework tests need to be implemented in the future to tests Jami’s functionalities as a whole. - -## Integration tests - -* Each commit goes through integration tests in dockers on the build machines you can find the details at: jenkins.jami.net - -* Code-review is made by a fellow developer, sometimes the code is reviewed by the same developer, this should be avoided to emphasize Linus’ law. The ‘Jenkins verified’ label is sometimes discarded and replaced by +1 from a developer, this should also be avoided. - -* Sonarqube lets Jenkins build Jami and verify linting. You can find filters and results at: sonar- jami.savoirfairelinux.net Sonar uses clang-tidy as a preprocessor linting compilator, you can find clang’s filters in .clang-tidy file in the daemon folder. - -* On sflvault sonarqube can be found at service m#2637 and admin logins at service s#7169 - -## Doc and feedback: - -* You can find all the documentation on docs.jami.net - -* Issues are made by developers or users on git.jami.net - -## Monitoring - -* A script is called every 30 minutes on a virtual machine jami-monitorpeervm-01. You can find it on sflvault service s#7209 and is calling an other client viratual jami- monitorpeer-02 (service s#7224). A series of calls is being made and it returns the failure rate. You can find all the details at https://wiki.savoirfairelinux.com/wiki/Jami-monitorpeervm-01.mtl.sfl. - -* If needed, the manual command is ./script.sh –peer 031acbb73f2a3385b2babc7161f13325be103431 - -* It traces a real time point by point graph on https://monitoring.savoirfairelinux.com/grafana/dashboard/script/dyndash.js?host=jami-monitorpeervm-01.mtl.sfl&service=Check%20JamiCall&panelId=1&fullscreen&orgId=1 - -## Smoke tests - -Before each releases every clients MUST past a list of scenarios. - -Scenarios are described here: -[SmokeTestsJami.ods](uploads/264048655e2b25e1c1c207b84febec95/SmokeTestsJami.ods) - -They are reviewed by QA dpt. before sending it to the developers if needed. - -If a release contains a network commit that has been merged, the QA dept. Should be able to automate the different connectivity tests (as descibed below in Calls configurations) - -### Calls configurations. - -This is the list of network configurations that need to be tested: - -(IPv4 | IPv6) + (TURN | !TURN) + (STUN | !STUN) + (UPnP | !UPnP) for both sides. - -If both sides are IPv4 only without TURN/STUN/UPnP, the call should be only local. - -## Special note: FDroid - -The script to generate MR is in the client-android repo (fdroidMergeRequest.sh) - -## What needs to be done - -* Push coverage closer to 60% - -* Establish a system within the team to assure maintenance and creation of unit-tests. - -* Each major functionality should be tested as whole by adding a framework test (i.e. making sure a message was received, the call was ended well on both side, etc...) - -* Each new functionality should be tested on each platform before merging it to reduce regression - -* Integrate sonarqube on each client - -* Automate the testing of Jami’s behaviour on network compatibility - -* Make a make_ring.py script adaptable to windows also- \ No newline at end of file diff --git a/technical/index.rst b/technical/index.rst @@ -1,6 +1,6 @@ -########## +#################### Technical Reference -########## +#################### This chapter includes in-depth explanations of how Jami is designed. It also serves as a reference for contributors. @@ -14,6 +14,7 @@ designed. It also serves as a reference for contributors. advanced-features/index certificates name-server-protocol + libjamiclient-documentation If you're reading this, you probably want to either contribute to one of the projects or to implement your own client. There are three main diff --git a/technical/libjamiclient-documentation.md b/technical/libjamiclient-documentation.md @@ -0,0 +1,80 @@ +# LRC documentation + +*This page is a stub.* + +### Introduction + +- Lrc (Libringclient) is an interface between the clients and + the daemon. It ensures to get the same behaviour for all client + using it. +![Introduction](/uploads/01896b43f2a29d29e5148ad60e608846/Introduction.png) + +note: red = missing feature. + +### DatabaseManager + +- this class is an interface between lrc and the sqlite database. This + class should not be called directly from the client. + +![Databasemanager](/uploads/896f30e099c7bb7b40451b528aefda6e/Databasemanager.png) + +### NewCallModel class and NewCall namespace + +- NewCallModel is an interface used to manage the calls. + +<!-- --> + +- When we need information about calls, members functions from the + model can return NewCall::Info. + +<!-- --> + +- When we need to perform some operation on a call, we pass it callId + to the delegate performing the operation. + +<!-- --> + +- note about the name : we are using New as prefix to avoid conflict + with the current CallModel and Call objects. + +![Newcallmodel_newcall](/uploads/c9ba7bec82a6d2cd3bc5ba1cde018f4a/Newcallmodel_newcall.png) + +### ContactModel class and Contact namespace + +- ContactModel is an interface to manage the contacts. + +<!-- --> + +- When we need information about contact(s), members functions from + the model can return Contact::Info + +<!-- --> + +- When we need to perform some operation on a contact, we pass it uri + to the delegate performing the operation. + +![Contactmodel_contact](/uploads/42c32722576a7a25de813419503805f5/Contactmodel_contact.png) + +### ConversationModel class, Conversation namespace and Message namespace + +- ConversationModel is an interface used to manage conversations + and messages. + +<!-- --> + +- When we need information about some conversation(s), members + functions from the model can return Conversation::Info. + Conversation::Info contains Messages. + +<!-- --> + +- note about Message : so far, we didn't need a MessageModel, but this + could be come soon. + +![Conversationmodel_conversation_message](/uploads/1b1ad190ef65b5aa088bbcb785645099/Conversationmodel_conversation_message.png) + +### resources + +[Diagram1.dia](/uploads/f6d0a81d67b075c13c57b7d9771ca065/Diagram1.dia) + +[Diagram2.dia](/uploads/00b3212a7642e58fd35b74c48e712332/Diagram2.dia) diff --git a/technical/release-process.md b/technical/release-process.md @@ -1,184 +0,0 @@ -Each Ring sub-project has its own repository, build process, integration -cycle and so on. More over the **Ring architecture is split into two -independent modules**: LibRing *(daemon)* and clients. - -Having a unique revision is not a solution in this situation. The -retained idea is having a global "state" and **various updates per -module**. - -For consistency, **each Ring module has to follow the same process** as -described in following points. But not all modules have to be modified -in same time. - ------------------------------------------------------------------------- - -**PROCESS FLOW:** - -1 | 2 | 3 | 4 | 5 | 6 -:-----:|:-----:|:-----:|:-----:|:-----:|:-----: -Redmine Ticket |Repository Preparation |Testing |Push tags |Packaging | Advertisement - ------------------------------------------------------------------------- - -Redmine Ticket --------------- - -Create a new Task on redmine attached to the release story, for the -right sub-module. Set the title to "Release Major.Minor.Micro", with the -appropriate version number. - -Repository Preparation ----------------------- - -**This section was outdated and removed** - -Testing -------- - -* Remove any existing Ring installations from your machine. -* Start with clean git tree by running `git clean -d -f -x` from the top -level directory of the project. -* Build and install the daemon and client, see How\\\_to\\\_build -* Run the test suite in daemon and client, on different distributions and -machines. -* Run manual tests - * Try registering and using different accounts. - * Try making calls between Ring and other free softphones (Ekiga, -Linphone), as well as hardware VoIP phones. - * To catch uninitialized values being used, memory leaks, invalid frees, -etc. run `valgrind --track-origins=yes --db-attach=yes ./bin/dring` - -Push tags --------- - -`git push --tags` - -Packaging ---------- - -```bash -git clone ssh://tcohen@gerrit-ring.savoirfairelinux.com:29420/ring -cd ring -git checkout packaging-releases -``` - -### RPM - -```bash -vim ring-daemon.spec -``` -```bash -%define version 2.2.0 -%define release 1 -... -... -... -%changelog -* Tue Apr 14 2015 Thibault Cohen <thibault.cohen@savoirfairelinux.com> - 2.2.0-1 -- New upstream version -``` - -### DEB - -```bash -vim debian/changelog -``` -```bash -ring-daemon (2.2.0-1) unstable; urgency=medium - - [ Thibault Cohen] - * New upstream version - - -- Thibault Cohen <thibault.cohen@savoirfairelinux.com> Tue, 14 Apr 2015 12:40:24 -0400 -``` - -### Release - -You just have to launch release script. This script launch build, -download and update files and repositories... - -``` -sflvault connect 525 -... -... -cd /root/repos/ring/ -./ring-release-daemon.sh -``` - -## Gnome - -```bash -git clone ssh://tcohen@gerrit-sflphone.savoirfairelinux.com:29420/ring-client-gnome -cd ring-client-gnome -git checkout packaging-releases -``` - -### RPM - -vim ring-daemon.spec - -```bash -%define version 0.2.1 -%define release 1 -%define daemon_tag 2.1.0 -%define lrc_tag 0.2.1 -%define gnome_tag %{version} -... -... -... -%changelog -* Tue Apr 14 2015 Thibault Cohen <thibault.cohen@savoirfairelinux.com> - 0.2.1-1 -- New upstream version -``` - -### DEB - -```bash -debian/changelog -``` - -```bash -ring-gnome (0.2.1-1) unstable; urgency=medium - - [ Thibault Cohen] - * New Upstream version - - -- Thibault Cohen <thibault.cohen@savoirfairelinux.com> Tue, 14 Apr 2015 13:16:38 -0400 -``` - -```bash -debian/rules -``` - -```bash -DAEMON_TAG = 2.1.0 -LRC_TAG = 0.2.1 -GNOME_TAG = $(VER) -``` - -### Release - - -You just have to launch release script. This script launch build, download and update files and repositories... - -```bash -sflvault connect 525 -... -... -cd /root/repos/ring/ -./ring-release-gnome.sh -``` - - ------------------------------------------------------------------------- - -Advertisement -------------- - -When the packaging is finished, test that they are installable. Then -announce the release - -* on the official website <https://ring.cx> -* on Twitter <https://twitter.com/JoinTheRing> -* by email to ring@lists.savoirfairelinux.net with the subject line: "Ring -Major.Minor.Patch released"- \ No newline at end of file diff --git a/technical/sync-protocol.md b/technical/sync-protocol.md @@ -1,93 +0,0 @@ -The swarm chat provides new possibilities for every device. Now, it's possible to sync history between devices by sharing the related repository. Devices sync needs to be redefined to follow those changes. - -A lot of scenarios are defined in the [RFC for swarms](https://git.jami.net/savoirfairelinux/ring-project/wikis/Group-chat-feature-(design-draft)), however, this doesn't imply for syncing conversations between devices for the same user. Some new scenarios must be written. - -# Old method - -Device sync were done via the DHT. Because every value MUST NOT exceed 64k, conversations were not sent in device sync, nor member profiles, because it's too heavy. This is a problem and MUST be improved. - -In the old method, the daemon is listening on "inbox:DEVICE_ID" for DeviceSync values which contains the contact list to sync (cf `AccountManager::startSync()`); - -**NOTE:** The curretn **DeviceSync** value present on the **DHT** is deprecated with this draft. - -# New method - -Since Jami has the [ConnectionManager](https://git.jami.net/savoirfairelinux/ring-project/wikis/technical/5.2.%20The%20connection%20manager), using p2p socket is possible to perform sync quickly with big values (cause the socket is not limited in data) - -Now, this is the scenario used to sync: - -1. When the device (*A*) goes online, it announces its presence via a DeviceAnnouncement like the OldMethod -2. Other devices (*!A*) will detect that announce and will ask this device through the **ConnectionManager** to open a new channel named "sync://DEVICE_ID_A". (Note: A will get announcement from other devices, so it will asks for sync channels too). -3. As soon as this channel is opened, the device which is asking this channel will send a **DeviceSync** (cf next part) value containing its known conversations and contacts. -4. *A* will check the **DeviceSync** value and: - + Remove contacts if it detects removed contacts - + Add contacts if it detects added contacts - + Remove conversations if it detects removed conversations - + Add conversations if it detects added conversations - + Remove conversation's requests if request is accepted (now in conversations)/declined - + Add conversation's requests if detected - -Note: If *A* detects new conversations, it will asks the device which announced that conversation to clone the repository through a git channel (so like described in [Swarm chat design](https://git.jami.net/savoirfairelinux/ring-project/wikis/Group-chat-feature-(design-draft))) - -# Device Sync - -This value is a JSON containing: -```json -{ - "contacts": [/* Contacts (TODO) */], - "conversation": [ - { "id":"convID", "created":TIMESTAMP, "removed":OPTIONAL_TIMESTAMP }, - { "id":"convID2", "created":TIMESTAMP2, "removed":OPTIONAL_TIMESTAMP2 } /* ... */ - ], - "conversationsRequests": [ - { "id":"convID", "received":TIMESTAMP, "declined":OPTIONAL_TIMESTAMP, - "members":[], "metadatas:[] }, - { "id":"convID2", "received":TIMESTAMP2, "declined":OPTIONAL_TIMESTAMP2 - "members":[], "metadatas:[] } /* ... */ - ], -} -``` - -# User stories - -## Sync when adding device - -+ Alice creates a conversation -+ (Optional) Alice add some messages -+ Alice adds another device -+ The other device should receives and sync the conversation previously created - -## Sync when connect a device - -+ Alice creates a conversation -+ (Optional) Alice add some messages -+ Alice connects another device -+ The other device should receives and sync the conversation previously created - -## Sync between multiple devices - -+ Alice got 2 devices -+ Alice creates a conversation -+ The other device should receives and sync the conversation created on one of the devices - -## Sync for detecting new requests - -+ Alice receives a conversation's request -+ Alice add a new device -+ The other device should retrieve the requests from device A - -## Sync for accepted requests - -+ Alice has 2 devices -+ Alice accepts a conversation's request -+ The other device should detect the accepted request - -## Sync for decline requests - -+ Alice has 2 devices -+ Alice declines a conversation's request -+ The other device should detect the declined request - -# Current implementation - -https://review.jami.net/c/ring-daemon/+/15584 implements this page- \ No newline at end of file