moose-team / friends-swarm

:bee: a webrtc-swarm with friends
MIT License
33 stars 6 forks source link

Swap out hyperlog for hypercore: selective replication #8

Open hackergrrl opened 7 years ago

hackergrrl commented 7 years ago

This is a non-trivial change, but eventually it'd be great to see Friends using hypercore.

It offers one particular "killer feature" that'd be of great use to Friends, which is selective replication. Hyperlog forces complete replication of a data set, which, for chat, is almost never desirable: you don't want to download 100% of a channel's chat history when you join; you want just the last N messages. Hypercore provides this while still keeping the crypto guarantees on data integrity.

The big caveat is that hypercore doesn't handle many cross-referencing append-only logs like hyperlog does. A great module for someone to build out would be hyperlog-hypercore or hyperlog2: a module that provides hyperlog's API, but is powered by hypercore underneath.

Flet commented 7 years ago

This is a great idea!