Skip to content

Feature/digital twin registry#846

Closed
FaheemBhatti wants to merge 21 commits into
eclipse-basyx:mainfrom
Smart-Systems-Hub:feature/digital-twin-registry
Closed

Feature/digital twin registry#846
FaheemBhatti wants to merge 21 commits into
eclipse-basyx:mainfrom
Smart-Systems-Hub:feature/digital-twin-registry

Conversation

@FaheemBhatti

Copy link
Copy Markdown
Contributor

Pull Request Template

Description of Changes

This pull request introduces the BaSyx Digital Twin Registry module.
The module combines the capabilities of AASRegistry and AASDiscovery into a single component.
Through the /shell-description endpoint, the registry dynamically creates both an AssetAdministrationShellDescriptor and an aasDiscoveryDocumentEntity.

This integration ensures that asset shells are not only registered but also immediately discoverable, streamlining workflows that would otherwise require separate discovery and retrieval steps.


Related Issue

N/A


BaSyx Configuration for Testing

The Digital Twin Registry supports multiple profiles with different storage backends.
Testing requires configuring environment variables and selecting the appropriate profile.

Configuration Files

  • application.yml — Base configuration
  • application-InMemory.yml — In-memory storage profile
  • application-MongoDB.yml — MongoDB storage profile

Base Configuration (application.yml)

Environment Variable Default Value Description
SPRING_PROFILE MongoDB Active Spring profile (InMemory or MongoDB)
LOGGING_LEVEL INFO Logging level for root and BaSyx components

Server

  • server.port = 8081

CORS

  • basyx.cors.allowed-methods = GET,POST,PATCH,DELETE,PUT,OPTIONS,HEAD
  • basyx.cors.allowed-origins = *

Management Endpoints

  • management.endpoints.web.exposure.include = health,metrics,mappings

SpringDoc/Swagger

  • springdoc.api-docs.enabled = true
  • springdoc.swagger-ui.enabled = true
  • springdoc.swagger-ui.path = /swagger-ui.html
  • springdoc.swagger-ui.csrf.enabled = false

InMemory Profile

  • No additional environment variables required
  • basyx.backend=InMemory, registry.type=InMemory, registry.discovery.enabled=true
  • Excludes MongoDB auto-configuration

MongoDB Profile

Environment Variable Default Value Description
AUTHENTICATION_DATABASE aasregistry MongoDB authentication database name
DATABASE_HOST localhost MongoDB host address
DATABASE_PORT localhost (should be numeric) MongoDB port
DATABASE_USERNAME smartsystemhub MongoDB username
DATABASE_PASSWORD smartsystemshubdatabaseforfactoryX MongoDB password
  • basyx.backend=MongoDB, registry.type=MongoDB, registry.discovery.enabled=true
  • basyx.aasdiscoveryservice.mongodb.collectionName=aasregistry

AAS Files Used for Testing

No specific AAS files are included in this pull request.
For testing purposes, any valid AASDescriptor JSON files may be used to verify that:

  1. Registration at /shell-description creates both the descriptor and discovery document.
  2. Discovery services resolve the registered AAS.

Additional Information

  • Module Structure:

    • Introduced as a new module in the BaSyx SDK: digitaltwinregistry.
    • Implements a decorator pattern around the existing API.
    • Uses a delegate for ShellDescriptorsApiDelegate to integrate registry + discovery logic.
  • Key Benefits:

    • Combines registry and discovery into a unified workflow.
    • Ensures immediate discoverability of AAS upon registration.
    • Modular and maintainable, can be enabled/disabled independently.
    • Seamlessly integrates with existing BaSyx storage backends.
  • Challenges Addressed:

    • Simplifies the multi-step “register then discover” process into a single API call.
    • Aligns with BaSyx goals for scalable and flexible digital twin management.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant