Upgrade to Pro — share decks privately, control downloads, hide ads and more …

WebRTC in a decentralized environment

WebRTC in a decentralized environment

This talk was presented at Kranky Geek (mini) Bangalore, June 7, 2016, as a high level discussion on the potential and current challenges of WebRTC as a technology for global, decentralized connectivity networks.

Avatar for Kaustav Das Modak

Kaustav Das Modak

June 07, 2016
Tweet

More Decks by Kaustav Das Modak

Other Decks in Technology

Transcript

  1. 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
  2. Secure End-to-end encryption to avoid unauthorized access Image: Secure Cloud

    - Data Security - Cyber Security by Perspecsys Photos. CC BY-SA 2.0
  3. 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
  4. matrix.org + WebRTC Standard for decentralized communication JSON API over

    HTTP Specifications for secure distribution of data Data persistence Open federation of servers
  5. About data channels RTCPeerConnection.createDataChannel() -> RTCDataChannel Uses SCTP (message-oriented, flow

    and congestion control) Send files as blobs Works with JavaScript primitives, like ArrayBuffer.
  6. 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!"); };
  7. 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.
  8. 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