<?xml version="1.0" encoding="utf-8"?>
<!-- name="GENERATOR" content="github.com/mmarkdown/mmark Mmark Markdown Processor - mmark.miek.nl" -->
<rfc version="3" ipr="trust200902" docName="draft-henderickx-meta-graph-schema-01" submissionType="IETF" category="std" xml:lang="en" xmlns:xi="http://www.w3.org/2001/XInclude" indexInclude="true">

<front>
<title>Graph based Meta Schema for collaborative Operations</title><seriesInfo value="draft-henderickx-meta-graph-schema-01" stream="IETF" status="standard" name="Internet-Draft"></seriesInfo>
<author role="editor" surname="Henderickx" fullname="Wim Henderickx"><organization>Nokia</organization><address><postal><street></street>
</postal><email>wim.henderickx@nokia.com</email>
</address></author><date/>
<area>Operations and Management </area>
<workgroup>NMOP</workgroup>

<abstract>
<t>Graph based Meta Schema for collaborative Operation</t>
</abstract>

</front>

<middle>

<section anchor="introduction"><name>Introduction</name>
<t>Modern automation environments require systems, users, and agents to
operate on shared data models in a coordinated manner. These models span
heterogeneous technologies and administrative domains. Existing approaches
such as YANG, OpenAPI, JSON Schema , ...primarily define the syntax and
validation of data, but provide limited mechanisms for collaboration,
coordination, and conflict-aware operations across multiple actors.</t>
<t>The Graph-based Meta Schema introduces a unified abstraction that models
resources and their relationships as a knowledge graph, connecting data,
intent, and operational context. This knowledge graph enables multi-actor
automation, where humans, controllers, and services operate on a shared
schema using common semantics and consistent operations.</t>
<t>This document defines three complementary elements:</t>

<ul>
<li><t>A Graph Schema, which specifies how to connect resources modeled
using existing data modeling languages (YANG, OpenAPI, JSON Schema, etc.);</t>
</li>
<li><t>A set of API operations that provide server-side support for
multi-actor collaboration (e.g., conflict management, coordinated
deletion, version control, dry-run, and eventing); and</t>
</li>
<li><t>A standardized Meta Header carried by each resource, which captures
structural and operational metadata—such as identifiers, relationships,
ownership, lifecycle hooks (finalizers), labels, annotations, and
versioning—used by those operations.</t>
</li>
</ul>
<t>This mechanism does not replace existing modeling languages; rather, it
defines a meta-layer that integrates them and standardizes how resources
and relations are described, linked, and managed.</t>
</section>

<section anchor="goals-and-scope"><name>Goals and Scope</name>
<t>The goal of the Graph-based Meta Schema is to define a generalized
mechanism for describing and managing resources through a graph
abstraction, and to standardize the operational semantics required for
multi-actor collaboration.</t>
<t>Design principles:</t>

<ul spacing="compact">
<li>Separation of concerns — existing data models (YANG, OpenAPI,
JSON Schema) define what a resource is; relationships define how
resources interact or depend on one another.</li>
<li>Reuse and extensibility — models are reused across domains and
extended via typed relations and composable schemas.</li>
<li>Simplified data management — graph semantics enable generalized
queries, lookups, and mutations (e.g., GraphQL).</li>
<li>Server-side multi-actor operations — conflict management,
coordinated deletion, versioning, dry-run, and eventing are handled
consistently by the API server.</li>
<li>Unified metadata via Meta Header — identity, relations, ownership,
and lifecycle state are carried within a single metadata structure that
accompanies every resource.</li>
</ul>
</section>

<section anchor="conventions-and-definitions"><name>Conventions and Definitions</name>
<t>The key words &quot;MUST&quot;, &quot;MUST NOT&quot;, &quot;REQUIRED&quot;, &quot;SHALL&quot;, &quot;SHALL NOT&quot;,
&quot;SHOULD&quot;, &quot;SHOULD NOT&quot;, &quot;RECOMMENDED&quot;, &quot;NOT RECOMMENDED&quot;, &quot;MAY&quot;, and
&quot;OPTIONAL&quot; in this document are to be interpreted as described in BCP
14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here.</t>
</section>

<section anchor="conceptual-model"><name>Conceptual Model</name>
<t>The Meta Schema distinguishes between resources (nodes) and
relationships (edges):</t>

<ul>
<li><t>Resource (Graph Node):<br />
Describes <em>what</em> the entity is.  A resource is defined by a schema
(e.g., YANG, OpenAPI, JSON Schema) and identified by its
Group/Version/Kind/Scope tuple.</t>
</li>
<li><t>Relationship (Edge):<br />
Describes <em>how</em> resources interact or depend on each other.  Edges
connect resources using their identifiers and include metadata and
constraints to provide contextual meaning.</t>
</li>
</ul>
<t>This separation of what (resource) and how (relationship) enables
the construction of a knowledge graph that links system intent,
configuration, and operational context.</t>

<artwork><![CDATA[      +------------+
      |  Resource  |  (YANG, JSONSchema,…)
      +------------+
             |
             |  (Relationship / Edge)
             v
      +------------+
      |  Resource  | (YANG, JSONSchema,…)
      +------------+
]]></artwork>
</section>

<section anchor="meta-schema"><name>Meta Schema</name>
<t>The Meta Schema provides a structural and semantic layer that
integrates existing modeling frameworks (e.g., YANG, OpenAPI,
JSON Schema) under a unified model.</t>
<t>The Meta Schema defines:</t>

<ol spacing="compact">
<li>Graph Topology – how resources are linked via typed relations
and its constraints.<br />
</li>
<li>Schema Semantics – how attributes, lists, and maps are defined,
including types, constraints and validation rules.<br />
</li>
<li>Operational Semantics – how API operations (create, update,
delete, apply, watch, etc.) interact with resource state.<br />
</li>
<li>User Semantics – how metadata supports visualization, grouping,
and human-friendly interaction (e.g., labels, icons, colors, categories).</li>
</ol>
<t>This integration allows a single schema definition to be reused across
API servers, UI frameworks, and automation agents/workflows.</t>
</section>

<section anchor="graph-based-schema"><name>Graph based schema</name>
<t>The graph model treats each resource as a Node and each relationship
as an Edge.  Relationships <bcp14>MUST</bcp14> specify direction and type, and
MAY include additional attributes/constraints (e.g., cardinality, constraints, requiredness).</t>
<t>Example relations include:</t>

<ul spacing="compact">
<li>Parent/Child — hierarchical ownership<br />
</li>
<li>RefersTo — loose association between resources<br />
</li>
<li>Implements — specialization or binding to another kind<br />
</li>
<li>DependsOn — operational dependency</li>
</ul>
<t>Each node carries structured metadata such as labels, annotations,
status, and version, allowing tools to reason about topology, impact,
and dependency chains in a consistent way.</t>
</section>

<section anchor="api-operations"><name>API Operations</name>
<t>The Meta Schema defines conventions for API operations acting on
resources. These conventions enable consistent behavior across REST,
GraphQL, and streaming interfaces.</t>
<t>Each operation relies on metadata carried in the Meta Header.
For example, server-side apply uses <tt>managedFields</tt> to detect and
resolve conflicts; <tt>finalizers</tt> govern coordinated deletion; version
identifiers (<tt>generation</tt>, <tt>resourceVersion</tt>) support optimistic
concurrency; and <tt>relationships</tt>/<tt>ownership</tt> guide cascading behavior.</t>
<t>The standardized operations include:</t>

<ul spacing="compact">
<li>Conflict Management — server-side apply and merge policies.</li>
<li>Coordinated Deletion — finalizers and dependent cleanup.</li>
<li>Ownership — modeled via relationships</li>
<li>Multi-Tenancy — resource scoping by tenant or workspace.</li>
<li>Bulk and Dry-Run — batched execution and preview.</li>
<li>Streaming and Eventing — consistent event delivery and change
propagation.</li>
<li>GraphQL Integration — unified query and mutation across resource
graphs.</li>
</ul>
</section>

<section anchor="meta-header"><name>Meta Header</name>
<t>Each resource includes a Meta Header, a standardized metadata
structure that enables coordination between multiple actors and
automation systems. The Meta Header provides a consistent mechanism for
storing structural, operational, and user metadata alongside the
resource specification.</t>
<t>The Meta Header <bcp14>MUST</bcp14> include the following conceptual components:</t>

<ul spacing="compact">
<li><t>TypeMeta:</t>

<ul spacing="compact">
<li>Identifies the resource by <tt>group</tt>, <tt>version</tt>, and <tt>kind</tt>.</li>
</ul></li>
<li><t>ObjectMeta:</t>

<ul spacing="compact">
<li>Identifiers and lifecycle attributes including <tt>name</tt>, <tt>tenant</tt> (if applicable), <tt>uid</tt> (immutable unique identifier), <tt>creationTimestamp</tt>, and optional <tt>deletionTimestamp</tt>.</li>
<li>Opague data: <tt>labels</tt> and <tt>annotations</tt> for opaque metadata.</li>
<li>Relationships: Directed edges to other resources (e.g., ownership, containment, dependency) expressed with typed targets (<tt>group</tt>, <tt>version</tt>, <tt>kind</tt>, <tt>name</tt>, and optionally <tt>tenant</tt>). Ownerships are mdoelled as relationships</li>
<li>Finalizers: Named hooks that delay deletion until cleanup/coordination completes.</li>
<li>ManagedFields: Field-level ownership and last-writer metadata for concurrent edits and server-side apply.</li>
<li>Versioning: <tt>generation</tt> and <tt>resourceVersion</tt> for optimistic concurrency and change tracking.</li>
<li>Tenancy: Scope indicators (e.g., global/workspace/tenant) where applicable.</li>
</ul></li>
</ul>
</section>

<section anchor="example-resource-instance-including-meta-header"><name>Example resource instance including meta header</name>

<artwork><![CDATA[  apiVersion: assets.kuid.dev/v1
  kind: Device
  metadata:
    uid: "c9e1f3d1-7f27-4a1b-9f0f-2c9a1b6f7a42"
    name: router1
    tenant: default
    creationTimestamp: "2025-10-31T12:34:56Z"
    # deletionTimestamp is absent until deletion is requested
    resourceVersion: "7"
    generation: 3
    labels:
      purpose: core
    annotations:
      c4o.dev/displayName: "Router-1"
    relationships:
      - name: site
        target:
          group: location.kuid.dev
          version: v1
          kind: Site
          name: site-paris
          tenant: default
    finalizers:
      - cleanup.c4o.dev
    managedFields:
      - manager: controller.network
        operation: Apply
        fields: [ "spec.interfaces", "spec.routing" ]
  data: <YANG, ...>
]]></artwork>
</section>

<section anchor="example-schema"><name>Example schema</name>

<artwork><![CDATA[apiVersion: apiextensions.c4o.dev/v1
kind: Schema
metadata:
    name: devices.assets.kuid.dev
spec:
    groups:
    - name: assets.kuid.dev
        apis:
        - resource: devices
          kind: Device
          scope: tenant
          ui:
            categories:
            - assets
            - devices
            displayName: Devices
            icon: xxx
            order: 100
          versions:
          - name: v1
            storage: true
            attributes:
            - # YANG, OpenAPI, JSONSchema, ...
            relationships:
            - name: belongsTo
              target: 
                group: location.kuid.dev
                version: v1
                kind: Site
              cardinality: one
            - name: locatedIn
              target: 
                group: assets.kuid.dev
                version: v1
                kind: Rack
              cardinality: one
]]></artwork>
<t>Device - (belongsTo) - Site
Device - (locatedIn) - Rack</t>
</section>

<section anchor="iana-considerations"><name>IANA Considerations</name>
<t>This document has no IANA actions at this time.</t>
</section>

<section anchor="security-considerations"><name>Security Considerations</name>
<t>Schema definitions can expose sensitive structure and metadata about a
system.  Implementations <bcp14>MUST</bcp14> ensure that access control and data
filtering mechanisms prevent unauthorized disclosure.  Field ownership
and event streaming <bcp14>MUST</bcp14> be authenticated and authorized according
to the system’s security model.</t>
</section>

<section anchor="references"><name>References</name>

<ul spacing="compact">
<li>[RFC2119] S. Bradner, <em>Key words for use in RFCs to Indicate
Requirement Levels</em>, March 1997.<br />
</li>
<li>[RFC8174] B. Leiba, <em>Ambiguity of Uppercase vs Lowercase in RFC 2119
Key Words</em>, May 2017.</li>
<li>[RFC7950] The YANG 1.1 Data Modeling Language</li>
</ul>
</section>

<section anchor="acknowledgements" numbered="false"><name>Acknowledgements</name>
<t>The author thanks colleagues and contributors from the network
automation and kubenet community for discussions leading to this work.</t>
</section>

<section anchor="authors-addresses" numbered="false"><name>Authors' Addresses</name>
<t>Wim Henderickx
Nokia
50 Copernicuslaan
2018, Antwerp
Belgium</t>
<t>Email: wim.henderickx@nokia.com</t>
</section>

</middle>

</rfc>
