Skip to content

Commit

Permalink
Digital Twin Graph
Browse files Browse the repository at this point in the history
  • Loading branch information
ashbeitz committed Apr 30, 2024
1 parent 9d5404d commit 2aed358
Show file tree
Hide file tree
Showing 10 changed files with 280 additions and 96 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,26 @@ component "Digital Twin App Server" {
component "Digital Twin Registry Service" {
interface "Digital Twin Registry Interface"
}
component "Invehicle Digital Twin Service" {
interface "Invehicle Digital Twin Interface"
}
component "Managed Subscribe Service" {
interface "Managed Subscribe Interface"
}
}

component "Digital Twin Provider" {
interface "Request Interface"
}

"Digital Twin Provider" -left-> "Digital Twin Registry Interface" : Register
"Digital Twin Provider" -up-> "Digital Twin Registry Interface" : Register

"Digital Twin Consumer" -right-> "Digital Twin Graph Interface" : Find/Get/Set/Invoke
"Digital Twin Consumer" -down-> "Digital Twin Graph Interface" : Find/Get/Set/Invoke

"Digital Twin Graph Service" -down-> "Digital Twin Registry Interface": FindByModelId
"Digital Twin Graph Service" -left-> "Digital Twin Registry Interface": FindByModelId

"Digital Twin Graph Service" -right-> "Request Interface": Ask
"Digital Twin Graph Service" -down-> "Request Interface": Ask

"Digital Twin Provider" -left-> "Respond Interface": Answer
"Digital Twin Provider" -up-> "Respond Interface": Answer

@enduml
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 46 additions & 8 deletions docs/design/modules/digital_twin_graph/diagrams/find_sequence.puml
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,63 @@ participant "Digital Twin Graph" as DIGITAL_TWIN_GRAPH
participant "Digital Twin Registry" as DIGITAL_TWIN_REGISTRY
participant "Digital Twin Provider" as PROVIDER

CONSUMER -> DIGITAL_TWIN_GRAPH: Find(model_id: "dtmi:sdv:vehicle;1") - request
CONSUMER -> DIGITAL_TWIN_GRAPH: Find(model_id: "dtmi:sdv:seat;1") - request

DIGITAL_TWIN_GRAPH -> DIGITAL_TWIN_REGISTRY: FindByModeld(model_id: "dtmi:sdv:vehcile;1") - request
DIGITAL_TWIN_GRAPH -> DIGITAL_TWIN_REGISTRY: FindByModeld(model_id: "dtmi:sdv:seat;1") - request

DIGITAL_TWIN_GRAPH <- DIGITAL_TWIN_REGISTRY: FindByModelId - response
note left
list of value (serialized as a JSON-LD string)
list of EndpointInfo

[
{
model_id : "dtmi:sdv:seat;1"
instance_id: "front left seat"
protocol: "grpc"
operations: ["get", "invoke"]
uri: Digital Twin Provider's uri
},
{
model_id : "dtmi:sdv:seat;1"
instance_id: "front right seat"
protocol: "grpc"
operations: ["get", "invoke"]
uri: Digital Twin Provider's uri
}
]
end note

loop Iterate over the results from the FindByModelId call
DIGITAL_TWIN_GRAPH -> PROVIDER: Ask(respond_uri, ask_id: "1", payload)
DIGITAL_TWIN_GRAPH -> PROVIDER: Ask(respond_uri, ask_id: "2", payload)
DIGITAL_TWIN_GRAPH <- PROVIDER: Answer(ask_id: "1", payload)
DIGITAL_TWIN_GRAPH <- PROVIDER: Answer(ask_id: "2", payload)
DIGITAL_TWIN_GRAPH -> PROVIDER: Ask(respond_uri: respond uri for Digital Twin Graph, ask_id: "1", payload: {instance_id: "front left seat", operation: "get" })
DIGITAL_TWIN_GRAPH <- PROVIDER: Answer(ask_id: "1", payload: instance value as JSON-LD string)
end

CONSUMER <- DIGITAL_TWIN_GRAPH: Find - response
note left
list of EntityAccessInfo
list of instance values as JSON-LD string

[
{
"@context": [ "dtmi:dtdl:context;3", "dtmi:sdv:context;1"]
"@id": "front left seat",
"@type": "dtmi:sdv:seat;1",
"seat_massager": [
{
"@id": "front left seat massager"
}
]
},
{
"@context": [ "dtmi:dtdl:context;3", "dtmi:sdv:context;1"]
"@id": "front right seat",
"@type": "dtmi:sdv:seat;1",
"seat_massager": [
{
"@id": "front right seat massager"
}
]
}
]
end note

@enduml
64 changes: 51 additions & 13 deletions docs/design/modules/digital_twin_graph/diagrams/find_sequence.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 32 additions & 6 deletions docs/design/modules/digital_twin_graph/diagrams/get_sequence.puml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,41 @@ participant "Digital Twin Graph" as DIGITAL_TWIN_GRAPH
participant "Digital Twin Registry" as DIGITAL_TWIN_REGISTRY
participant "Digital Twin Provider" as PROVIDER

CONSUMER -> DIGITAL_TWIN_GRAPH: Get(instance_id: "1234567890", member_path: "vehicle_identification") - request
CONSUMER -> DIGITAL_TWIN_GRAPH: Get(instance_id: "the vehicle", member_path: "vehicle_identification") - request

DIGITAL_TWIN_GRAPH -> DIGITAL_TWIN_REGISTRY: FindByInstanceId(instance_id: "1234567890") - request
DIGITAL_TWIN_GRAPH -> DIGITAL_TWIN_REGISTRY: FindByInstanceId(instance_id: "the vehicle") - request
DIGITAL_TWIN_GRAPH <- DIGITAL_TWIN_REGISTRY: FindByInstanceId - response

DIGITAL_TWIN_GRAPH -> PROVIDER: Ask - Get

DIGITAL_TWIN_GRAPH <- PROVIDER: Answer
note left
list of EndpointInfo

[
{
model_id : "dtmi:sdv:vehicle;1"
instance_id: "the vehicle"
protocol: "grpc"
operations: ["Get"]
uri: Digital Twin Provider's uri
}
]
end note

DIGITAL_TWIN_GRAPH -> PROVIDER: Ask(respond_uri: respond uri for Digital Twin Graph, ask_id: "3", payload: {instance_id: "the vehicle", operation: "get", member_path: "vehicle_identification"})
DIGITAL_TWIN_GRAPH <- PROVIDER: Answer(ask_id: "3", payload: instance value as JSON-LD string)

CONSUMER <- DIGITAL_TWIN_GRAPH: Get - response
note left
instance value as JSON-LD string

{
"@context": [ "dtmi:dtdl:context;3", "dtmi:sdv:context;1"]
"@type": "dtmi:sdv:vehicle:vehicle_identification;1",
"vehicle_identification": [
{
"vin": "1HGCM82633A123456"
}
]
}

end note

@enduml
46 changes: 36 additions & 10 deletions docs/design/modules/digital_twin_graph/diagrams/get_sequence.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,31 @@ participant "Digital Twin Graph" as DIGITAL_TWIN_GRAPH
participant "Digital Twin Registry" as DIGITAL_TWIN_REGISTRY
participant "Digital Twin Provider" as PROVIDER

CONSUMER -> DIGITAL_TWIN_GRAPH: Invoke(instance_id: "1234567890", payload: "") - request
CONSUMER -> DIGITAL_TWIN_GRAPH: Invoke(instance_id: "front left seat massager", member_path: "perform_step", request_payload: request payload as JSON-LD string) - request

DIGITAL_TWIN_GRAPH -> DIGITAL_TWIN_REGISTRY: FindByInstanceId(id: "1234567890") - request
DIGITAL_TWIN_GRAPH -> DIGITAL_TWIN_REGISTRY: FindByInstanceId(id: "front left seat massager") - request
DIGITAL_TWIN_GRAPH <- DIGITAL_TWIN_REGISTRY: FindByInstanceId - response
note left
list of EndpointInfo

DIGITAL_TWIN_GRAPH -> PROVIDER: Ask - request
DIGITAL_TWIN_GRAPH <- PROVIDER: Answer
[
{
model_id : "dtmi:sdv:premium_airbag_seat_massager;1"
instance_id: "front left seat massager"
protocol: "grpc"
operations: ["get", "invoke"]
uri: Digital Twin Provider's uri
}
]

end note

DIGITAL_TWIN_GRAPH -> PROVIDER: Ask(respond_uri: respond uri for Digital Twin Graph, ask_id: "5", payload: {instance_id: "front left seat massager", operation: "invoke", member_path: "perform_step", payload: the request payload as JSON-LD string})
DIGITAL_TWIN_GRAPH <- PROVIDER: Answer(ask_id: "5", payload: response payload as JSON-LD string)

CONSUMER <- DIGITAL_TWIN_GRAPH: Invoke - response
note left
response payload as JSON-LD string
end note

@enduml
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 18 additions & 6 deletions docs/design/modules/digital_twin_graph/diagrams/set_sequence.puml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,26 @@ participant "Digital Twin Graph" as DIGITAL_TWIN_GRAPH
participant "Digital Twin Registry" as DIGITAL_TWIN_REGISTRY
participant "Digital Twin Provider" as PROVIDER

CONSUMER -> DIGITAL_TWIN_GRAPH: Set(instance_id: "1234567890", member_path: "vehicle_identification/vin", value) - request
CONSUMER -> DIGITAL_TWIN_GRAPH: Set(instance_id: "the vehicle", member_path: "vehicle_identification/vin", value: value as JSON-LD string) - request

DIGITAL_TWIN_GRAPH -> DIGITAL_TWIN_REGISTRY: FindByInstanceId(instance_id: "1234567890") - request
DIGITAL_TWIN_GRAPH -> DIGITAL_TWIN_REGISTRY: FindByInstanceId(instance_id: "the vehicle") - request
DIGITAL_TWIN_GRAPH <- DIGITAL_TWIN_REGISTRY: FindByInstanceId - response

DIGITAL_TWIN_GRAPH -> PROVIDER: Ask - Set

DIGITAL_TWIN_GRAPH <- PROVIDER: Answer
note left
list of EndpointInfo

[
{
model_id : "dtmi:sdv:vehicle;1"
instance_id: "the vehicle"
protocol: "grpc"
operations: ["Get"]
uri: Digital Twin Provider's uri
}
]
end note

DIGITAL_TWIN_GRAPH -> PROVIDER: Ask(respond_uri: respond uri for Digital Twin Graph, ask_id: "4", payload: {instance_id: "the vehicle", operation: "set", member_path: "vehicle_identification/vin", payload: the value as JSON-LD string})
DIGITAL_TWIN_GRAPH <- PROVIDER: Answer(ask_id: "4", payload: "")

CONSUMER <- DIGITAL_TWIN_GRAPH: Set - response

Expand Down
34 changes: 23 additions & 11 deletions docs/design/modules/digital_twin_graph/diagrams/set_sequence.svg
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 2aed358

Please sign in to comment.