21st IEEE International Symposium on Network Computing and Applications (NCA 2022)
WebDHT:
browser-compatible distributed hash table for decentralized Web applications
https://nca2022.rossilorenzo.dev/
Web applications are migrating complex logic from server to browser code.
Some applications do not depend on a backend server.
One of the most challenging requirements is enabling efficient communications among users' browsers
(for instance: multiplayer games, telephony applications, live document editing)
How to exchange packets between browsers?
Relay server:
WebRTC channel:
Usually the signaling channel is a centralized server
Message forwarding
through referral browser
WebDHT is a decentralized peer discovery service, each browser in the DHT can be an intermediary to forward signaling messages between other nodes.
But who do we connect with?
Distributed Hash Table (DHT)
HashTable distributed on multiple computers, very popular in native peer-to-peer applications. Also defines a routing protocol to efficiently connect to other nodes.
Used by:
DHT compatible with browsers to distribute load
The same code can be used both in a high-performance server and in the browser
Related work
[1] "An adaptive peer-sampling protocol for building networks of browsers" Brice Nédelec et al, WWW 2021
Differences with Kademlia
Modifications are needed due to constraints of browser environments and of Web protocols:
WebDHT Handshake
with channel binding to protect against MitM
Project structure
Demo applications
wdhtchat.rossilorenzo.dev
Simple chat to demonstrate thow an application can easily use WebDHT as a peer-discovery mechanism.
tparty.rossilorenzo.dev
More complex application to watch videos in sync between a group of people, it also supports screen sharing. (video: Spring Open Movie by Blender)
Limits and future work
Thanks for your attention!
Questions?
You can find the source code on:
github.com/SnowyCoder/wdht