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/214 dataspace discovery service handle multiple edc urls received for bpn #711

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
f7f4f3b
feat(impl):[#214] parallel findEndpointDataForConnectors returning fa…
dsmf Dec 19, 2023
a4bb6d3
feat(impl):[#214] add FastestResultFinder to irs-common module
dsmf Dec 21, 2023
901c7db
feat(impl):[#214] add logging of warnings to ResultFinder
dsmf Dec 21, 2023
c1c524f
feat(impl):[#214] add irs-common dependencies to irs-edc-client and i…
dsmf Dec 21, 2023
a83f905
Merge branch 'main' into feat/214-Dataspace-Discovery-Service-handle-…
dsmf Dec 21, 2023
66987e3
feat(impl):[#214] improve ResultFinder code
dsmf Dec 22, 2023
8f56c4d
feat(impl):[#214] remove Optional from return type
dsmf Dec 22, 2023
26daa2a
feat(impl):[#214] group tests by method name via @Nested
dsmf Dec 22, 2023
a614f98
feat(impl):[#214] undo f7f4f3bee3a3cf563f2cad63f5b8602218c8ca6c
dsmf Dec 22, 2023
ac52203
Merge branch 'main' into feat/214-Dataspace-Discovery-Service-handle-…
dsmf Jan 8, 2024
f360043
feat(impl):[#214] Handle multiple EDC URLs in DecentralDigitalTwinReg…
dsmf Jan 9, 2024
25ec678
Merge remote-tracking branch 'origin/main' into feat/214-Dataspace-Di…
dsmf Jan 9, 2024
1f61dab
feat(impl):[#214] fix checkstyle and pmd warnings
dsmf Jan 9, 2024
5eb0f74
feat(impl):[#214] fix pmd warnings
dsmf Jan 9, 2024
3c98757
feat(imp):[#214] improve variable naming for better readability
dsmf Jan 15, 2024
e7a8fe2
feat(imp):[#214] use completedFuture(null) instead of supplyAsync(() …
dsmf Jan 15, 2024
eb9f18c
feat(imp):[#214] exception handling for ResultFinder when all fail
dsmf Jan 15, 2024
705ae6b
feat(imp):[#214] exception handling for ResultFinder when all fail
dsmf Jan 15, 2024
3624c7e
feat(imp):[#214] reduce complexity by extraction of code to methods
dsmf Jan 15, 2024
99d6bfb
feat(imp):[#214] parallelize edcSubmodelFacade.getEndpointReferenceFo…
dsmf Jan 15, 2024
8b20334
Merge remote-tracking branch 'origin/main' into feat/214-Dataspace-Di…
dsmf Jan 16, 2024
11abe44
feat(imp):[#214] correct typo
dsmf Jan 16, 2024
1d85a2e
feat(imp):[#214] update deps
dsmf Jan 16, 2024
edb56af
Merge remote-tracking branch 'origin/main' into feat/214-Dataspace-Di…
dsmf Jan 17, 2024
2219b3b
feat(imp):[#214] update CHANGELOG.md
dsmf Jan 17, 2024
6909a46
feat(imp):[#214] improve readability
dsmf Jan 18, 2024
981a706
feat(imp):[#214] fix license header
dsmf Jan 18, 2024
641dd67
feat(imp):[#214] fix license header
dsmf Jan 18, 2024
0d2942e
feat(imp):[#214] improve readability
dsmf Jan 18, 2024
d844e70
feat(imp):[#214] fix PMD warning
dsmf Jan 18, 2024
6a117dd
feat(imp):[#214] improve readability and add some logging
dsmf Jan 18, 2024
8137cd2
feat(imp):[#214] improve readability
dsmf Jan 18, 2024
f080d72
feat(imp):[#214] add some logging
dsmf Jan 18, 2024
18dd6ed
feat(imp):[#214] fix PMD warning
dsmf Jan 18, 2024
1eab989
feat(imp):[#214] update arc42 documentation
dsmf Jan 18, 2024
e3ebc1e
feat(imp):[#214] correct PlantUML diagrams
dsmf Jan 18, 2024
4b02479
feat(imp):[#214] refined arc42 documentation
dsmf Jan 18, 2024
8cb6954
feat(imp):[#214] convert diagram from #256 in arc42 documentation to …
dsmf Jan 18, 2024
3c50544
Merge branch 'main' into feat/214-Dataspace-Discovery-Service-handle-…
dsmf Jan 22, 2024
361ede9
Merge branch 'main' into feat/214-Dataspace-Discovery-Service-handle-…
dsmf Jan 23, 2024
40eba34
Merge branch 'main' into feat/214-Dataspace-Discovery-Service-handle-…
dsmf Jan 23, 2024
8032c80
Merge branch 'main' into feat/214-Dataspace-Discovery-Service-handle-…
dsmf Jan 23, 2024
efb20dd
feat(imp):[#214] fix license header and merge conflict compile problem
dsmf Jan 23, 2024
8dbff36
feat(imp):[#214] add some error logging
dsmf Jan 23, 2024
d51f6ab
feat(imp):[#214] debug logging for investigation on DEV
dsmf Jan 23, 2024
7a7324b
feat(imp):[#214] fix checkstyle warning
dsmf Jan 23, 2024
824d1d9
feat(imp):[#214] debug logging (to be removed/adapted after debugging)
dsmf Jan 24, 2024
6fb3b3a
Merge remote-tracking branch 'origin/main' into feat/214-Dataspace-Di…
dsmf Jan 24, 2024
e3bb440
feat(imp):[#214] add stop watches for analyzing performance
dsmf Jan 24, 2024
90995dd
feat(imp):[#214] catching any runtime exception to avoid hanging jobs
dsmf Jan 25, 2024
9a53cfd
Merge branch 'main' into feat/214-Dataspace-Discovery-Service-handle-…
dsmf Jan 26, 2024
672d797
feat(imp):[#214] improve exception handling
dsmf Jan 26, 2024
8aa4c4b
Merge branch 'main' into feat/214-Dataspace-Discovery-Service-handle-…
dsmf Jan 31, 2024
a6e4288
feat(imp):[#214] Cleanup
dsmf Jan 31, 2024
cb86a95
feat(imp):[#214] Update glossary
dsmf Jan 31, 2024
5a02803
feat(imp):[#214] Improve glossary
dsmf Jan 31, 2024
806dedb
feat(imp):[#214] Move logging to business classes and remove some deb…
dsmf Feb 1, 2024
f94838e
feat(imp):[#214] fix MD034 linting errors
dsmf Feb 1, 2024
b5e29e1
feat(imp):[#214] cleanup logging
dsmf Feb 1, 2024
e13eb7e
Merge remote-tracking branch 'origin/main' into feat/214-Dataspace-Di…
dsmf Feb 1, 2024
0cfba0f
feat(imp):[#214] improved variable naming and code comment
dsmf Feb 2, 2024
ae79585
feat(imp):[#214] remove superfluous log
dsmf Feb 2, 2024
b2684ac
Merge remote-tracking branch 'origin/main' into feat/214-Dataspace-Di…
dsmf Feb 2, 2024
b635caf
feat(imp):[#214] fix tests
dsmf Feb 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added Integration Tests for the entire IRS flow using stubbed responses of Discovery Service, Semantic Hub, EDC, Digital Twin Registry and BPDM Pool

### Changed

- Dataspace Discovery Service handles multiple EDC-Urls received for BPN now
- Updated license header to "Copyright (c) 2021,2024 Contributors to the Eclipse Foundation"
- Changed lookupGlobalAssetIds to lookupShellsByBPN, which provides full object.
- Suppressed CVE-2024-20932 from graal-sdk-21.2.0.jar because this is not applicable for IRS.
Expand Down
1 change: 0 additions & 1 deletion DEPENDENCIES
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ maven/mavencentral/net.minidev/accessors-smart/2.4.9, Apache-2.0, approved, #751
maven/mavencentral/net.minidev/json-smart/2.4.10, Apache-2.0, approved, #3288
maven/mavencentral/net.minidev/json-smart/2.4.11, Apache-2.0, approved, #3288
maven/mavencentral/net.sf.saxon/Saxon-HE/10.6, MPL-2.0 AND W3C, approved, #7945
maven/mavencentral/org.apache.commons/commons-compress/1.23.0, Apache-2.0 AND BSD-3-Clause, approved, #7506
maven/mavencentral/org.apache.commons/commons-compress/1.24.0, Apache-2.0 AND BSD-3-Clause AND bzip2-1.0.6 AND LicenseRef-Public-Domain, approved, #10368
maven/mavencentral/org.apache.commons/commons-lang3/3.12.0, Apache-2.0, approved, clearlydefined
maven/mavencentral/org.apache.commons/commons-pool2/2.11.1, Apache-2.0, approved, CQ23795
Expand Down
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
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
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
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
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
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 docs/src/docs/arc42/cross-cutting/discovery-process-dtr.adoc
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[]
....
Loading