Slide 1

Slide 1 text

WebRTC in a decentralized environment Kaustav Das Modak | @kaustavdm

Slide 2

Slide 2 text

De-centralized No single control

Slide 3

Slide 3 text

Resilient Intent to survive worst possible conditions Image: Sapling by Jason Scragz. CC BY 2.0

Slide 4

Slide 4 text

Privacy-aware Harder to control and snoop on user data Image: All YOUR data are belong to U.S. by Imamon. CC BY 2.0

Slide 5

Slide 5 text

Secure End-to-end encryption to avoid unauthorized access Image: Secure Cloud - Data Security - Cyber Security by Perspecsys Photos. CC BY-SA 2.0

Slide 6

Slide 6 text

Re-decentralize Ask for a decentralized, secure and private internet with open access for everyone. Image: Grumpy Cat builds a GNU Internet by Frerk Meyer. CC BY-SA 2.0

Slide 7

Slide 7 text

Internet has centralized parts Undersea cables, root name servers, web servers

Slide 8

Slide 8 text

We can decentralize enough

Slide 9

Slide 9 text

Can we build a decentralized communications application?

Slide 10

Slide 10 text

matrix.org + WebRTC Standard for decentralized communication JSON API over HTTP Specifications for secure distribution of data Data persistence Open federation of servers

Slide 11

Slide 11 text

How matrix works

Slide 12

Slide 12 text

Peer-to-peer WebRTC Use matrix for signalling. Distributed discovery. Once connected, use data channels to exchange data.

Slide 13

Slide 13 text

About data channels RTCPeerConnection.createDataChannel() -> RTCDataChannel Uses SCTP (message-oriented, flow and congestion control) Send files as blobs Works with JavaScript primitives, like ArrayBuffer.

Slide 14

Slide 14 text

Using RTCDataChannel var pc = new RTCPeerConnection(); // Connect to peer through matrix... Then... var dchannel = pc.createDataChannel("hello", options); dchannel.onmessage = function (evt) { console.log("Received:", evt.data); }; dchannel.onopen = function () { dataChannel.send("Hello, World!"); };

Slide 15

Slide 15 text

Trade-offs Cannot initially support more than 3 users in a call. Cannot directly record stream on the server. Needs significantly more effort that a centralised signalling server.

Slide 16

Slide 16 text

matrix.org + SFU + WebRTC Use matrix rooms for grouping participants Use SFU to mix and broadcast traffic Use WebRTC to build clients across platforms Quick Fix: multi-party environments

Slide 17

Slide 17 text

The SAFE network A decentralized internet Alternatives?

Slide 18

Slide 18 text

Just decentralizing is not enough You need to deliver value.

Slide 19

Slide 19 text

Read more: “Why decentralize technology?” https://kaustavdm.in/why-decentralize-technology.html

Slide 20

Slide 20 text

Thanks! Tweet to @kaustavdm | https://kaustavdm.in