Matrix

is an open standard for interoperable, decentralised, real-time communication over IP. It can be used anywhere you need a standard HTTP API for publishing and subscribing to data whilst tracking the conversation history - matrix.org

It can be used to power Instant Messaging, VoIP/WebRTC signalling, or Internet of Things communication

# Fedwiki Chat Room * #fedwiki:matrix.org

You can find us at the above address on the matrix :)

# Things we could do

Here we list some ideas and ways we could build a decentralised federation using Matrix.

- Fedwiki Chat Client - matrix-js-sdk - github

# Notable links - Ecosystem of projects - matrix.org - Matrix Authentication - Write your own client - matrix.org - Presentation - matrix.org - C++ chat library - pidgin.im - Dendrite Go impplementation - gitbub - Matrix-appservice-node - github - Matrix Recorder - gitlab

# Introduction

Matrix defines APIs for synchronising extensible JSON objects known as "events" between compatible clients, servers and services - matrix.org

Clients are typically messaging/VoIP applications or IoT devices/hubs and communicate by synchronising communication history with their "homeserver" using the "Client-Server API".

ARCHIVE DWebSummit2016_Lightning_Talks_Session_B Decentralized Web Summit - SESSION B: Lightning Talks and Workshops featuring Matthew Hodgson - Matrix

Each homeserver stores the communication history and account information for all of its clients, and shares data with the wider Matrix ecosystem by synchronising communication history with other homeservers and their clients.

Clients typically communicate with each other by emitting events in the context of a virtual "room". Room data is replicated across all of the homeservers whose users are participating in a given room.

As such, no single homeserver has control or ownership over a given room. Homeservers model communication history as a partially ordered graph of events known as the room's "event graph", which is synchronised with eventual consistency between the participating servers using the "Server-Server API".

This process of synchronising shared conversation history between homeservers run by different parties is called "Federation". Matrix optimises for the the Availability and Partition tolerance properties of CAP theorem at the expense of Consistency.

# Example

For example, for client A to send a message to client B, client A performs an HTTP PUT of the required JSON event on its homeserver (HS) using the client-server API.

A's HS appends this event to its copy of the room's event graph, signing the message in the context of the graph for integrity. A's HS then replicates the message to B's HS by performing an HTTP PUT using the server-server API.

B's HS authenticates the request, validates the event's signature, authorises the event's contents and then adds it to its copy of the room's event graph. Client B then receives the message from his homeserver via a long-lived GET request.

# About the matrix

Matrix defines the standard, and provides open source reference implementations of Matrix-compatible Servers, Clients, Client SDKs and Application Services to help you create new communication solutions or extend the capabilities and reach of existing ones.

The "matrix" is the name of the protocol and the network. The entities behind the matrix are: - _The Matrix.org Foundation_ is a registered UK company, but its role is hazy. - _Element, Inc._ is the UK company paying the developers, who control the development and publication of the protocol. Most of the official clients (web, desktop, mobile) are also called _Element_ (the old name was _Riot_). Multiple complaints were voiced by the users that neither name (matrix, element) is digitally searchable, making it extremely hard to reference the network or the clients.

# What is Matrix’s Mission?

Matrix’s initial goal is to fix the problem of fragmented IP communications: letting users message and call each other without having to care what app the other user is on - making it as easy as sending an email.

The longer term goal is for Matrix to act as a generic HTTP messaging and data synchronisation system for the whole web - allowing people, services and devices to easily communicate with each other, empowering users to own and control their data and select the services and vendors they want to use.

# What does Matrix provide?

Matrix provides the following api's * Open Standard HTTP APIs for JSON messages. * Client<->Server API * Server<->Server API

In addition matrix provides: # Application Service API The Application Service API defines how to extend the functionality of Matrix with ‘integrations’ and bridge to other networks. # Modules Modules specify features that must be implemented by particular classes of clients. # Open source reference implementations Matrix provides implementations of: - Clients (Web (React), iOS, Android) - Client SDKs (Javascript, Web (React), iOS, Android) website # Homeservers - Synapse - github - Dendrite (beta) - github - Conduit (alpha) - gitlab

# Application Services Bridges to IRC, Slack, Skype, Lync (and more…) website

The actual ecosystem and community of everyone running Matrix servers and services Loads of 3rd party contributions of clients, SDKs, servers and services.

You can find the full list of Matrix enabled projects at matrix.org

# What does federated mean?

Federation allows separate deployments of a communication service to communicate with each other - for instance a mail server run by Google federates with a mail server run by Microsoft when you send email from @gmail.com to @hotmail.com.

Federation is different to interoperability, as interoperable clients may simply be running on the same deployment - whereas in federation the deployments themselves are exchanging data in a compatible manner.

Matrix provides open federation - meaning that anyone on the internet can join into the Matrix ecosystem by deploying their own server.

Matrix federation is _eventually consistent_, meaning that the view of the network is _eventually_ (after a reasonable time of synchronisation) the same independent of the homeserver of the viewer.

# What does this mean for users?

The aim is to provide an analogous ecosystem to IRC (Internet Relay Chat) - one where you can communicate with pretty much anyone, without caring what app or server they are using, using whichever app & server you chose to use, and use a neutral identity system like an e-mail address or phone number to discover people to talk to.

# What kind of company is Matrix.org? Matrix used to be an open initiative which acts as a neutral custodian of the Matrix standard. It’s not actually incorporated anywhere at the moment but we are looking at the best legal structure for the future (and as of October 2015 we have hopefully found one). Since then they have created various companies and a foundation.

"Whatever the legal structure, we are committed to keeping the Matrix project open." - they often communicated.

# Who is funding Matrix.org?

Historically, most of the core contributors to Matrix worked at Amdocs, who have kindly given them permission to work on Matrix as an independent non-profit initiative. Other contributors were funded by their own employers or donate their own time to the project.

Since then New Vector, Inc., and later Element, Inc. pay for almost all developers, from the income of selling matrix related services and matrix based intallations to companies and governmental bodies.

# Who is building Matrix?

The core team is ~10 people with extensive experience in building custom VoIP and Messaging apps for mobile network operators. They all work for Element, Inc.

External contributors have the possibility to submit protocol suggestions (called MSC), but these are handled in a non-transparent process by Element, Inc., resulting ongoing complaints from the community.

# Why are you called Matrix?

We are called Matrix because we provide a structure in which all communication can be matrixed together. No, it’s nothing to do with the film (although you could go and build virtual worlds on top of Matrix if you wanted :)