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

feat(api-v2): Return events describing version history of resources and values of a project ordered by data (DSP-1528) #1844

Merged
merged 36 commits into from May 3, 2021

Conversation

SepidehAlassi
Copy link
Contributor

resolves DSP-1528

@SepidehAlassi SepidehAlassi self-assigned this Apr 14, 2021
@SepidehAlassi SepidehAlassi added API/V2 enhancement improve existing code or new feature labels Apr 14, 2021
@SepidehAlassi SepidehAlassi changed the title feat(api-v2): Get all resources of a project with version history ordered by data (DSP-1528) feat(api-v2): Get all resources of a project with full version history ordered by data (DSP-1528) Apr 29, 2021
@SepidehAlassi SepidehAlassi changed the title feat(api-v2): Get all resources of a project with full version history ordered by data (DSP-1528) feat(api-v2): Return events describing version history of resources and values of a project ordered by data (DSP-1528) Apr 29, 2021
@SepidehAlassi SepidehAlassi marked this pull request as ready for review April 29, 2021 10:09
Copy link

@benjamingeer benjamingeer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is the performance if you get the full history of a project with a lot of data?

@SepidehAlassi
Copy link
Contributor Author

How is the performance if you get the full history of a project with a lot of data?
For anything project that has only 52 resources, it returns 88 events in 50 seconds. Probably if a project had thousands of resources, it will take pretty long and crash as soon as the time threshold is reached. The task in DSP-1528 was to write a route that gets project IRIs and returns the entire history of resources as events, and this PR does that. The performance issue would be something that definitely will come up.

I have already thought about this issue though. I have already written the responder, getResourceHistoryEvents, that gets the IRI of a resource and returns history events for it. I could change it a bit and add a route for it, i.e. GET request that returns the events for a given resource IRI. There is also this template to get all resources of a project. I could also add a route, a GET request that returns a list of resource IRIs for a given project IRI. Then the DSP tools could first use the latter route to get the resource IRIs and then could iterate over them and call the first route to get the events of that each resource and store them somewhere.

Copy link

@benjamingeer benjamingeer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good now, thanks very much!

@SepidehAlassi SepidehAlassi merged commit 84f7c14 into main May 3, 2021
@SepidehAlassi SepidehAlassi deleted the wip/DSP-1528-getResourcesOfProjectOrderedByDate branch May 3, 2021 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API/V2 enhancement improve existing code or new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants