-
Notifications
You must be signed in to change notification settings - Fork 45
docs: add example to exchange digital twins #313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
docs: add example to exchange digital twins #313
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thomas, this is awesome.
Really well done, all the work that must have taken a lot of time.
Tested the guide without a problem, and it was really easy to follow.
The requested changes are just minimal.
Thanks for all this work 😄
> **Please** have a look at the `cURL explanation` Notes in the beginning of [Provide Digital Twins](provide-digitaltwins.md) to get more information about cURL. | ||
|
||
This step continues the journey of our digital twin consumer Alice. After the digital twin provider Bob has successfully provided his digital twin via DTR and submodelserver in his EDC. Alice will now consume the digital twin. | ||
We will use plain CLI tools (`curl`) for this, but feel free to use graphical tools such as Postman or Insomnia. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will use plain CLI tools (`curl`) for this, but feel free to use graphical tools such as Postman or Insomnia. | |
We will use plain CLI tools (`curl`) for this, but feel free to use graphical tools such as Postman or Insomnia. |
|
||
### Authorization response | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### Authorization response | ||
|
||
|
||
The response will contain the authorization details, including the `endpoint` and `authorization`which are needed to fetch the data via the data plane. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The response will contain the authorization details, including the `endpoint` and `authorization`which are needed to fetch the data via the data plane. | |
The response will contain the authorization details, including the `endpoint` and `authorization` which are needed to fetch the data via the data plane. |
## Step 5: Fetch data | ||
|
||
Using the {{ENDPOINT}} and {{TOKEN}} from the response, Alice fetches the data. In our example the `uuid` `urn:uuid:b77c6d51-cd1f-4c9d-b5d4-091b22dd306b` for the data is already known. In | ||
real life you would receive this information from the digital twin registry as an endpoint in the submodelDescriptors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not necessary new line here
We have already learned about the response of a catalog request in the [Provide Data](provide-data.md) guide. The response contains a list of assets that Alice can consume from Bob. | ||
|
||
The response (here just an extract) will contain the `@id` `200` of the asset that Alice wants to consume, but also the `@id` `MjAw:MjAw:Y2ZjMzdlNmUtODAwNi00NGJjLWJhMWYtNjJkOWIzZWM0ZTQ3` of the offer | ||
that Alice needs to reference in the negotiation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not necessary new line here
* **Submodel Server** - to create and provide data (so-called submodels) for digital twins based on aspect models | ||
* **EDC** - to connect DTR and Submodel Server to your local dataspace. Both components, DTR and Submodel Server are only accessible via the EDC. | ||
|
||
 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible (if not much work) to modify the background color of Bobs and Alice actions, hard to read white text over it.
``` | ||
### Usage Policy for dDTR | ||
|
||
The usage policy defines the conditions under which data from the decentralized Digital Twin Registry (dDTR) may be utilized. By using a standardized purpose such as **"cx.core.digitalTwinRegistry:1"**, it ensures that all providers within the Catena-X ecosystem employ a consistent usage policy. This enhances the transparency and trustworthiness of the system. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The usage policy defines the conditions under which data from the decentralized Digital Twin Registry (dDTR) may be utilized. By using a standardized purpose such as **"cx.core.digitalTwinRegistry:1"**, it ensures that all providers within the Catena-X ecosystem employ a consistent usage policy. This enhances the transparency and trustworthiness of the system. | |
The usage policy defines the conditions under which data from the decentralized Digital Twin Registry (dDTR) may be utilized. By using a standardized purpose, such as **"cx.core.digitalTwinRegistry:1"**, it ensures that all providers within the Catena-X ecosystem employ a consistent usage policy. This enhances the transparency and trustworthiness of the system. |
``` | ||
## Creating a dDTR Contract Definition | ||
|
||
In common a contract definition always consists out of 1 to n assets, an access policy and 1 to n usage policies. So you should first create a access and usage policy for your registry (like shown above). In common policies can be reused, but please do not reuse the usage policy of the registry for other contract definitions as the purpose of the usage is focused on the dDTR use! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In common a contract definition always consists out of 1 to n assets, an access policy and 1 to n usage policies. So you should first create a access and usage policy for your registry (like shown above). In common policies can be reused, but please do not reuse the usage policy of the registry for other contract definitions as the purpose of the usage is focused on the dDTR use! | |
In common, a contract definition always consists out of 1 to n assets, an access policy and 1 to n usage policies. So you should first create an access and usage policy for your registry (like shown above). In common policies can be reused, but please do not reuse the usage policy of the registry for other contract definitions as the purpose of the usage is focused on the dDTR use! |
``` | ||
## Filter for the dDTR Offer | ||
|
||
If everything is setup like described above, a data consumer should find the dDTR offer in the catalogue with the the catalogue request with the filter expression shown in the example. The filter uses the dct type to filter for the registry offer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If everything is setup like described above, a data consumer should find the dDTR offer in the catalogue with the the catalogue request with the filter expression shown in the example. The filter uses the dct type to filter for the registry offer. | |
If everything is set up like described above, a data consumer should find the dDTR offer in the catalogue with the catalogue request with the filter expression shown in the example. The filter uses the dct type to filter for the registry offer. |
@th0masgl could you make the requested changes? |
Hi @mgarciaLKS , currently in parental leave, will find the time in mid of October... Perhaps @lgblaumeiser can help ? |
What do you say!!! That's great news, don't worry about this PR, I had no idea and besides, it's not a priority. |
Description
This PR extends the user guides with an example how to exchange digital twins between Alice & Bob.
Pre-review checks
Please ensure to do as many of the following checks as possible, before asking for committer review: