-
Notifications
You must be signed in to change notification settings - Fork 0
README
This document describes the migration from BaSyx Java (MongoDB-backed) to BaSyx Go (PostgreSQL-backed).
BaSyx Go enforces stricter AAS v3 compliance than the Java implementation. Moving to Go provides:
- Better performance and lower resource usage
- Stricter AAS Metamodel v3 validation
- PostgreSQL as a more conventional database backend
- Separate AAS Repository, Submodel Repository, and Discovery services
MongoDB ← aas-environment (combined AAS + Submodel) ← mnestix-aas-generator
aas-discovery ↑
PostgreSQL ← basyx-configuration (one-shot schema init)
aas-environment-go (unified AAS + Submodel + CD + registries + discovery) ← mnestix-aas-generator
MnestixCore/RepoProxyClient/RepoProxyClient.cs now applies NormalizeJsonForRepository() to all outbound JSON payloads before sending to BaSyx. This handles the stricter v3 compliance at runtime:
| Rule | Description |
|---|---|
| Strip nulls | Remove null-valued properties recursively |
Remove dataSpecification / hasDataSpecification
|
Deprecated v2 fields |
Strip kind from non-Submodel elements |
Only Submodel-level kind is valid in v3 |
Strip parent back-references |
v2 field not in v3 |
Strip local, idType, index
|
v2 Key fields |
Strip ordered, allowDuplicates
|
v2 collection fields |
Normalize valueType
|
Canonical XSD case (e.g., xs:Date → xs:date) |
Inject valueType: xs:string
|
On qualifiers missing it |
Coerce Property.value
|
Non-string values (numbers/booleans) → string |
Additionally, all HTTP methods switched from RestSharp's typed methods (.PostAsync(), .PutAsync()) to .ExecuteAsync() for better error diagnostics.
All 27+ embedded JSON resources under RequiredShellsResources/ were cleaned up:
- UTF-8 BOM removed
- v2 fields stripped (see table above)
-
"type": "ExternalReference"injected on References missing it - Numeric
Property.valuecoerced to strings - Single-object
MultiLanguageProperty.valuewrapped in arrays
Use fix_resources.py to apply these same fixes to any additional resources.
Added tolerance for empty-string value fields on Property elements. BaSyx Go strips empty-string value fields on round-trip, so no empty-string placeholder is injected — the field is simply absent when no data is mapped.
The AasInheritanceService and the AasRelationshipController (GET /api/v2/AasRelationship/GetDerivedFrom) have been removed entirely. BaSyx Go is expected to expose derivedFrom filtering natively in a future release.
- MongoDB replaced with PostgreSQL 16 (
postgres:16-alpine) - BaSyx Java services replaced with the unified Go environment (all
1.0.0-rc.5):-
eclipsebasyx/aasenvironment-go(port 8081) — unified AAS, Submodel, Concept Description, registries, and discovery -
eclipsebasyx/basyxconfigurationservice-go— one-shot PostgreSQL schema initialization
-
- Health checks updated (
/bin/healthprobe-based instead of curl/actuator)
- Removed
libssl1.1installation block (was only needed for EphemeralMongo tests) - Tests now run on all architectures
- Removed
EphemeralMongo6test package
-
fix_resources.py <directory>— Rewrite legacy AAS v2 JSON resources for v3 compliance -
verify_resources.py <directory> <basyx-url>— Validate resources against a live BaSyx Go repository
-
dotnet build— Compilation succeeds -
dotnet test— All tests pass -
docker compose -f docker-compose/compose.dev.go.yml up— All Go services start healthy - POST AAS + submodel through API → round-trips correctly