Aral Balkan

Mastodon icon RSS feed icon

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.

A hypercore replicating over WebRTC between two browsers

Source code

Design

Following on from (and in conjunction with) the Hypha Spike: DAT 1, this spike aims to:

Notes

Iteration plan

  1. 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)

The servers

  1. Run the Hypha DAT 1 Spike (blog post) in a separate browser and copy the hyphalink.

  2. 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

  3. Paste the hyphalink into the hyphalink field and press the Connect button.

Postmortem

Reference