Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds up-to-date documentation for the
$sync
namespace. @ErikSin.Note that this documents the API as-of digidem/comapeo-core#411, so that needs to be merged and released first.
I think this is potentially missing information that might be needed to implement all the screen designs we have: the sync state includes the number of connected peers, but it does not include the number of peers that are syncing the data cores.
I also think we need better vocabulary for talking about the different phases of sync: internally our data is divided into five "namespaces", and each namespace contained different record types:
auth
namespace contains therole
andcoreOwnership
record types, which establish membership of a project.config
namespace contains thedeviceInfo
,preset
,field
,icon
andprojectSettings
record types, which is the data needed to start collecting data (we call it "project metadata")blobIndex
namespace contains information about all the blobs in the project e.g. filenames and file sizes, like a directory listing.data
namespace contains theobservation
record type (and in the future will containnode
,way
andtrack
data types).blob
namespace contains the raw photo, video and audio data (media data)We split sync into two parts:
initial
sync of theauth
,config
andblobIndex
namespaces, which also shares information about how many observations and blobs need to be synced.data
sync of thedata
andblob
namespaces.initial
sync happens automatically and in the background whenever a project member connects on the local network.data
sync requires user interaction and is started via$sync.start()
.