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

Streamline graph DB queries #311

Open
jsstevenson opened this issue Mar 28, 2024 · 4 comments
Open

Streamline graph DB queries #311

jsstevenson opened this issue Mar 28, 2024 · 4 comments
Assignees
Labels
priority:low Low priority technical debt A feature/requirement implemented in a sub-optimal way & must be re-written. Contrast to "cleanup"

Comments

@jsstevenson
Copy link
Member

jsstevenson commented Mar 28, 2024

It's been true for a while now that some of our core API endpoints require multiple ordered requests to the graph DB to succeed. For example, searching for a study first retrieves that study and its relationships, but can then spur further calls for certain kinds of variations and therapies. This is totally reasonable for now but as requirements and the data models begin to settle, we should be aiming to condense those protocols into a single DB call eventually.

@jsstevenson jsstevenson added priority:medium Medium priority technical debt A feature/requirement implemented in a sub-optimal way & must be re-written. Contrast to "cleanup" labels Mar 28, 2024
@jsstevenson
Copy link
Member Author

It might also be worth looking at whether some queries should be managed transactions vs the new driver.execute_query API https://neo4j.com/docs/python-manual/current/query-simple/

@jsstevenson
Copy link
Member Author

get_nested_study makes a LOT of queries. Ideally this would be one. At minimum, rather than iterating through relations, there should be a single structured result.

@jsstevenson
Copy link
Member Author

I think we made the decision to table this one for a while until some of the data models are more solidified -- the changes that I have in mind would be quite brittle to schema updates.

@korikuzma
Copy link
Member

@jsstevenson I plan on updating the normalizers/ga4gh.vrs and then pulling in cat-vrs/va-spec python model changes.

@korikuzma korikuzma added priority:low Low priority and removed priority:medium Medium priority labels Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:low Low priority technical debt A feature/requirement implemented in a sub-optimal way & must be re-written. Contrast to "cleanup"
Projects
None yet
Development

No branches or pull requests

2 participants