Skip to content

Bi-Directional Semantics

Resources following the KRM pattern describes the desired states (or digital twins) of real-world elements, which are controlled by actuators. They read the desired state from the resource and the actual state from the real-world.
The actuator then aligns the actual state according to the described desired state. This means that changes on both sides may trigger modification operations on the real-world side (even if the desired state has not been modified).

This is in stark contrast to imperative REST APIs. The KRM does not foresee issuing explicit operations to mutate the real world. The executed operations are completely determined by the discovered delta between the desired and actual state. At the same time a projection of the real-world is reported back to the respective resources, making the real-world observable by means of the KRM's control plane.

Actuators work in a bi-directional manner with the common, shared repository.

The term real-world element is used in a very abstract manner. It does not necessarily mean that the elements correlated to actuators and resources in the KRM are physical objects, or even exist outside the control plane. Those elements might just be "virtual" resources. Residing in the same or even another control plane.

The KRM may be cascaded, resources may be used to create and manipulate other resources, which again may cascade to more resources (it is even not necessary, that there is a real-world element at the end of the chain).
For example, in Kubernetes a Deployment resource orchestrates a ReplicaSet resource, both of which are useful higher-level virtual-only abstractions. ReplicaSet further orchestrates a Pod resource, which finally spawns a real-world set of containers.

Funded by the European Union, NextGenerationEU; Supported by Federal Ministry of Economic Affairs and Energy on the basis of a decision by the German Bundestag

Funded by the European Union – NextGenerationEU.

The views and opinions expressed are solely those of the author(s) and do not necessarily reflect the views of the European Union or the European Commission. Neither the European Union nor the European Commission can be held responsible for them.

Logo of SAP SELogo of the Apeiro Reference ArchitectureLogo of the NeoNephos foundation