ReleasesTWINSPHERE · CLOUD

twinsphere Cloud 1.27 highlight - AAS Query Language and the general AAS 3.1 support

The headline feature in twinsphere Cloud 1.27 is the twinsphere Server support for the AAS Query Language - a spec-compliant way to query across shells and submodels.


twinsphere Cloud 1.27 ships full AAS 3.1 conformance, an experimental SAP BNAC push target, and management API auditing. But the headline feature is the AAS Query Language.

AAS Query Language

Navigating deeply nested submodel structures with plain REST calls has always been tedious. Finding all shells where the Nameplate’s manufacturer name matches a specific value, or retrieving Technical Data properties above a certain threshold, required multiple API calls and client-side filtering. With the AAS Query Language, this becomes a single request.

The query language is defined in IDTA-01002-3 v3.1.1 and is now fully supported by the twinsphere Server in twinsphere Cloud 1.27.

What it supports

  • Query endpoints for shells and submodels: POST /query/shells and POST /query/submodels
  • Cross-entity queries: query shells by properties of their submodels, bridging $aas and $sm roots in a single expression.
  • Full operator support: all comparison operators ($eq, $ne, $gt, $lt, $ge, $le), string operations ($contains, $starts-with, $ends-with, $regex), logical combinators ($and, $or, $not), type casts ($numCast, $boolCast, $dateTimeCast, $strCast), datetime extraction ($dayOfWeek, $month, $year), and the $match operator for scoping predicates to the same collection entry.
  • All scoping options (like idShortPath, semanticId, etc.)

Support for queries against concept descriptions and additional entity types is planned for upcoming releases.

Preliminary performance testing

We benchmarked the twinsphere Server’s query language implementation to validate latency across all query patterns.

Test setup

Tool StressForge (internal twinsphere load testing framework)
Test system Apple M4 Pro 48 GB
Retrieval Select mode - id only
Dataset 12.000 shells, 100.000 submodels (~50 kB each)
Network Single machine, no virtualization, no Docker, no network lag. Real-world deployments would add 20-100 ms

Submodel queries

Scenario What it does p95
Semantic ID equality Find submodels by semantic ID + element semantic ID 12.33 ms
Exact string match $match on article number by semantic ID and value 4.34 ms
DateTime range Nameplates manufactured within the last year 33.53 ms
Recent datetime Nameplates manufactured in the last 14 days 9.16 ms
Serial + date $match on serial number AND date of manufacture 7.74 ms
Cross-submodel OR $or across TechnicalData and Nameplate submodels 10.46 ms
Complex AND + NOT Serial + date match with $not excluding a submodel type 5.90 ms
NOT with match Article number match with $not excluding a semantic ID 4.97 ms

Shell queries (cross-entity)

Scenario What it does p95
Asset kind filter Shells where assetKind = Instance 3.90 ms
Cross-entity Shells with assetKind = Instance AND a TechnicalData submodel 12.62 ms
Cross-entity complex Shells by asset kind + serial number match + date range across submodels 16.28 ms

Most queries complete well under 50 ms at p95.

What is p95? The 95th percentile latency means that 95 out of 100 requests complete within this time or faster. Unlike averages, p95 captures the experience of the slowest realistic requests, making it a more honest measure of real-world performance.

The best part: write performance is not affected at all. We maintain a constant sub-100 ms write latency for an average 50 kB submodel, regardless of query load.

Example: serial + date submodel query (7.74 ms p95)

Find submodels where the serial number and date of manufacture both match specific values:

{
  "$select": "id",
  "$condition": {"$and": [
    {"$match": [
      {"$eq": [{"$field": "$sme#semanticId"}, {"$strVal": "0173-1#02-AAR972#002"}]},
      {"$eq": [{"$field": "$sme#value"}, {"$dateTimeVal": "2025-06-01T00:00:00Z"}]}
    ]},
    {"$match": [
      {"$eq": [{"$field": "$sme#semanticId"}, {"$strVal": "0173-1#02-AAM556#002"}]},
      {"$eq": [{"$field": "$sme#value"}, {"$strVal": "SN-12345"}]}
    ]}
  ]}
}

Example: cross-entity complex shell query (16.28 ms p95)

Find shells where asset kind is “Instance”, the serial number matches a specific value, and the date of manufacture is after a given date — spanning across the shell’s submodels:

{
  "$select": "id",
  "$condition": {"$and": [
    {"$eq": [{"$field": "$aas#assetInformation.assetKind"}, {"$strVal": "Instance"}]},
    {"$match": [
      {"$eq": [{"$field": "$sme#semanticId"}, {"$strVal": "0173-1#02-AAM556#002"}]},
      {"$eq": [{"$field": "$sme#value"}, {"$strVal": "SN-12345"}]}
    ]},
    {"$match": [
      {"$eq": [{"$field": "$sme#semanticId"}, {"$strVal": "0173-1#02-AAR972#002"}]},
      {"$gt": [{"$field": "$sme#value"}, {"$dateTimeVal": "2025-06-01T00:00:00Z"}]}
    ]}
  ]}
}

What else shipped

twinsphere Cloud 1.27 also includes full AAS 3.1 metamodel and API conformance (IDTA-01001, IDTA-01002), an experimental push target for SAP Business Network Asset Collaboration (BNAC), and a management API audit trail for tracking security-relevant operations across organizations.

For the complete list of changes, see the full release notes.