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

Optimise: simplify file structure used for file_relation_data #88

Closed
chrisbc opened this issue Dec 9, 2021 · 1 comment
Closed

Optimise: simplify file structure used for file_relation_data #88

chrisbc opened this issue Dec 9, 2021 · 1 comment
Assignees

Comments

@chrisbc
Copy link
Member

chrisbc commented Dec 9, 2021

The current design has these relations saved independenty to unique object.json files. So, for every link we have:

  ObjectA.son  <-> Relationship.json <-> ObjectB.json
   - other props       - Role           - other props

this is a very flexible solution, supporting many-to-many relationships and also relationship properties (e.g ROLE) . The price is that the extra file read/writes make certain API operations overly slow and IO intensive.

Proposed:

 ObjectA.json                        <-> ObjectB.json
  - relatedTo [(objectID, Role)]         - relatedTo [(objectID, Role)] 
  - other props                        - other props

Snags:

  • as currently the Relationship object is a graphql Node, so what do we have that relies on the abilitiy to resolve Node id? If nothing then there's no client impact
  • old data will need to be migrated
  • now to test the stability and actual performance impacts of this change
@chrisbc
Copy link
Member Author

chrisbc commented Dec 9, 2021

suggested approach

  • FileRelation - remove id (it's no longer a Node) , find/fix impacted tests
  • remove node storage ops from data.FileRelationData class, migrate props into the related objects

fix tests, code review.
later .... see #91

@chrisbc chrisbc changed the title Optimise: simplify file structure used for thing_relation_data and file_relation_data Optimise: simplify file structure used for file_relation_data Dec 19, 2021
@chrisbc chrisbc closed this as completed Mar 23, 2022
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