forked from eclipse-tractusx/item-relationship-service
-
Notifications
You must be signed in to change notification settings - Fork 0
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
COCNEPT: #207 prepare concept for redisign metrics used in summary inside job response #748
Merged
ds-psosnowski
merged 3 commits into
main
from
chore/#207-redisign-metrics-used-in-summary-inside-job-response
Feb 6, 2024
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
...nside-job-response/#207-redisign-metrics-used-in-summary-inside-job-response.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# \[Concept\] \[#207\] Redesign metrics used in summary inside Job Response | ||
|
||
| Key | Value | | ||
|---------------|-------------------------------------------------------------------------------| | ||
| Creation date | 31.01.2024 | | ||
| Ticket Id | #207 https://github.com/eclipse-tractusx/item-relationship-service/issues/207 | | ||
| State | DRAFT | | ||
|
||
## Table of Contents | ||
|
||
1. [Overview](#overview) | ||
2. [Problem Statement](#problem-statement) | ||
3. [Concept](#concept) | ||
|
||
## Overview | ||
Currently summary section of a JobResponse contains information about asyncFetchedItems which covers DigitalTwin Registry requests responses and Submodel Server requests responses. | ||
Results are shown together for both of mentioned responses: | ||
``` | ||
"summary": { | ||
"asyncFetchedItems": { | ||
"completed": 1, | ||
"failed": 0, | ||
"running": 0 | ||
} | ||
} | ||
``` | ||
|
||
## Problem Statement | ||
We would like to have separate summary response for DigitalTwin Registry requests and Submodel Server. | ||
Also there should be information about actual tree depth for given JobResponse. | ||
|
||
## Concept | ||
This diagram shows current flow: | ||
![alt text](https://eclipse-tractusx.github.io/item-relationship-service/docs/arc42/architecture-constraints/execute-job.svg) | ||
|
||
Steps number 4 and 6 are respectively requesting AAS and Submodel. Then both are stored in BlobStore by method `addTransferProcess` in `JobStore`. | ||
They should be distinguished by the type, so when step 12 (complete) is executed we can query the store for completed, failed and running items and add them to the response by type. | ||
``` | ||
"summary": { | ||
"asyncFetchedItemsRegistry": { | ||
"running": 0, | ||
"completed": 1, | ||
"failed": 1 | ||
}, | ||
"asyncFetchedItemsSubmodelServer": { | ||
"running": 0, | ||
"completed": 1, | ||
"failed": 1 | ||
} | ||
}, | ||
``` | ||
Tree is stored as list of nodes in list of Relationships as filed `private List<Relationship> relationships;` in `ItemContainer`. | ||
Tree is assebmled in class `ItemTreesAssembler` in method `retrieveItemGraph`. | ||
We should get the depth of the tree and add it to the response. Consider using https://www.geeksforgeeks.org/depth-n-ary-tree/ | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Important to note that determining the depth of a running job like this is only suitable as some sort of progress bar. The actual "completion by depth" criteria still has to be evaluated in the DigitalTwinDelegate and needs to be done independently for every branch of the tree