== Context
Real-time communication is somewhat of a pain point for the Wikimedia movement. There is a large contingent of IRC users with highly specialized workflows (various notifications, highlights, personal scripts, helper bots, vandalism tracking bots etc) for whom moving to a different chat system is probably a no-go. There is also a large contingent of less technical users for whom the cost of learning IRC (with all that setting up a convenient environment involves - cloaking, a bouncer, notifications etc) is prohibitive. Using a different system for them creates a rift in the community, and is often contentious (as the most popular options are not free software, often not privacy-friendly, and don't support open community use cases well). [[https://matrix.org/|Matrix]] / [[https://about.riot.im/|Riot.im]] (backend and default client for the same chat system) has the promise of fixing this problem - it is backwards-compatible with IRC on a low level and aims to provide a modern UI with all the bells and whistles people have come to expect from a chat system.
We should see what it would take for Matrix to be the offical chat system recommended for Wikimedia community members (IRC users could stay on IRC if they wanted, the two systems are fully interoperable) and see if we can help them get there. As a first step we should evaluate whether there are any features / UI improvements we'd want and whether those are must-haves or nice-to-haves.
Matrix.org is federated so there is probably not too much value in setting up our own instance. To evaluate, follow the steps on the [[https://meta.wikimedia.org/wiki/Matrix.org|Matrix.org]] Meta-Wiki page.
See also:== Wikimedia use cases
* as a chat system for the WMF: see {T230531}
* {T222458}* as a chat system for the Wikimedia communities: see {T230531}
* {T230531}* as an IRC "client" for accessing existing IRC channels with decent UX: see {T222458}
== Evaluation
==== Overview
Matrix is a messaging and data synchronization prn open messaging prootocol using a federated network of servers (called homeservers). Users and rooms are scoped to homeservers (with rooms being able to span many homeservers via aliases). Communication happens by clients talking to their own homeserver which is responsible for authenticating them, and homeservers synchronizing the messages with all the other homeservers who have clients participating in that conversation, ensuring eventual consistency. (Internally, Communication happens via JSON-based REST APIs;it's more of a data synchronization protocol, clients talk to their own homeserver which is responsible for authenticating themwith chat histories, homeservers exchange the messages with all the other homeservers who have clients participating in that conversationnot messages, ensurbeing eventual consistency of the chat history.the first-class citizens; the "How does it work" section of [[https://matrix.org/|matrix.org]] has a fairly accessible explanation.) There are "official" clients for all major platforms (web, iOS, Android, Win/Mac/Linux desktop), and a large variety of third-party clients (and also a few third-party server implementations). UX-wise, the official clients aim for a Slack-like experience (and the protocol is also in some ways a reimagination of the popular messaging features, like message editing or emoji reactions, for a federated world).
Aside from its federated nature, the distinguishing features compared to other chat applications are the ability to do end-to-end encryption (on top of the normal, piece-wise HTTPS encryptionn and signing between client and homeserver, and homeserver and homeserver) for group chat, and a focus on seamlessly bridging with other communication networks.
==== Features
The official server and clients offer a similar feature set to Slack and its competitors: permanent identities with constant presence and notifications; searchable chat histories; rich text including link previews and attachments; avatars, stickers, emoji responses and bot integrations; channel previews; typing notifications and read receipts; message editing and removal. The one major Slack feature missing is threading ([[https://github.com/vector-im/riot-web/issues/2349|#2349]]; planned for this year).
The look-and-feel is inspired by Slack (although somewhat less polished - UX was developer-driven until a year ago, when they could afford hiring a design team, and they are still playing catchup). See https://about.riot.im/features for some screenshots.
There's also support for integrated VoIP calling and audio / video conferencing, and embedding widgets, but UX-wise those are more on the experimental end.
One of the strengths of Matrix is compatibility; there's [[https://matrix.org/bridges/|a large variety of bridges]] to other communication networks.
From a developer point of view, the protocol is extensible and is by default based on JSON REST APIs. ([[https://matrix.org/docs/api/client-server/|see docs/sandbox]])
==== Privacy, safety and security
TODO
Matrix supports end-to-end room encryption based on Megolm, an adaptation of the Signal app's double-ratchet algorithm to group chat. Megolm has been packaged as a standalone library and went through an [[https://www.nccgroup.trust/us/our-research/matrix-olm-cryptographic-review/|external audit]]. That makes it the only non-fringe chat system today with E2E encrypted group chat. The related UX (such as device cross-signing) is currently somewhat substandard, but planned to be a major focus for the next few months.
Matrix itself has not been security audited, but the French state agency [[https://lwn.net/Articles/779331/|allegedly]] audited their fork. There have been two major security incidents, neither strictly related to the Matrix network itself: a [[https://matrix.org/blog/2019/04/11/we-have-discovered-and-addressed-a-security-breach-updated-2019-04-12/|matrix.org server breach]] in April 2019 (via weakly protected CI servers), and a [[https://techcrunch.com/2019/04/19/security-flaw-in-french-government-messaging-app-exposed-confidential-conversations/|critical flaw]] in the French government's system (reportedly specific to their auth integration).
==== Governance and funding
Matrix is an open protocol owned by a non-profit, managed via [[https://github.com/matrix-org/matrix-doc/blob/master/proposals/1779-open-governance.md|open governance process]], evolved through an [[https://matrix.org/docs/spec/proposals|RfC-style process]]. The official server and client implementations are open-source (Apache 2.0). The company doing the development initially relied on crowdfunding, then went through two rounds of VC funding ([[https://matrix.org/blog/2018/01/29/status-partners-up-with-new-vector-fueling-decentralised-comms-and-the-matrix-ecosystem/|$5M in 2018 January]] from secure messaging company Status.im and [[https://matrix.org/blog/2019/10/10/new-vector-raises-8-5-m-to-accelerate-matrix-riot-modular/|$8.5M in 2019 November]] from multiple SaaS funders); it now has a SaaS offering ([[https://modular.im/|modular.im]] and has been chosen bywork with the [[https://matrix.org/blog/2018/04/26/matrix-and-riot-confirmed-as-the-basis-for-frances-secure-instant-messenger-app/|French government]] and [[https://www.heise.de/newsticker/meldung/Open-Source-Bundeswehr-baut-eigene-verschluesselte-Messenger-App-4623404.html|German army]] as the supplier of their communication systems.who plan on using Matrix as the foundation of their communications systems.
(For comparison with the other large FLOSS Slack competitors, Mattermost raised around $40M in total, and Rocket.Chat $5M, according to Crunchbase. Slack and Telegram are between $1-2B.)
==== Adoption
Major Big Open organizations that have adopted Matrix include [[http://exple.tive.org/blarg/2019/12/19/over-the-line/|Mozilla]] and [[https://dot.kde.org/2019/02/20/kde-adding-matrix-its-im-framework|KDE]] and [[https://puri.sm/posts/introducing-the-new-librem-chat/|Purism]].
The federated part of the Matrix network is [[https://news.ycombinator.com/item?id=20956160|estimated]] to have about 3.5M users. (TODO compare?)
The [[https://matrix.org/blog/2018/04/26/matrix-and-riot-confirmed-as-the-basis-for-frances-secure-instant-messenger-app/|French government]] and [[https://www.heise.de/newsticker/meldung/Open-Source-Bundeswehr-baut-eigene-verschluesselte-Messenger-App-4623404.html|German army]] plan to use a fork of Matrix for their internal communications infrastructure.
==== Roadmap
* [[https://matrix.org/blog/2019/02/15/publishing-the-backend-roadmap/|Server (Matrix/Synapse) roadmap]] / [[https://medium.com/@RiotChat/whats-next-for-riot-web-be48f948c801|client (Riot) roadmap]] from early 2019
*Some of the 2020 priority focus areas for the Matrix / Riot team include end-to-end encrypted rooms, UX for non-technical users, group management, and bridges (connecting to other chat systems). See the [[https://matrix.org/blog/2019/12/24/the-2019-matrix-holiday-update/|2019 report / 2020 roadmap]] for more details.