Slide 1

Slide 1 text

#about:matrix.org An HTTP nerd’s quick-view of the Matrix ecosystem

Slide 2

Slide 2 text

In this presentation • Decentralization basics • What is Matrix? • Specification overview • Ecosystem overview • Building a simple Matrix client using Matrix JS SDK

Slide 3

Slide 3 text

Decentralized Creating a system with no centralized control. Resilient: Survive failures Privacy-aware: Harder to snoop on user data Secure: E2E/distributed encryption & access control

Slide 4

Slide 4 text

We can decentralize enough HTTP. DNS. HTML. JSON. Web servers. APIs. Web Browsers… Matrix.

Slide 5

Slide 5 text

About Open standard for interoperable, decentralized, real-time communication over IP. See: matrix.org

Slide 6

Slide 6 text

• Instant Message • VoIP/WebRTC signaling • IoT messaging • Bridging networks • Conversational bots • … “Anywhere you need a standard HTTP API for publishing and subscribing to data whilst tracking the conversation history.” - Matrix FAQ Use case scenarios

Slide 7

Slide 7 text

Key features* JSON over HTTP APIs. • Fully distributed “rooms” • Inbuilt WebRTC calling • Clients can choose to store data locally, or, not * That I like. matrix.org Element.io Our bot IRC gateway example.org

Slide 8

Slide 8 text

IDs & namespaces Username: @kaustavdm:matrix.org Room alias: #matrix-dev:matrix.org Room internal ID: !jxlRxnrZCsjpjDubDX:matrix.org Event namespace: • m.text • m.room.create • com.example.custom_event

Slide 9

Slide 9 text

Matrix ecosystem Open standard – The Specification Client-Server API Federation API Application Service API Identity Service API Push Gateway API Implementation & ecosystem Element.io Gitter Application services Client SDKs Homeservers

Slide 10

Slide 10 text

Let’s focus on Open standard – The Specification Client-Server API Federation API Application Service API Identity Service API Push Gateway API Implementation & ecosystem Element.io Gitter Application services Client SDKs Homeservers

Slide 11

Slide 11 text

Client-Server API [Key features] Authentication • Login • Register • Account management Events • Syncing • Room Events • Receive • Send Room • Listing • Membership • Permissions User Data • Directory • Profile Modules • Instant Messaging • Direct Messaging • Presence • VoIP See: https://matrix.org/docs/spec/client_server/r0.6.1

Slide 12

Slide 12 text

• Wrapper around HTTP API • Ergonomic & idiomatic JS code • Works in Node (LTS) & Browser ▪ Syncing ▪ Send & receive events ▪ Room state ▪ Retrying failed messages ▪ Queueing and pagination ▪ WebRTC calling … Matrix JavaScript SDK

Slide 13

Slide 13 text

Using Matrix JS SDK [happy path] What we want: Connect to Matrix as an existing user, using password login, send a message, and then quit. How we want it: As a Node.js script. When: Yesterday.

Slide 14

Slide 14 text

Next steps • Read the Matrix specifications: matrix.org/docs/spec/ • Look at the Matrix JS SDK: github.com/matrix-org/matrix-js-sdk/ • Sample code I used: github.com/kaustavdm/matrix-js-sdk-howto/ • Try out Element.io. • Build something nice. ☺

Slide 15

Slide 15 text

fin. By: @kaustavdm | kaustavdm.in License: CC-BY 4.0