WebRTC in a decentralized environment · matrix.org + WebRTC Standard for decentralized...
Transcript of WebRTC in a decentralized environment · matrix.org + WebRTC Standard for decentralized...
![Page 1: WebRTC in a decentralized environment · matrix.org + WebRTC Standard for decentralized communication JSON API over HTTP Specifications for secure distribution of data Data persistence](https://reader033.fdocuments.net/reader033/viewer/2022051608/603c9e36ec53ff24d37c1f0c/html5/thumbnails/1.jpg)
WebRTC in a decentralized environment
Kaustav Das Modak | @kaustavdm
![Page 2: WebRTC in a decentralized environment · matrix.org + WebRTC Standard for decentralized communication JSON API over HTTP Specifications for secure distribution of data Data persistence](https://reader033.fdocuments.net/reader033/viewer/2022051608/603c9e36ec53ff24d37c1f0c/html5/thumbnails/2.jpg)
De-centralizedNo single control
![Page 3: WebRTC in a decentralized environment · matrix.org + WebRTC Standard for decentralized communication JSON API over HTTP Specifications for secure distribution of data Data persistence](https://reader033.fdocuments.net/reader033/viewer/2022051608/603c9e36ec53ff24d37c1f0c/html5/thumbnails/3.jpg)
ResilientIntent to survive worst possible conditions
Image: Sapling by Jason Scragz. CC BY 2.0
![Page 4: WebRTC in a decentralized environment · matrix.org + WebRTC Standard for decentralized communication JSON API over HTTP Specifications for secure distribution of data Data persistence](https://reader033.fdocuments.net/reader033/viewer/2022051608/603c9e36ec53ff24d37c1f0c/html5/thumbnails/4.jpg)
Privacy-awareHarder to control and snoop on user data
Image: All YOUR data are belong to U.S. by Imamon. CC BY 2.0
![Page 5: WebRTC in a decentralized environment · matrix.org + WebRTC Standard for decentralized communication JSON API over HTTP Specifications for secure distribution of data Data persistence](https://reader033.fdocuments.net/reader033/viewer/2022051608/603c9e36ec53ff24d37c1f0c/html5/thumbnails/5.jpg)
SecureEnd-to-end encryption to avoid unauthorized access
Image: Secure Cloud - Data Security - Cyber Security by Perspecsys Photos. CC BY-SA 2.0
![Page 6: WebRTC in a decentralized environment · matrix.org + WebRTC Standard for decentralized communication JSON API over HTTP Specifications for secure distribution of data Data persistence](https://reader033.fdocuments.net/reader033/viewer/2022051608/603c9e36ec53ff24d37c1f0c/html5/thumbnails/6.jpg)
Re-decentralizeAsk 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
![Page 7: WebRTC in a decentralized environment · matrix.org + WebRTC Standard for decentralized communication JSON API over HTTP Specifications for secure distribution of data Data persistence](https://reader033.fdocuments.net/reader033/viewer/2022051608/603c9e36ec53ff24d37c1f0c/html5/thumbnails/7.jpg)
Internet has centralized partsUndersea cables, root name servers, web servers
![Page 8: WebRTC in a decentralized environment · matrix.org + WebRTC Standard for decentralized communication JSON API over HTTP Specifications for secure distribution of data Data persistence](https://reader033.fdocuments.net/reader033/viewer/2022051608/603c9e36ec53ff24d37c1f0c/html5/thumbnails/8.jpg)
We can decentralize enough
![Page 9: WebRTC in a decentralized environment · matrix.org + WebRTC Standard for decentralized communication JSON API over HTTP Specifications for secure distribution of data Data persistence](https://reader033.fdocuments.net/reader033/viewer/2022051608/603c9e36ec53ff24d37c1f0c/html5/thumbnails/9.jpg)
Can we build a decentralized communications application?
![Page 10: WebRTC in a decentralized environment · matrix.org + WebRTC Standard for decentralized communication JSON API over HTTP Specifications for secure distribution of data Data persistence](https://reader033.fdocuments.net/reader033/viewer/2022051608/603c9e36ec53ff24d37c1f0c/html5/thumbnails/10.jpg)
matrix.org + WebRTCStandard for decentralized communication
JSON API over HTTP Specifications for secure distribution of data
Data persistence Open federation of servers
![Page 11: WebRTC in a decentralized environment · matrix.org + WebRTC Standard for decentralized communication JSON API over HTTP Specifications for secure distribution of data Data persistence](https://reader033.fdocuments.net/reader033/viewer/2022051608/603c9e36ec53ff24d37c1f0c/html5/thumbnails/11.jpg)
How matrix works
![Page 12: WebRTC in a decentralized environment · matrix.org + WebRTC Standard for decentralized communication JSON API over HTTP Specifications for secure distribution of data Data persistence](https://reader033.fdocuments.net/reader033/viewer/2022051608/603c9e36ec53ff24d37c1f0c/html5/thumbnails/12.jpg)
Peer-to-peer WebRTCUse matrix for signalling. Distributed discovery.
Once connected, use data channels to exchange data.
![Page 13: WebRTC in a decentralized environment · matrix.org + WebRTC Standard for decentralized communication JSON API over HTTP Specifications for secure distribution of data Data persistence](https://reader033.fdocuments.net/reader033/viewer/2022051608/603c9e36ec53ff24d37c1f0c/html5/thumbnails/13.jpg)
About data channelsRTCPeerConnection.createDataChannel() -> RTCDataChannel Uses SCTP (message-oriented, flow and congestion control)
Send files as blobs Works with JavaScript primitives, like ArrayBuffer.
![Page 14: WebRTC in a decentralized environment · matrix.org + WebRTC Standard for decentralized communication JSON API over HTTP Specifications for secure distribution of data Data persistence](https://reader033.fdocuments.net/reader033/viewer/2022051608/603c9e36ec53ff24d37c1f0c/html5/thumbnails/14.jpg)
Using RTCDataChannelvar 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!"); };
![Page 15: WebRTC in a decentralized environment · matrix.org + WebRTC Standard for decentralized communication JSON API over HTTP Specifications for secure distribution of data Data persistence](https://reader033.fdocuments.net/reader033/viewer/2022051608/603c9e36ec53ff24d37c1f0c/html5/thumbnails/15.jpg)
Trade-offsCannot 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.
![Page 16: WebRTC in a decentralized environment · matrix.org + WebRTC Standard for decentralized communication JSON API over HTTP Specifications for secure distribution of data Data persistence](https://reader033.fdocuments.net/reader033/viewer/2022051608/603c9e36ec53ff24d37c1f0c/html5/thumbnails/16.jpg)
matrix.org + SFU + WebRTCUse matrix rooms for grouping participants
Use SFU to mix and broadcast traffic Use WebRTC to build clients across platforms
Quick Fix: multi-party environments
![Page 17: WebRTC in a decentralized environment · matrix.org + WebRTC Standard for decentralized communication JSON API over HTTP Specifications for secure distribution of data Data persistence](https://reader033.fdocuments.net/reader033/viewer/2022051608/603c9e36ec53ff24d37c1f0c/html5/thumbnails/17.jpg)
The SAFE networkA decentralized internet
Alternatives?
![Page 18: WebRTC in a decentralized environment · matrix.org + WebRTC Standard for decentralized communication JSON API over HTTP Specifications for secure distribution of data Data persistence](https://reader033.fdocuments.net/reader033/viewer/2022051608/603c9e36ec53ff24d37c1f0c/html5/thumbnails/18.jpg)
Just decentralizing is not enough You need to deliver value.
![Page 19: WebRTC in a decentralized environment · matrix.org + WebRTC Standard for decentralized communication JSON API over HTTP Specifications for secure distribution of data Data persistence](https://reader033.fdocuments.net/reader033/viewer/2022051608/603c9e36ec53ff24d37c1f0c/html5/thumbnails/19.jpg)
Read more: “Why decentralize technology?”
https://kaustavdm.in/why-decentralize-technology.html