Skip to content

Add Descriptor Registry working draft - #796

Open
marcschier wants to merge 28 commits into
xregistry:mainfrom
marcschier:marcschier-message-context-indirection
Open

marcschier wants to merge 28 commits into
xregistry:mainfrom
marcschier:marcschier-message-context-indirection

Conversation

@marcschier

@marcschier marcschier commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Related to xregistry/spec#792.

Define a reusable, metadata-only Descriptor Resource for identifying representations and shared processing context associated with assets, devices, actors, or multiple entities. The Descriptor model replaces the earlier Context-only and contexturl proposal. CloudEvents event-link selection and the describedby attribute are specified separately in cloudevents/spec#1406.

This draft is based directly on upstream main and contains the Descriptor work, without the other changes in the fork.

Proposed Changes

  • Add the Descriptor Registry working-draft specification, covering identity, class-typed References, selectors, specialization, publication stability and an optional Descriptor bundle. Ordinary GET remains metadata-only; assembling the bundle requires additional resolver or serving behavior.
  • Include the Descriptor model, sample, rationale and generated JSON Schema, JSON Structure, Avro and OpenAPI formats.
  • Add an opt-in --avro-nullable-optionals generator option for Descriptor Avro generation, with regression coverage. Default generation and the existing top-level Schema, Message, Endpoint and CloudEvents Avro artifacts remain unchanged.
  • Add the draft to the working-drafts index and generation workflow.

Release Note

Add a Descriptor Registry working draft for metadata-only entity descriptions and shared processing context.

Signed-off-by: Marc Schier <marcschier@hotmail.com>
Signed-off-by: Marc Schier <marcschier@hotmail.com>
Signed-off-by: Marc Schier <marcschier@hotmail.com>
Comment thread workingdrafts/models/context/model.json Outdated
"resources": {
"contexts": {
"singular": "context",
"hasdocument": false,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changing this to "true", where the doc is then inlined version of the data so people don't need to do any more GETs, would be a nice addition

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However, if we do this then ce extension value should include $details so by default they get the non-inlined version. This might make the idea too complex, i can't decide if the presence of $details vs not is something that'll confuse people. Granted, in most cases people will just blindly use the URL provided and not even notice that $details is there.

@marcschier marcschier Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pro:

  • It reuses Core's document vs $details mechanism instead of a negotiated media type.
  • If the Publisher stores the bundle, the Registry needs no server-side Target retrieval, outbound request policy or combined cache policy.

Con:

  • On your $details point: the event carries only one of the two URLs. If contexturl includes $details, a Consumer can reach the inlined form only by removing the suffix. That is the URL construction the indirection model was meant to avoid, and §5.1 forbids it. Without $details, every Consumer downloads every Target's content, including Targets it doesn't use.
  • The bundle is a copy. Each Context Version duplicates its Targets' bytes, a Target change reaches Consumers only after a new document is stored, and Core doesn't check that the document agrees with references.
  • With a document, Core would also define a contexturl metadata attribute for an externally stored document. Its meaning differs from the CloudEvents attribute's (README open question 1).
  • If the Registry generates the document instead of the Publisher, we're back to the resolver's retrieval, authorization and caching rules, presented as a document.

The draft therefore keeps the base Context metadata-only. A Registry can serve the inlined form as the resolved view at the same URL, selected by Accept (§7.4). The event URL stays unsuffixed, and Consumers that don't want the bundle never pay for it. Happy to switch if the group prefers the Core document mechanism. I'm leaving this thread open for that discussion.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is that you can't do what's being suggested with a generic xRegistry server. And definitely not with a static file serving xReg endpoint.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right: a generic or static xRegistry server cannot dynamically assemble the bundle. Section 7.4 makes bundle support optional; ordinary JSON remains usable without it. A static deployment would need a prebuilt bundle and suitable content negotiation, subject to the same access and freshness rules. Whether to use Core's document mechanism instead remains an open design trade-off.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The draft has since been redesigned. Descriptors are metadata-only, with extension-owned properties; the generic bundle and server-side Target retrieval are gone. This also means the draft does not provide an inlined bundle.

@duglin

duglin commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

On the call you mentioned consumers caching the GET results and using a changed url as the indicator that they need to refresh their cache. To do that people would need to either create a new resource for each change to the data or version the resource and use the version url instead of the resource url.

Reject fragments in generated absolute-URL schemas, qualify the root POST example, and distinguish Context views from federation, publication, and WoT profiles.

Signed-off-by: Marc Schier <marcschier@hotmail.com>
Require a URI scheme in the generated urlabsolute pattern so validation does not depend on an optional format checker. Clarify Context Version URL caching and record the Context document alternative from review.

Signed-off-by: Marc Schier <marcschier@hotmail.com>
@marcschier

marcschier commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

Agreed, and that is the model the draft assumes. Per §4.2.4, a Context Version URL identifies one fixed set of references. A Publisher MUST NOT change a Version's references once Producers are configured with its URL. To change them, it creates a new Version and reconfigures the Producers (they are typically the same entity in our use case). §5.1 says contexturl SHOULD identify a Context Version. A Context Resource URL returns the default Version, which can change, so Consumers SHOULD bound how long they cache it.

e46561f makes one caveat explicit in §4.2.4: a new Context Version URL signals changed references, not changed Target content. For the URL to change whenever any context changes, the References also have to identify Target Versions; §4.2.2 already says they SHOULD when the Publisher needs a reproducible interpretation. The Publisher then creates a new Context Version when a Reference has to move to a different Target Version.

Document that the proposed WoT CloudEvents profile uses the Context emitter when contexturl is present and does not fall back to source lookup. Keep other profile behavior out of scope.

Signed-off-by: Marc Schier <marcschier@hotmail.com>
@marcschier
marcschier marked this pull request as ready for review November 12, 2026 12:06
Signed-off-by: Marc Schier <marcschier@hotmail.com>
Signed-off-by: Marc Schier <marcschier@hotmail.com>
Rework the Context working draft into a metadata-only Descriptor model with Asset/Device, Actor and Context specializations, named class-typed References, messageref/schemaref selectors, publication stability rules, an optional descriptor bundle and informative CloudEvents describedby, WoT and OPC UA guidance. Define explicit bare-name and absolute-URI class syntax.

Add a disabled-by-default --avro-nullable-optionals generator option, enable it only for the Descriptor Avro schema, and cover opt-in behavior plus unchanged default output in tools/test_schema_generator.py.

Signed-off-by: Marc Schier <marcschier@hotmail.com>
@marcschier marcschier changed the title Add Event Context Registry working draft Add Descriptor Registry working draft Nov 14, 2026
Comment thread workingdrafts/models/descriptor/spec.md Resolved
Comment thread workingdrafts/models/descriptor/spec.md Resolved
Comment thread workingdrafts/models/descriptor/spec.md Resolved
Comment thread workingdrafts/models/descriptor/spec.md Resolved
Comment thread workingdrafts/models/descriptor/spec.md Resolved
Comment thread workingdrafts/models/descriptor/spec.md Resolved
Comment thread workingdrafts/models/descriptor/spec.md Resolved
Comment thread workingdrafts/models/descriptor/spec.md Resolved
Comment thread workingdrafts/models/descriptor/spec.md Resolved
Rewrite the specification in xRegistry domain style, remove Message selection and generic projection provenance, and regenerate Descriptor schemas. Keep WoT and OPC UA profile rules in their owning stacked drafts and link the published companion sources.

Signed-off-by: Marc Schier <marcschier@hotmail.com>
Keep schema as the only base class, use profile-owned URI classes in examples, and define the OpenUSD Descriptor profile separately. Document annotated subject Descriptors with independent processing authority and CE-owned OPC UA metadata conveyance. Rewrite the design rationale while preserving its technical boundaries.

Signed-off-by: Marc Schier <marcschier@hotmail.com>
Signed-off-by: Marc Schier <marcschier@hotmail.com>
Separate Schema and Endpoint profiles from the generic base, integrate the OpenUSD profile in its specification, support ontology class fragments and clarify participant roles and execution observations. Update generated formats and preserve the existing profile and example contracts.

Signed-off-by: Marc Schier <marcschier@hotmail.com>
marcschier and others added 8 commits November 18, 2026 09:02
Signed-off-by: Marc Schier <marcschier@hotmail.com>
Move schema and endpoint selectors to data.schema and data.endpoint, preserving selection and failure behavior. Align shared examples and explanatory WoT selector references without expanding the specifications or changing Core.

Signed-off-by: Marc Schier <marcschier@hotmail.com>
Signed-off-by: Marc Schier <marcschier@hotmail.com>
Signed-off-by: Marc Schier <marcschier@hotmail.com>
Signed-off-by: Marc Schier <marcschier@hotmail.com>
Signed-off-by: Marc Schier <marcschier@hotmail.com>
@marcschier

marcschier commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor Author

@duglin @clemensv can we merge this as it remains working draft? We finish cloud events 1460 and then ad finishing touches here post v1?

Signed-off-by: Marc Schier <marcschier@hotmail.com>
Signed-off-by: Marc Schier <marcschier@hotmail.com>
Signed-off-by: Marc Schier <marcschier@hotmail.com>
Signed-off-by: Marc Schier <marcschier@hotmail.com>
Signed-off-by: Marc Schier <marcschier@hotmail.com>
Signed-off-by: Marc Schier <marcschier@hotmail.com>

# Conflicts:
#	workingdrafts/models/openusd/spec.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants