dao-xyz / peerbit

P2P database framework with encryption, sharding and search
https://peerbit.org
Apache License 2.0
192 stars 15 forks source link

@peerbit/shared-log: Domain specific replication #306

Open marcus-pousette opened 3 months ago

marcus-pousette commented 3 months ago

The current solution allows you to replicate on a hash-based domain. I.e. you can replicate a range of hashes that correspond to some content. In reality users more commonly want to replicate content more by some specific criteria, like author or time range. While you can do this with the current solution (create a replication range for each piece of document you want to replicate), it will be inefficient:

For example, a video stream might have millions of chunks of data and you might only want to replicate 1 minute worth of video. This could in theory be represented only with 1 replication range in a time-based domain

A user only wants to replicate their own content, and/or their friends. This could be represented with a replication range for each person instead of a replication range for each document.

TODO

Implement a way of replicating on other domains than the hash based one