Skip to content
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

Sync tracking issue #9

Closed
sethvincent opened this issue May 11, 2022 · 2 comments
Closed

Sync tracking issue #9

sethvincent opened this issue May 11, 2022 · 2 comments
Assignees
Labels
mvp Requirement for MVP sync

Comments

@sethvincent sethvincent added sprint 19 mvp Requirement for MVP labels May 11, 2022
@sethvincent sethvincent self-assigned this May 11, 2022
@sethvincent
Copy link
Contributor Author

rough sketch of potential sync api:

import Mapeo from '@mapeo/core'

const rootKey = Mapeo.getRootKey() 
const mapeo = new Mapeo({ rootKey })
const project1 = mapeo.project(name1)
const project2 = mapeo.project(name2)

await project1.ready()
await project2.ready()

const progress = mapeo.sync([
  project1,
  project2
])

progress.on('status', (status) => {
  // `status` is something like an array of percentages for each project
  // or an array of objects with sync progress for each peer in each project
})

mapeo.on('peer', (peer) => {
  // each peer would have information on what projects they are part of and their sync state
  // same info could be retrieved via a getter like `mapeo.peers`
})

@sethvincent sethvincent changed the title Implement sync state/progress Implement sync api with state/progress Aug 20, 2022
@sethvincent sethvincent changed the title Implement sync api with state/progress Sync tracking issue Dec 1, 2022
@sethvincent
Copy link
Contributor Author

sethvincent commented Apr 17, 2023

All the sub-tasks in this repo for this issue have been merged. Any other/new sync-related issues can be tracked separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mvp Requirement for MVP sync
Projects
None yet
Development

No branches or pull requests

3 participants