Skip to content

Distributed Locations

This document holds an example of two geographically distributed ECUs using the TOSCA SofDCar profile.

Scenario

In this example, there are two ECUs. These two ECUs communicate via CAN which is bridged over the cloud, as shown in Figure 1. Thereby, we model the CAN communication application-centric via a direct relationship between the two software components as well as network-centric via explicitly modeling the CAN busses and their connections to the underlying hardware.

Distributed Locations

Figure 1: Distributed Locations

Appendix A "Service Template"

This appendix contains the service template of this guide. The service template is also available as download.

tosca_definitions_version: tosca_simple_yaml_1_3
description: Example of an architecture distributed across several geographical locations.
imports:
    - types.yaml

topology_template:
    node_templates:
        ###################################################
        #
        # Cloud
        #
        ###################################################

        cloud_service:
            type: example.nodes.Cloud.Service
            requirements:
                - host: cloud_provider

        cloud_provider:
            type: example.nodes.Cloud.Provider

        ###################################################
        #
        # Location A
        #
        ###################################################

        a_ecu_software:
            type: example.nodes.ECU.Software
            requirements:
                - host: a_ecu_runtime
                - can: a_can_bus
                - connect: b_ecu_software

        a_ecu_runtime:
            type: example.nodes.ECU.Runtime
            requirements:
                - host: a_ecu_hardware

        a_ecu_hardware:
            type: example.nodes.ECU.Hardware
            requirements:
                - can: a_can_bus

        a_can_bus:
            type: sofdcar.nodes.CAN

        a_can_bridge:
            type: example.nodes.CAN.Bridge
            requirements:
                - can: a_can_bus
                - cloud: cloud_service

        ###################################################
        #
        # Location B
        #
        ###################################################

        b_ecu_software:
            type: example.nodes.ECU.Software
            requirements:
                - host: b_ecu_runtime
                - can: b_can_bus

        b_ecu_runtime:
            type: example.nodes.ECU.Runtime
            requirements:
                - host: b_ecu_hardware

        b_ecu_hardware:
            type: example.nodes.ECU.Hardware
            requirements:
                - can: b_can_bus

        b_can_bus:
            type: sofdcar.nodes.CAN

        b_can_bridge:
            type: example.nodes.CAN.Bridge
            requirements:
                - can: b_can_bus
                - cloud: cloud_service

    groups:
        cloud:
            type: sofdcar.groups.Location
            members:
                - cloud_service
                - cloud_provider

        location_a:
            type: sofdcar.groups.Location
            members:
                - a_ecu_software
                - a_ecu_runtime
                - a_ecu_hardware
                - a_can_bus
                - a_can_bridge

        location_b:
            type: sofdcar.groups.Location
            members:
                - b_ecu_software
                - b_ecu_runtime
                - b_ecu_hardware
                - b_can_bus
                - b_can_bridge

Appendix B "Type Definitions"

This appendix contains the type definitions of this guide. The type definitions are also available as download

tosca_definitions_version: tosca_simple_yaml_1_3
imports:
    - ../../tosca-sofdcar-profile.yaml
    - ../../tosca-sofdcar-profile-extended.yaml

node_types:
    example.nodes.Cloud.Service:
        derived_from: tosca.nodes.SoftwareComponent
        capabilities:
            endpoint:
                type: tosca.capabilities.Endpoint

    example.nodes.Cloud.Provider:
        derived_from: sofdcar.nodes.Cloud
        capabilities:
            host:
                type: tosca.capabilities.Compute

    example.nodes.ECU.Software:
        derived_from: sofdcar.nodes.ECU.Software
        capabilities:
            connect:
                type: sofdcar.capabilities.Endpoint.CAN
        requirements:
            - can:
                  capability: sofdcar.capabilities.Endpoint.CAN
                  relationship: sofdcar.relationships.CAN
                  occurrences: [0, 1]
            - connect:
                  capability: sofdcar.capabilities.Endpoint.CAN
                  relationship: sofdcar.relationships.CAN
                  occurrences: [0, 1]

    example.nodes.ECU.Runtime:
        derived_from: sofdcar.nodes.ECU.Runtime

    example.nodes.ECU.Hardware:
        derived_from: sofdcar.nodes.ECU.Hardware
        requirements:
            - can:
                  capability: sofdcar.capabilities.Endpoint.CAN
                  relationship: sofdcar.relationships.CAN

    example.nodes.CAN.Bridge:
        derived_from: sofdcar.nodes.Root
        requirements:
            - cloud:
                  capability: tosca.capabilities.Endpoint
                  relationship: tosca.relationships.ConnectsTo
            - can:
                  capability: sofdcar.capabilities.Endpoint.CAN
                  relationship: sofdcar.relationships.CAN

Last update: December 13, 2024