The experimental client has been released Riot P2P.
Riot — originally a client for the federated network Matrix. The P2P modification adds server implementation and federation to the client without using centralized DNS through integration libp2p, which is also used in IPFS. This is the first version of the client that maintains the session after a page reload, but in future major updates (e.g., 0.2.0) data will still be deleted. Therefore, it is not recommended to use the client for anything important.
The client implements federation, room creation, and displays a global (serverless!) room directory.
At the same time, the main Matrix network, which uses DNS, and the Matrix network on libp2p cannot federate and interact with each other yet.
To use the client, just click the login button, after which you will receive a generated ID in the network. Data export is not supported yet.
Since this is an unstable presentation of a possible concept, you may encounter issues:
- You will not be able to log into your account or interact with other clients if the server running as a Service Worker is killed by the browser after a timeout. This problem was observed in Firefox, which does this after 30 seconds of inactivity].
- On the network level, libp2p imposes limits on the number of actions that can be performed over time, which may cause federation issues.
The work on the P2P version of Matrix is driven by the developers' desire to give their users more freedom. Detachment from a central server facilitates communication within local and mesh networks, especially in conditions where access to an external network is limited or nonexistent. This also positively impacts privacy by minimizing the metadata transmitted, which in such scenarios is stored only by the participants in the conversation. Ultimately, this prompts consideration of refactoring current Matrix concepts for greater portability and security.
The implementation of the server API is achieved by compiling the server Dendrite into WebAssembly code, which runs alongside the client as a Service Worker, using IndexedDB and SQLite for local data storage in the case of the web version and the Electron wrapper.
Dendrite is a developing 'second generation' Matrix server written in Go, aimed at complete modularity, which can also be used in a monolithic form. In its modular form, it utilizes Apache Kafka for microservices interactions, while in monolithic form it works with Naffka. Documentation for building the P2P version of Dendrite can be found on GitHub.
Dendrite was originally conceived as a general-purpose server intended to be a direct replacement for Synapse, which is written in Python and has performance and scalability issues. However, due to the need for support and significant refactoring of Synapse, Dendrite development was put on hold. Ultimately, development resumed, but the existing codebase was decided to be developed not in the context of general purpose, but rather focused on adapting for integration into portable and low-powered client devices, like browsers and phones.
The current implementation of Dendrite is still in the early stages of development, but it is sufficient for simple federation:
Client-Server APIs: 34% (227/672 tests) — up from 33%
Federation APIs: 34% (35/103 tests) — up from 27%
This is not the first attempt at implementing P2P. Earlier, there was an initiative to create a CoAP proxy in the Yggdrasil network for Synapse.
Matrix protocol developers do not focus solely on federation and are experimenting with tools for even greater decentralization. For example, an experiment was conducted to reduce costs at the transport level. Developing is a daemon Pantalaimon — a proxy that any client can connect to without encryption support and interact with encrypted messages. All initiatives aim to eventually eliminate the login binding to the server, abolishing MXID, interacting with the network through a public key, which is already partially implemented in Riot P2P.
More detailed information about the concepts of planned implementations can be found in the FOSDEM 2020 presentation on YouTube and in a recently released blog post.
There is also a Riot P2P version for Android, based on the code of the old app. In the future, it is planned to migrate it to the current RiotX.
Additionally
-
Project TARDIS (Time Agnostic Room DAG Inspection Service) — a debugger for linear event graph (DAG) for Matrix rooms based on Riot P2P.
-
In the project Conduit (a community-developed server in Rust) now encryption and attachments have been implemented.
-
An experimental server based on Scala has been launched — Mascarene.
Source: linux.org.ru
