-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create custom replicate function instead of corestore.replicate #56
Comments
I was wondering about this and its relation to staged sync. |
Yeah I think it'll depend on both the data type and the device. Something like: mobile device
laptop
The main difference just being that the desktop app will get all the Sidenote: we'll need to think about how blobstore will handle file types other than images. |
Re. downloading lazily, our users are almost entirely offline, so sync needs to replicate everything eagerly. When we implement selective sync (e.g. offloading originals and in some cases previews when we know they are backed up elsewhere, e.g. online) then we might want to support lazy sync of the original/preview if the device is offline. Otherwise we would just show the scaled-up thumbnail/preview. In terms of how replication would work, I think we should create sparse replication streams. This will allow us to connect to clients and update hypercore lengths, so that we can provide users with feedback about how much data there is to sync. We can then use the core.download() method to start downloading data.
Yes, I've been thinking about that. For a video a "thumbnail" can be a frame from the video, but not sure if we have the processing power (or tech resources) to choose a thumbnail intelligently, so maybe just the first frame? The preview I was thinking could be a collection of jpegs of every X frames. To do this we would probably need ffmeg to be working on mobile, or we push the generation of this to the client (which we do for image resizing) and lean on an existing React Native library (if there is one) to do this. Will we want to namespace the blob core by type to facilitate downloading? e.g.
Anyway, that is a side-note, conversation to be continued in blob store / selective sync conversation. |
In terms of the logic for this sync, peer A connecting to peer B, from the perspective of peerA:
Our core manager will also need an |
Just thinking about it a bit more, authorization state is Our auth store will need Failing implementation of holepunchto/hypercore#305 we could always "hack" think by piping through a transform stream that filters all upload messages when a state |
I have implemented this in #61.
Initially, You can start replicating other namespaces with Unfortunately there is no It though this was better than the core manager having a concept of "authorized" and "unauthorized", instead it just gives the option to control which namespaces are replicating, and the authstore or a "replication manager" can control which namespaces will replicate. |
I think this is ok to close @sethvincent since this is all now implemented in #61 and #52? Re-open if you think it needs to be. |
corestore.replicate: https://github.com/holepunchto/corestore/blob/master/index.js#L271
instead of looping through all the cores in the corestore this function would add only the cores that are available to replicate as determined by the sync stage.
from @gmaclennan:
The text was updated successfully, but these errors were encountered: