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

@SepidehAlassi SepidehAlassi commented Apr 14, 2021

resolves DSP-1528

SepidehAlassi added 25 commits 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 requested a review from benjamingeer Apr 29, 2021
@SepidehAlassi SepidehAlassi marked this pull request as ready for review Apr 29, 2021
Copy link
Contributor

@benjamingeer benjamingeer left a comment

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

@SepidehAlassi
Copy link
Contributor Author

@SepidehAlassi SepidehAlassi commented May 3, 2021

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
Contributor

@benjamingeer benjamingeer left a comment

This looks good now, thanks very much!

@SepidehAlassi SepidehAlassi merged commit 84f7c14 into main May 3, 2021
11 checks passed
11 checks passed
@github-actions
Build Everything
Details
@github-actions
Prepare next release
Details
@github-actions
Test client-test-data
Details
@github-actions
API Unit Tests
Details
@github-actions
API E2E Tests
Details
@github-actions
API Integration Tests
Details
@github-actions
Upgrade Integration Tests
Details
@github-actions
Docs Build Test
Details
@github-actions
Publish (on release only)
Details
@github-actions
Deploy docs (on release only)
Details
@github-actions
Google chat notification about release and published version
Details
@SepidehAlassi SepidehAlassi deleted the wip/DSP-1528-getResourcesOfProjectOrderedByDate branch May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants