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

[EPIC] Add support for multiple collections from same schema #3262

Open
AndrewSisley opened this issue Nov 20, 2024 · 1 comment
Open

[EPIC] Add support for multiple collections from same schema #3262

AndrewSisley opened this issue Nov 20, 2024 · 1 comment
Labels
area/collections Related to the collections system area/schema Related to the schema system code quality Related to improving code quality feature New feature or request

Comments

@AndrewSisley
Copy link
Contributor

AndrewSisley commented Nov 20, 2024

  • Use interface syntax (consistent with view-schema only types) for schema-only declaration.
    • Name problem - interface cannot share same name as concrete type. We could prefix interface names with _?
  • Anchoring is local only.
  • It is a local choice if a node wishes to broadcast which collections a doc belongs to.
    • CollectionID/BroadcastID not required in order to have multiple cols locally. Existence of property will determine whether docs are broadcasted or not with the ID.
    • Branchable collection id will be the broadcast id if the collection is branchable, otherwise the property may be set to anything by the user (we could limit this to ID types, but why?) (SDL, PatchCollection).
    • Later, we can offer to generate an id.
  • Allows P2P linking to remain local - nodes subscribe to a col id, and store it against their chosen local RootID.
    • Need to define behaviour for linking. For now, add to all by default, unless broadcasted id matches a local id.
  • Need to decide what happens when adding new collections (datastore migration?)
  • Long term we can optimise storage space for docs existing in multiple cols, but for now keep things simple and duplicate - it gets a little fiddly with Lens.
  • Introduce means to remove doc from collection without deleting it.
  • Introduce means to split doc and diverge it in different collections.
  • Introduce means to create doc in multiple collections (via GQL and other clients)
  • Handle the __type GQL field - it has an interfaces prop that needs to return set of interfaces.
@AndrewSisley AndrewSisley added area/collections Related to the collections system area/schema Related to the schema system code quality Related to improving code quality feature New feature or request labels Nov 20, 2024
@AndrewSisley AndrewSisley added this to the DefraDB v0.15 milestone Nov 20, 2024
@AndrewSisley AndrewSisley self-assigned this Nov 20, 2024
@AndrewSisley AndrewSisley changed the title Add support for multiple collections from same schema [EPIC] Add support for multiple collections from same schema Nov 25, 2024
@AndrewSisley AndrewSisley removed this from the DefraDB v0.15 milestone Nov 26, 2024
@AndrewSisley
Copy link
Contributor Author

Do not work on this issue for now. We are probably removing schemas as a public concept in the medium term.

@AndrewSisley AndrewSisley removed their assignment Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/collections Related to the collections system area/schema Related to the schema system code quality Related to improving code quality feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant