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.


Kaustav Das Modak

June 07, 2016


  1. WebRTC in a decentralized environment Kaustav Das Modak | @kaustavdm

  2. De-centralized No single control

  3. Resilient Intent to survive worst possible conditions Image: Sapling by

    Jason Scragz. CC BY 2.0
  4. 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
  5. Secure End-to-end encryption to avoid unauthorized access Image: Secure Cloud

    - Data Security - Cyber Security by Perspecsys Photos. CC BY-SA 2.0
  6. 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
  7. Internet has centralized parts Undersea cables, root name servers, web

  8. We can decentralize enough

  9. Can we build a decentralized communications application?

  10. matrix.org + WebRTC Standard for decentralized communication JSON API over

    HTTP Specifications for secure distribution of data Data persistence Open federation of servers
  11. How matrix works

  12. Peer-to-peer WebRTC Use matrix for signalling. Distributed discovery. Once connected,

    use data channels to exchange data.
  13. About data channels RTCPeerConnection.createDataChannel() -> RTCDataChannel Uses SCTP (message-oriented, flow

    and congestion control) Send files as blobs Works with JavaScript primitives, like ArrayBuffer.
  14. 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!"); };
  15. 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.
  16. 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
  17. The SAFE network A decentralized internet Alternatives?

  18. Just decentralizing is not enough You need to deliver value.

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

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