commontoolsinc / synopsys

datastore service for datums
1 stars 1 forks source link

Support for collaborative replication #24

Open Gozala opened 3 hours ago

Gozala commented 3 hours ago

I have being musing a bit on how one could collaboration work and wanted to capture some rough thoughts.

Gozala commented 2 hours ago

💭 Say I have two collaboration units "work" and "hobby" there could be some datums that I want to be part of both meaning changes could be mode by respective collaborators. When viewing data through "work" I may not want to see changes made by "hobby" collaborators, but when viewing data through "hobby" I may want to see changes made by "work" collaborators.

I think from the constraints above we can derive that:

  1. Assertions and retractions need to have authority associated with a change.
  2. At query time we want to be able to narrow down results by authority
    • Perhaps even multiple of them

If we namespace everything by authority we will fragment data by it which means we could easily sync only data that is relevant there. On the flip side queries that span across authority boundaries become less efficient. Perhaps solution is to have different upstream and downstream layouts for sync and for query respectively

Upstream Layout

Downstream Layout