Skip to content

jermsam/hello-peers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hello-peers

A demo for localFirst P2P with Holepunch's eco-system in the browser.

  • served over websockets and styled with tailwindcss

alt text

Relay Server

  1. Hyperswarm (a Kademlia DHT with hole-punching builtin)

When you create a p2p connection (like with WebRTC) you typically need a "signaling server" to arrange the connection. Hyperswarm replaces that server with a distributed signaling system.

  1. HyperDHT ( the Distributed Hash Table powering Hyperswarm built on top of dht-rpc)

Mainly used to facilitate finding and connecting to peers using end-to-end encrypted Noise streams. In the HyperDHT, peers are identified by a public key, not by an IP address. If you know someone's public key. you can connect to them regardless of where they're located, even if they move between different networks

  1. Hyperswarm Relay (Relaying the Hyperswarm DHT over framed streams to bring decentralized networking to everyone.)

The protocol is versioned and built on top of protomux.

Data Management

  1. Hypercore (a secure, distributed append-only log built for sharing large datasets and streams of real-time data)

A Hypercore can only be modified by its creator; internally it signs updates with a private key that's meant to live on a single machine, and should never be shared. However, the writer can replicate to many readers, in a manner similar to BitTorrent but Unlike BitTorrent, a Hypercore can be modified after its initial creation, and peers can receive live update notifications whenever the writer adds new blocks.

  1. Hyperbee (an append only B-tree based on Hypercore.

It uses a single Hypercore for storage, using a technique called embedded indexing As with the Hypercore, a Hyperbee can only have a single writer on a single machine; the creator of the Hyperdrive is the only person who can modify it because they're the only one with the private key. That said, the writer can replicate to many readers, as described in the Hypercore.

  1. Autobase (experimental module used to transform higher-level data structures (like Hyperbee) into multiwriter data structures with minimal additional work)

Autobase is used to automatically rebase multiple causally-linked Hypercores into a single, linearized Hypercore.

  1. Hyperdeebee (a MongoDB-like database built on top of Hyperbee with support for indexing based on Hyperbee Indexed DB)

The Software Development Kit

. hyper-sdk (A Software Development Kit for the hypercore-protocol) As you might have already noticed, Hypercore-protocol and it's ecosystem consists of a bunch of low level building blocks for working with data in distributed applications. Although this modularity makes it easy to mix and match pieces, it adds complexity when it comes to actually building something.

The Hyper SDK combines the lower level pieces of the Hyper stack into high level APIs that you can use across platforms so that you can focus on your application rather than the gritty details of how it works.

The blog

Find the blog that explains how this demo was put together HERE

About

LocalFirst P2P with Holepunch's eco-system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published