forked from eclipse-tractusx/item-relationship-service
-
Notifications
You must be signed in to change notification settings - Fork 0
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 #711 from catenax-ng/feat/214-Dataspace-Discovery-…
…Service-handle-multiple-EDC-Urls-received-for-BPN Feat/214 dataspace discovery service handle multiple edc urls received for bpn
- Loading branch information
Showing
27 changed files
with
1,439 additions
and
486 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
28 changes: 28 additions & 0 deletions
28
docs/src/docs/arc42/cross-cutting/discovery-DTR--EDC-with-multiple-DTRs.puml
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,28 @@ | ||
@startuml | ||
participant IRS | ||
participant DiscoveryService | ||
participant "EDC Provider" as EDCProvider | ||
participant "DTR 1" as DTR1 | ||
participant "DTR 2" as DTR2 | ||
|
||
IRS ->> DiscoveryService: Get EDCs for BPN | ||
DiscoveryService ->> IRS: Return list of 1 EDC | ||
IRS ->> EDCProvider: Query for DTR contract offer | ||
EDCProvider ->> IRS: 2 DTR contract offers | ||
|
||
par | ||
group Query DTR 1 | ||
IRS ->> EDCProvider: Negotiate contract | ||
IRS ->> DTR1: Query for DT | ||
DTR1 ->> IRS: no DT | ||
end | ||
|
||
else | ||
|
||
group Query DTR 2 | ||
IRS ->> EDCProvider: Negotiate contract | ||
IRS ->> DTR2: Query for DT | ||
DTR2 ->> IRS: DT | ||
end | ||
end | ||
@enduml |
8 changes: 8 additions & 0 deletions
8
...c42/cross-cutting/discovery-DTR--multiple-DTs-with-the-same-globalAssedId-in-one-DTR.puml
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,8 @@ | ||
@startuml | ||
actor IRS | ||
participant DTR | ||
|
||
IRS -> DTR: /query for globalAssetId | ||
DTR -> IRS: return list of two results | ||
IRS -> IRS: use first | ||
@enduml |
38 changes: 38 additions & 0 deletions
38
docs/src/docs/arc42/cross-cutting/discovery-DTR--multiple-EDCs-with-multiple-DTRs.puml
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,38 @@ | ||
@startuml | ||
participant IRS | ||
participant DiscoveryService | ||
participant "EDC Provider 1" as EDCProvider1 | ||
participant "EDC Provider 2" as EDCProvider2 | ||
participant "EDC Provider 3" as EDCProvider3 | ||
participant "DTR" as DTR | ||
|
||
IRS ->> DiscoveryService: Get EDCs for BPN | ||
DiscoveryService ->> IRS: Return list of 3 EDCs | ||
|
||
par | ||
group CatalogRequestEDC1 | ||
IRS ->> EDCProvider1: Query for DTR contract offer | ||
EDCProvider1 ->> IRS: No offer | ||
end | ||
|
||
else | ||
|
||
group CatalogRequestEDC2 | ||
IRS ->> EDCProvider2: Query for DTR contract offer | ||
EDCProvider2 ->> IRS: DTR contract offer | ||
IRS -> EDCProvider2: Negotiate contract | ||
IRS ->> DTR: Query for DT | ||
DTR ->> IRS: DT | ||
end | ||
|
||
else | ||
|
||
group CatalogRequestEDC3 | ||
IRS ->> EDCProvider3: Query for DTR contract offer | ||
EDCProvider3 ->> IRS: DTR contract offer | ||
IRS -> EDCProvider3: Negotiate contract | ||
IRS ->> DTR: Query for DT | ||
DTR ->> IRS: No DT | ||
end | ||
end | ||
@enduml |
34 changes: 34 additions & 0 deletions
34
docs/src/docs/arc42/cross-cutting/discovery-DTR--multiple-EDCs-with-no-DTRs.puml
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,34 @@ | ||
@startuml | ||
actor IRS | ||
actor "Discovery Service" as DiscoveryService | ||
|
||
participant "EDC 1" as EDCProvider1 | ||
participant "EDC 2" as EDCProvider2 | ||
participant "EDC 3" as EDCProvider3 | ||
|
||
IRS -> DiscoveryService: Get EDCs for BPN | ||
DiscoveryService -> IRS: Return list of 3 EDCs | ||
|
||
par | ||
group Catalog Request to EDC 1 | ||
IRS -> EDCProvider1: Query for DTR contract offer | ||
EDCProvider1 -> IRS: No offer | ||
end | ||
|
||
else | ||
|
||
group Catalog Request to EDC 2 | ||
IRS -> EDCProvider2: Query for DTR contract offer | ||
EDCProvider2 -> IRS: No offer | ||
end | ||
|
||
else | ||
|
||
group Catalog Request to EDC 3 | ||
IRS -> EDCProvider3: Query for DTR contract offer | ||
EDCProvider3 -> IRS: No offer | ||
end | ||
end | ||
|
||
IRS -> IRS: Tombstone | ||
@enduml |
35 changes: 35 additions & 0 deletions
35
docs/src/docs/arc42/cross-cutting/discovery-DTR--multiple-EDCs-with-one-DTR.puml
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,35 @@ | ||
@startuml | ||
participant IRS | ||
participant DiscoveryService | ||
participant "EDC Provider 1" as EDCProvider1 | ||
participant "EDC Provider 2" as EDCProvider2 | ||
participant "EDC Provider 3" as EDCProvider3 | ||
participant DTR | ||
|
||
IRS ->> DiscoveryService: Get EDCs for BPN | ||
DiscoveryService ->> IRS: Return list of 3 EDCs | ||
|
||
par | ||
group CatalogRequestEDC1 | ||
IRS ->> EDCProvider1: Query for DTR contract offer | ||
EDCProvider1 ->> IRS: No offer | ||
end | ||
|
||
else | ||
|
||
group CatalogRequestEDC2 | ||
IRS ->> EDCProvider2: Query for DTR contract offer | ||
EDCProvider2 ->> IRS: No offer | ||
end | ||
|
||
else | ||
|
||
group CatalogRequestEDC3 | ||
IRS ->> EDCProvider3: Query for DTR contract offer | ||
EDCProvider3 ->> IRS: DTR contract offer | ||
IRS -> EDCProvider3: Negotiate contract | ||
IRS ->> DTR: Query for DT | ||
DTR ->> IRS: DT | ||
end | ||
end | ||
@enduml |
14 changes: 14 additions & 0 deletions
14
docs/src/docs/arc42/cross-cutting/discovery-DTR--one-EDC-with-one-DTR.puml
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,14 @@ | ||
@startuml | ||
participant IRS | ||
participant DiscoveryService | ||
participant "EDC Provider 3" as EDCProvider3 | ||
participant DTR | ||
|
||
IRS ->> DiscoveryService: Get EDCs for BPN | ||
DiscoveryService ->> IRS: Return list of 1 EDC | ||
IRS ->> EDCProvider3: Query for DTR contract offer | ||
EDCProvider3 ->> IRS: DTR contract offer | ||
IRS -> EDCProvider3: Negotiate contract | ||
IRS ->> DTR: Query for DT | ||
DTR ->> IRS: DT | ||
@enduml |
67 changes: 67 additions & 0 deletions
67
docs/src/docs/arc42/cross-cutting/discovery-process-dtr.adoc
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,67 @@ | ||
The Dataspace Discovery Service handles multiple EDC-Urls received for BPN. | ||
This applies to the following scenarios. | ||
|
||
__Please note that the expression "the first result" in the subsequent sections means the first successful answer.__ | ||
|
||
==== Scenario 1: EDC with multiple DTRs | ||
|
||
IRS queries all DTRs for the globalAssetId and will take the first result it gets. | ||
If none of the DTRs return a result, IRS will create a tombstone. | ||
|
||
[plantuml,target=discovery-DTR--EDC-with-multiple-DTRs,format=svg] | ||
.... | ||
include::discovery-DTR--EDC-with-multiple-DTRs.puml[] | ||
.... | ||
|
||
==== Scenario 2: Multiple EDCs with one DTR | ||
|
||
IRS starts a contract negotiation for all registry contract offers in parallel and queries the DTRs for all successful negotiations. | ||
The first registry which responds with a DT will be the one used by IRS. | ||
|
||
[plantuml,target=discovery-DTR--multiple-EDCs-with-one-DTR,format=svg] | ||
.... | ||
include::discovery-DTR--multiple-EDCs-with-one-DTR.puml[] | ||
.... | ||
|
||
==== Scenario 3: One EDC with one DTR | ||
|
||
Only one EDC found for BPN and the catalog only contains one offer for the DTR. | ||
IRS will use this registry and will create a tombstone if no DT could be found for the globalAssetId. | ||
|
||
[plantuml,target=discovery-DTR--one-EDC-with-one-DTR,format=svg] | ||
.... | ||
include::discovery-DTR--one-EDC-with-one-DTR.puml[] | ||
.... | ||
|
||
==== Scenario 4: Multiple EDCs with multiple DTRs | ||
|
||
IRS starts a contract negotiation for all the registry offers. | ||
|
||
[plantuml,target=discovery-DTR--multiple-EDCs-with-multiple-DTRs,format=svg] | ||
.... | ||
include::discovery-DTR--multiple-EDCs-with-multiple-DTRs.puml[] | ||
.... | ||
|
||
==== Scenario 5: Multiple EDCs with no DTRs | ||
|
||
IRS starts a contract negotiation for all the registry offers and creates a tombstone since no DTR could be discovered. | ||
|
||
[plantuml,target=discovery-DTR--multiple-EDCs-with-no-DTRs,format=svg] | ||
.... | ||
include::discovery-DTR--multiple-EDCs-with-no-DTRs.puml[] | ||
.... | ||
|
||
==== Special Scenario: Same DT in multiple DTRs | ||
|
||
IRS will use all registries to query for the globalAssetId and takes the first result which is returned. | ||
If no DT could be found in any of the DTRs, IRS will create a tombstone. | ||
|
||
==== Special Scenario: Multiple DTs (with the same globalAssetId) in one DTR | ||
|
||
IRS uses the `/query` endpoint of the DTR to get the DT id based on the globalAssetId. | ||
If more than one id is present for a globalAssetId, IRS will use the first of the list. | ||
|
||
[plantuml,target=discovery-DTR--multiple-DTs-with-the-same-globalAssedId-in-one-DTR,format=svg] | ||
.... | ||
include::discovery-DTR--multiple-DTs-with-the-same-globalAssedId-in-one-DTR.puml[] | ||
.... |
Oops, something went wrong.