-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #413 from catenax-ng/main
Merge from CatenaX
- Loading branch information
Showing
126 changed files
with
5,835 additions
and
4,464 deletions.
There are no files selected for viewing
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
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
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
55 changes: 55 additions & 0 deletions
55
...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,55 @@ | ||
# \[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/ | ||
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 |
Oops, something went wrong.