Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jankaszel/hypercore-literary-broadcast
Broadcast verses from Goethe's Faust via hypercore extension messages
https://github.com/jankaszel/hypercore-literary-broadcast
goethe hypercore
Last synced: 17 days ago
JSON representation
Broadcast verses from Goethe's Faust via hypercore extension messages
- Host: GitHub
- URL: https://github.com/jankaszel/hypercore-literary-broadcast
- Owner: jankaszel
- License: mit
- Created: 2020-04-22T16:38:58.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-12-12T14:59:52.000Z (almost 4 years ago)
- Last Synced: 2024-10-17T01:01:14.360Z (22 days ago)
- Topics: goethe, hypercore
- Language: JavaScript
- Size: 28.3 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hypercore Extension Broadcast Test
This small application is a test on using [hypercore feed extensions](https://github.com/mafintosh/hypercore#ext--feedregisterextensionname-handlers) in order to broadcast ephemeral messages to peers on a P2P network. For that purpose, it sends single verses from Goethe's Faust (obtained from [Projekt Gutenberg](https://www.projekt-gutenberg.org/goethe/faust1/faust1.html)) to each peer that is accessing the same hypercore feed. To run this test, you'll need to have installed [Node.js](https://nodejs.org/en/) and to obtain the module's dependencies (`npm install`).
To my understanding, hypercore feeds† as well as their replication streams are encrypted and a feed's discovery key serves both for discovery as well as decryption. With the first instance of the application, we will let hypercore generate a new feed and thus, a new discovery key:
```bash
node .
```This instance will output its discovery key. Copy it and create a second instance with this key:
```bash
node .
```Upon feed initialization and discovery—both peers will join the same swarm based on the feed's key—they will start sending random lines from the first chapter of Faust to each other. That's it!
† I might be wrong on that feeds itself—that is, their persistence on memory or disk—are actually encrypted, and encryption could rather be limited to network communication via the [Noise protocol](https://noiseprotocol.org/).