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

EDC client handle multiple Digital Twin Registries and Digital Twins #395

Closed
dsmf opened this issue Jan 30, 2024 · 2 comments
Closed

EDC client handle multiple Digital Twin Registries and Digital Twins #395

dsmf opened this issue Jan 30, 2024 · 2 comments
Assignees
Labels
hardening measurements to increase resiliency spill_over Issues which are not finished yet

Comments

@dsmf
Copy link
Contributor

dsmf commented Jan 30, 2024

As User,
I want that the EDC client handles multiple DTRs as described in the concept,
so that we consider all data available by a data provider.

Hints / Details

This story is meant to implement the remaining scenarios from #214, because #214 turns out to be much more complex than estimated. Splitting #214 is necessary because another story in the sprint (#354) depends on the scenarios already implemented in #214.

Remaining scenarios:

  1. EDC with multiple DTRs (see EdcSubmodelClientImpl: the contractNegotiationService.negotiate is executed only for one catalogItem at the moment, see findFirst)
  2. Multiple EDCs with multiple DTRs (see EdcSubmodelClientImpl: the contractNegotiationService.negotiate is executed only for one catalogItem at the moment, see findFirst)
  3. Special scenario: Same DT in multiple DTRs

Concept:
https://github.com/eclipse-tractusx/item-relationship-service/blob/main/docs/concept/TRI-1576-Handling-of-assets-multiple-dtrs/Discovery-process-DTR.md

Outcome / Acceptance Criteria

Outcome

  • ...

Acceptance Criteria

  • The remaining scenarios described above are implemented

Out of Scope

  • ...
@dsmf dsmf added this to IRS Jan 30, 2024
@dsmf dsmf moved this to backlog in IRS Jan 30, 2024
@dsmf dsmf changed the title EDC client handle multiple DTRs and DTs EDC client handle multiple Digital Twin Registries and Digital Twins Jan 30, 2024
@jzbmw jzbmw added the hardening measurements to increase resiliency label Jan 31, 2024
@dsmf
Copy link
Contributor Author

dsmf commented Feb 2, 2024

  • Updated documentation

    • Added detail diagrams for the scenarios under src/docs/arc42/cross-cutting incl. code references as code comments
    • Improved glossary
      • Added entries for CatalogItem, Contract Offer, Shell
      • Added explanation for DT in glossary
    • Added code comments for better comprehensibility and for making mapping to documentation easier
      • in DigitalTwinDelegate#process findFirst
      • in DecentralDigitlTwinRegistryService#mapToShellId
      • in the detail diagrams
  • Implementation and test

    • getEndpointReferencesForAsset in EdcEndpointReferenceRetriever and EdcSubmodelFacade return List<CompletableFuture<EndpointDataReference>> now instead of one EndpointDataReference
      • correspondingly queries all DTRs now instead of first one only (see EdcSubmodelClientImpl.getEndpointReferencesForAsset)
      • this included required change in exception handling
      • other related places in call hierarchy adjusted correspondingly
      • tests adjusted correspondingly
    • DecentralDigitlTwinRegistryServiceTest#FetchShellsTests#whenInterruptedExceptionOccurs checks that current thread interrupted now
    • DecentralDigitalTwinRegistryServiceWiremockTest: Added tests that cover main part of the scenarios
    • Fixed incomplete abstraction from cache implementation which resulted in superfluous dependency and hard to read code
      • EdcSubmodelClientImpl accessed cache for EndpointDataReference both via EndpointDataReferenceCacheService and EndpointDataReferenceStorage previously. Now the cache is only accessed via EndpointDataReferenceCacheService both for read and write. This included changing some test setup:
        • Fixed test setup in SubmodelFacadeWiremockTest
        • Fixed test setup in EdcSubmodelClientTest
      • In this context we discovered that there are no timeouts for some future.get calls which can lead to hanging jobs and increasing resource consumption. Created PBI for this: Missing timeouts can lead to hanging clients and ressource exhaustion #448

Pull Request 775 (Closed in favor of PR to eclipse-tractusx below)

Pull Request to eclipse-tractusx

@dsmf
Copy link
Contributor Author

dsmf commented Mar 4, 2024

Ready for PO-Review @jzbmw

@dsmf dsmf assigned jzbmw and unassigned dsmf and ds-jhartmann Mar 4, 2024
@jzbmw jzbmw closed this as completed Mar 4, 2024
@jzbmw jzbmw moved this from review to done in IRS Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hardening measurements to increase resiliency spill_over Issues which are not finished yet
Projects
Status: done
Development

No branches or pull requests

4 participants