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

Remove support for global models #132

Open
2 tasks
augustearth opened this issue Oct 29, 2024 · 0 comments
Open
2 tasks

Remove support for global models #132

augustearth opened this issue Oct 29, 2024 · 0 comments

Comments

@augustearth
Copy link
Collaborator

The 'globel' model thing was sorta half baked from the beginning. The idea was that one could apply constraints to all elements (vertices and edges) that have a given label. For example, say two models, M1 and M2, have the concept of a person. Vertices in the graph would have the label 'Person'. A global model might require that all vertices in the graph with the label person, whether they were created through M1 or M2, might be forced to require a name property. Seems like something one might want to do. However, in practice, I have never used it. The whole issue of having element labels be the same though the element is modeled in two different places is thorny.

The motivation for removing this functionality is JanusGraph, which has some pretty cool schema features. Property, edge, and vertex labels can be explicitly modeled and used in indexes. In order for the machinery to work, labels should be unique. They are not unique in current Carnival. M1.PERSON and M2.PERSON will have the same label. Similarly, M1.NAME (a name property) and M2.NAME would have the same property key. In order to take advantage of underlying database indexing, distinct property keys and element labels are needed.

  • Incorporate something unique from the model class in element labels
  • Incorporate something unique from the model class in property keys
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

1 participant