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 paradigms #30

Open
michielbdejong opened this issue Jan 5, 2023 · 2 comments
Open

sync paradigms #30

michielbdejong opened this issue Jan 5, 2023 · 2 comments

Comments

@michielbdejong
Copy link
Member

From federatedbookkeeping/research#36 (comment) -

CYB should probably support multiple sync paradigms:

  • forwarding one-way sync from a webhook
  • pull-push one-way sync
  • two-way sync from webhooks
  • pull-pull-push-push two-way sync
  • replay from logs
  • federated query
@michielbdejong
Copy link
Member Author

I think so far we're mainly focusing on "pull-pull-push one-way sync", right?
Read from the source, read from the target, calculate which changes are necessary and write them to the target.

@yasharpm
Copy link
Contributor

yasharpm commented Jan 5, 2023

My original idea was a pull-pull-push one directional that can also work in the opposite direction. That is, when pulling, you can get the "offset of changes" on both of the sources and compare them. Meaning it can as easily work for a two-way sync. The assumption here is that the sync will assume everything is in the intended state at the time that the sync is switched on.

This approach covers all the paradigms except the federated query.

It would contradict the conversation we had earlier about the change interpreter describing the desired state. To be honest, the difference between these paradigms were not as clear in my mind when I came up with this model.

Still, both reader and writer code interfaces are difficult to come up with. Imagine one task tracking reader mentions a project A which the writer for the target app will have to make sure such a project is present or define it otherwise.

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

No branches or pull requests

2 participants