Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

Commit

Permalink
docs: add decision record about component IDs (#181)
Browse files Browse the repository at this point in the history
  • Loading branch information
paullatzelsperger authored Aug 7, 2024
1 parent 11d491f commit 8789d3b
Show file tree
Hide file tree
Showing 3 changed files with 164 additions and 0 deletions.
56 changes: 56 additions & 0 deletions developer/decision-records/2024-08-06-components/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Components and IDs

## Decision

In addition to the `edc.participant.id` and `edc.runtime.id` properties, a new ID `edc.component.id` will be introduced.
This is to better reflect the notion of a _components_ and _runtimes_.

## Rationale

Components are logical deployment units, for example a _control plane_, a _data plane_, an _identity hub_, _federated
catalog_ etc. Each component can consist of 1..N _runtimes_, which are individually running processes.

Components are deployed within a _management domain_, which is a realm of control within a company such as a specific
department. While management domains don't exist as first-level technical concept (i.e. there is no
dedicated `edc.management.domain.id`), they are still relevant to understand the hierarchy.

![hierarchical components](components.drawio.png)

An organization participating in a dataspace always has one `participantId`, which is shared by all management domains
and components and runtimes therein. This is the "dataspace identity" of the organization.

A management domain would be analogous to a department operating its own Kubernetes cluster, which can contain several
logically individual _components. A _component_ would be analogous to a Deployment in Kubernetes, having its
own `componentId`. This `componentId` must be stable across restarts and (re-)deployments.

Then, each _component_ consists of 1..N _runtimes_, which are individual processes (usually running in a container).
These would be analogous to individual replica in Kubernetes. Each _runtime_ has its own (random) `runtimeId`.

These IDs have the following properties:

| name | Java property | description | default value | used for |
|-----------------|----------------------|---------------------------------------------------------------------------|---------------|-----------------------------------------|
| `participantId` | `edc.participant.id` | stable, immutable, unique identifier of the organization. Could be a DID. | | DSP/DCP interactions, contracts, VCs |
| `componentId` | `edc.component.id` | stable, unique but internal name that identifies a particular component | random string | data plane registration and selection |
| `runtimeId` | `edc.runtime.id` | random string that is regenerated on every runtime restart | random string | database-level exclusive locks (Leases) |

_Note that management domains only exist as architectural concept, not as a technical element._

## Approach

Assuming that the `runtimeId` was previously used to assign stable IDs and to provide backwards compatibility, the
following changes are required:

- Introduce a new property `edc.component.id` and issue a `WARNING` message if it is not configured.
- Refactor `edc.runtime.id`: if it is configured, issue a `WARNING` and replace the value with a random string. If
the `edc.component.id` is _not_ configured, use the configured `edc.runtime.id` as `edc.component.id`

That way we can guarantee that the `runtimeId` is always randomized, and deployments who had used it as stable
identifier previously maintain the same semantics.

## Additional Notes

This concept is inspired a lot by the hierarchy of typical Kubernetes deployments. This is intentional, as Kubernetes is
the de-facto standard for distributed applications and services in enterprise environments. This certainly does not mean
that EDC _must be run_ on Kubernetes, but most production installations are likely to be on Kubernetes and will thus
mirror the hierarchical concepts.
108 changes: 108 additions & 0 deletions developer/decision-records/2024-08-06-components/components.drawio
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<mxfile host="Electron" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/24.7.5 Chrome/126.0.6478.183 Electron/31.3.0 Safari/537.36" version="24.7.5">
<diagram name="Page-1" id="19d8dcba-68ad-dc05-1034-9cf7b2a963f6">
<mxGraphModel dx="2102" dy="1235" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1100" pageHeight="850" background="none" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="218ae93e1282097f-43" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;labelBackgroundColor=none;endArrow=block;endFill=1;strokeColor=#4D4D4D;strokeWidth=2;fontFamily=Verdana;fontSize=12;fontStyle=1;curved=0;exitX=0.25;exitY=1;exitDx=0;exitDy=0;" parent="1" source="6257edae8c83ed4a-1" target="6257edae8c83ed4a-9" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="218ae93e1282097f-44" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;labelBackgroundColor=none;endArrow=block;endFill=1;strokeColor=#4D4D4D;strokeWidth=2;fontFamily=Verdana;fontSize=12;fontStyle=1;curved=0;entryX=0.363;entryY=-0.01;entryDx=0;entryDy=0;entryPerimeter=0;exitX=0.75;exitY=1;exitDx=0;exitDy=0;" parent="1" source="6257edae8c83ed4a-1" target="UK1I6Zz-eci_4KG3w-kQ-26" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="1347" y="210" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="UK1I6Zz-eci_4KG3w-kQ-24" value="" style="group;dashed=1;fillColor=#b0e3e6;strokeColor=#0e8088;dashPattern=8 8;container=0;" vertex="1" connectable="0" parent="1">
<mxGeometry x="70" y="210" width="630" height="200" as="geometry" />
</mxCell>
<mxCell id="6257edae8c83ed4a-1" value="Organization/Company" style="whiteSpace=wrap;html=1;rounded=0;shadow=0;comic=0;strokeWidth=2;fontFamily=Verdana;align=center;fontSize=12;fontStyle=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1">
<mxGeometry x="620" y="70" width="200" height="50" as="geometry" />
</mxCell>
<mxCell id="UK1I6Zz-eci_4KG3w-kQ-25" value="" style="group;dashed=1;fillColor=none;strokeColor=default;container=0;" vertex="1" connectable="0" parent="1">
<mxGeometry x="760" y="210" width="630" height="200" as="geometry" />
</mxCell>
<mxCell id="6257edae8c83ed4a-9" value="Department A" style="whiteSpace=wrap;html=1;rounded=0;shadow=0;comic=0;strokeWidth=2;fontFamily=Verdana;align=center;fontSize=12;fontStyle=1;verticalAlign=top;dashed=1;" parent="1" vertex="1">
<mxGeometry x="70" y="210" width="630" height="200" as="geometry" />
</mxCell>
<mxCell id="218ae93e1282097f-8" value="&lt;span&gt;Control Plane&lt;/span&gt;" style="whiteSpace=wrap;html=1;rounded=0;shadow=0;comic=0;strokeWidth=2;fontFamily=Verdana;align=center;fontSize=12;fontStyle=1;verticalAlign=top;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="1" vertex="1">
<mxGeometry x="110" y="260" width="230" height="50" as="geometry" />
</mxCell>
<mxCell id="UK1I6Zz-eci_4KG3w-kQ-3" value="&lt;span&gt;CP_2&lt;/span&gt;" style="whiteSpace=wrap;html=1;rounded=0;shadow=0;comic=0;strokeWidth=2;fontFamily=Verdana;align=center;fontSize=12;fontStyle=1;verticalAlign=top;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
<mxGeometry x="170" y="320" width="50" height="50" as="geometry" />
</mxCell>
<mxCell id="UK1I6Zz-eci_4KG3w-kQ-4" value="CP_1" style="whiteSpace=wrap;html=1;rounded=0;shadow=0;comic=0;strokeWidth=2;fontFamily=Verdana;align=center;fontSize=12;fontStyle=1;verticalAlign=top;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
<mxGeometry x="110" y="320" width="50" height="50" as="geometry" />
</mxCell>
<mxCell id="UK1I6Zz-eci_4KG3w-kQ-19" value="&lt;span&gt;CP_N&lt;/span&gt;" style="whiteSpace=wrap;html=1;rounded=0;shadow=0;comic=0;strokeWidth=2;fontFamily=Verdana;align=center;fontSize=12;fontStyle=1;verticalAlign=top;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
<mxGeometry x="290" y="320" width="50" height="50" as="geometry" />
</mxCell>
<mxCell id="UK1I6Zz-eci_4KG3w-kQ-20" value="&lt;span&gt;Data Plane&lt;/span&gt;" style="whiteSpace=wrap;html=1;rounded=0;shadow=0;comic=0;strokeWidth=2;fontFamily=Verdana;align=center;fontSize=12;fontStyle=1;verticalAlign=top;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="410" y="260" width="230" height="50" as="geometry" />
</mxCell>
<mxCell id="UK1I6Zz-eci_4KG3w-kQ-21" value="&lt;span&gt;DP_2&lt;/span&gt;" style="whiteSpace=wrap;html=1;rounded=0;shadow=0;comic=0;strokeWidth=2;fontFamily=Verdana;align=center;fontSize=12;fontStyle=1;verticalAlign=top;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
<mxGeometry x="470" y="320" width="50" height="50" as="geometry" />
</mxCell>
<mxCell id="UK1I6Zz-eci_4KG3w-kQ-22" value="DP_1" style="whiteSpace=wrap;html=1;rounded=0;shadow=0;comic=0;strokeWidth=2;fontFamily=Verdana;align=center;fontSize=12;fontStyle=1;verticalAlign=top;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
<mxGeometry x="410" y="320" width="50" height="50" as="geometry" />
</mxCell>
<mxCell id="UK1I6Zz-eci_4KG3w-kQ-23" value="DP_N" style="whiteSpace=wrap;html=1;rounded=0;shadow=0;comic=0;strokeWidth=2;fontFamily=Verdana;align=center;fontSize=12;fontStyle=1;verticalAlign=top;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
<mxGeometry x="590" y="320" width="50" height="50" as="geometry" />
</mxCell>
<mxCell id="UK1I6Zz-eci_4KG3w-kQ-26" value="Department B" style="whiteSpace=wrap;html=1;rounded=0;shadow=0;comic=0;strokeWidth=2;fontFamily=Verdana;align=center;fontSize=12;fontStyle=1;verticalAlign=top;dashed=1;" vertex="1" parent="1">
<mxGeometry x="760" y="210" width="630" height="200" as="geometry" />
</mxCell>
<mxCell id="UK1I6Zz-eci_4KG3w-kQ-27" value="&lt;span&gt;Control Plane&lt;/span&gt;" style="whiteSpace=wrap;html=1;rounded=0;shadow=0;comic=0;strokeWidth=2;fontFamily=Verdana;align=center;fontSize=12;fontStyle=1;verticalAlign=top;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="800" y="260" width="230" height="50" as="geometry" />
</mxCell>
<mxCell id="UK1I6Zz-eci_4KG3w-kQ-28" value="&lt;span&gt;CP_2&lt;/span&gt;" style="whiteSpace=wrap;html=1;rounded=0;shadow=0;comic=0;strokeWidth=2;fontFamily=Verdana;align=center;fontSize=12;fontStyle=1;verticalAlign=top;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
<mxGeometry x="860" y="320" width="50" height="50" as="geometry" />
</mxCell>
<mxCell id="UK1I6Zz-eci_4KG3w-kQ-29" value="CP_1" style="whiteSpace=wrap;html=1;rounded=0;shadow=0;comic=0;strokeWidth=2;fontFamily=Verdana;align=center;fontSize=12;fontStyle=1;verticalAlign=top;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
<mxGeometry x="800" y="320" width="50" height="50" as="geometry" />
</mxCell>
<mxCell id="UK1I6Zz-eci_4KG3w-kQ-30" value="&lt;span&gt;CP_N&lt;/span&gt;" style="whiteSpace=wrap;html=1;rounded=0;shadow=0;comic=0;strokeWidth=2;fontFamily=Verdana;align=center;fontSize=12;fontStyle=1;verticalAlign=top;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
<mxGeometry x="980" y="320" width="50" height="50" as="geometry" />
</mxCell>
<mxCell id="UK1I6Zz-eci_4KG3w-kQ-31" value="&lt;span&gt;Data Plane&lt;/span&gt;" style="whiteSpace=wrap;html=1;rounded=0;shadow=0;comic=0;strokeWidth=2;fontFamily=Verdana;align=center;fontSize=12;fontStyle=1;verticalAlign=top;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="1100" y="260" width="230" height="50" as="geometry" />
</mxCell>
<mxCell id="UK1I6Zz-eci_4KG3w-kQ-32" value="&lt;span&gt;DP_2&lt;/span&gt;" style="whiteSpace=wrap;html=1;rounded=0;shadow=0;comic=0;strokeWidth=2;fontFamily=Verdana;align=center;fontSize=12;fontStyle=1;verticalAlign=top;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
<mxGeometry x="1160" y="320" width="50" height="50" as="geometry" />
</mxCell>
<mxCell id="UK1I6Zz-eci_4KG3w-kQ-33" value="DP_1" style="whiteSpace=wrap;html=1;rounded=0;shadow=0;comic=0;strokeWidth=2;fontFamily=Verdana;align=center;fontSize=12;fontStyle=1;verticalAlign=top;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
<mxGeometry x="1100" y="320" width="50" height="50" as="geometry" />
</mxCell>
<mxCell id="UK1I6Zz-eci_4KG3w-kQ-34" value="DP_N" style="whiteSpace=wrap;html=1;rounded=0;shadow=0;comic=0;strokeWidth=2;fontFamily=Verdana;align=center;fontSize=12;fontStyle=1;verticalAlign=top;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
<mxGeometry x="1280" y="320" width="50" height="50" as="geometry" />
</mxCell>
<mxCell id="UK1I6Zz-eci_4KG3w-kQ-36" value="" style="endArrow=none;html=1;rounded=0;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="88" y="130" as="sourcePoint" />
<mxPoint x="1718" y="130" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="UK1I6Zz-eci_4KG3w-kQ-37" value="" style="endArrow=none;html=1;rounded=0;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="90" y="315" as="sourcePoint" />
<mxPoint x="1720" y="320" as="targetPoint" />
</mxGeometry>
</mxCell>
<UserObject label="edc.participant.id" placeholders="1" name="Variable" id="UK1I6Zz-eci_4KG3w-kQ-38">
<mxCell style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;fontSize=20;fontFamily=Courier New;" vertex="1" parent="1">
<mxGeometry x="1400" y="72.5" width="290" height="45" as="geometry" />
</mxCell>
</UserObject>
<UserObject label="edc.component.id" placeholders="1" name="Variable" id="UK1I6Zz-eci_4KG3w-kQ-39">
<mxCell style="text;html=1;align=left;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;fontSize=20;fontFamily=Courier New;" vertex="1" parent="1">
<mxGeometry x="1400" y="262.5" width="290" height="45" as="geometry" />
</mxCell>
</UserObject>
<UserObject label="edc.runtime.id" placeholders="1" name="Variable" id="UK1I6Zz-eci_4KG3w-kQ-40">
<mxCell style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;fontSize=20;fontFamily=Courier New;" vertex="1" parent="1">
<mxGeometry x="1400" y="322.5" width="290" height="45" as="geometry" />
</mxCell>
</UserObject>
</root>
</mxGraphModel>
</diagram>
</mxfile>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8789d3b

Please sign in to comment.