Hypha Spike: WebRTC 1
![Two browser windows, side-by-side. The left one is running the DAT 1 spike, the right one this one. Data has replicated between them.](webrtc-browser.jpeg)
A hypercore replicating over WebRTC between two browsers
Design
Following on from (and in conjunction with) the Hypha Spike: DAT 1, this spike aims to:
- Replicate a hypercore from browser-to-browser using WebRTC.
Notes
Iteration plan
- Create a simple single-page web application that replicates a passed read key (equivalent to the native replication script)
Usage
![The DAT 1 spike, this spike, and signalhub running in three terminal windows tiled in quarters in Tilix (the fourth terminal window is empty at my site’s directory)](webrtc-terminal.jpeg)
The servers
-
Run the Hypha DAT 1 Spike (blog post) in a separate browser and copy the hyphalink.
-
Run a local instance of signalhub
npm install -g signalhub cd <dat-1-spike-directory>/server signalhub listen -p 445 --key localhost-key.pem --cert localhost.pem
-
Paste the hyphalink into the hyphalink field and press the Connect button.
Postmortem
- No special notes/gotchas. Worked out of the box.