You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use Eclipse uProtocol for sending vehicle status updates
The FMS Forwarder has been changed to use uProtocol Publish messages for
sending vehicle status updates to the back end (FMS Consumer).
The direct connection to the InfluxDB has been removed in favor
of the Zenoh based uProtocol transport. As an alternative, custom
uProtocol transports for Hono's MQTT adapter and the Kafka messaging
infrastructure have been added.
Copy file name to clipboardExpand all lines: .sdv-blueprint.json
+19-5Lines changed: 19 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,23 @@
3
3
"version": "0.1.0",
4
4
"description": "A close to real-life showcase for truck fleet management where trucks run an SDV software stack so that logistics fleet operators can manage apps, data and services for a diverse set of vehicles.",
Copy file name to clipboardExpand all lines: README.md
+28-36Lines changed: 28 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,27 +29,32 @@ for truck fleet management where trucks run an SDV software stack so that logist
29
29
manage apps, data and services for a diverse set of vehicles.
30
30
31
31
The use case illustrates how the standard VSS model can be customized and used to report data from a vehicle
32
-
to a back end. The following diagram provides an overview of the current architecture:
32
+
to a back end. It also shows how [Eclipse uProtocol™](https://eclipse-uprotocol.github.io) can be used to connect in-vehicle components to an off-vehicle service in the back end. uProtocol provides a generic API for using the well known pub/sub and RPC message exchange patterns over arbitrary transport protocols like MQTT, Eclipse Zenoh etc.
33
33
34
-
<imgsrc="img/architecture.drawio.svg">
34
+
The following component diagram provides a high level overview of the building blocks and how they are related to each other.
35
+
36
+
<imgsrc="img/architecture-uprotocol.drawio.svg">
35
37
36
38
The overall idea is to enable back end applications to consume data coming from a vehicle using the rFMS API.
37
39
38
40
Data originates from the vehicle's sensors which are represented by a CSV file that is being played back by the
39
-
kuksa.val CSV feeder. The CSV feeder publishes the data to the kuksa.val Databroker. From there, the FMS Forwarder
40
-
consumes the data and writes it to an InfluxDB in the back end. The measurements in the InfluxDB can then be
41
-
visualized in a web browser by means of a Grafana dashboard. Alternatively, the measurements can be retrieved by
42
-
a Fleet Management application via the FMS Server's (HTTP based) rFMS API.
41
+
[Eclipse Kuksa™ CSV Provider](https://github.com/eclipse-kuksa/kuksa-csv-provider). The *CSV Provider* publishes
42
+
the data to the [Kuksa Databroker](https://github.com/eclipse-kuksa/kuksa-databroker).
43
+
The *FMS Forwarder* reads the signal values from the Databroker and sends them to the *FMS Consumer* in the back end. The FMS Consumer then writes the measurements to an *InfluxDB* from where it
44
+
can be visualized in a web browser by means of a *Grafana* dashboard. Alternatively, the measurements can be
45
+
retrieved by a Fleet Management application via the *FMS Server's* (HTTP based) rFMS API.
46
+
47
+
Both the FMS Forwarder and Consumer are implemened as uProtocol entities (_uEntity_). This allows the FMS Forwarder to send its data to the Consumer by means of a uProtocol _Notification_. The concrete transport protocol being used to transmit the message on the wire is a matter of configuration and has no impact on the implementation of the business logic itself.
43
48
44
49
# Quick Start
45
50
46
51
The easiest way to set up and start the services is by means of using the Docker Compose file in the top level folder:
47
52
48
53
```sh
49
-
docker compose -f ./fms-blueprint-compose.yaml up --detach
54
+
docker compose -f ./fms-blueprint-compose.yaml -f ./fms-blueprint-compose-zenoh.yaml up --detach
50
55
```
51
56
52
-
This will pull or build (if necessary) the container images and create and start all components.
57
+
This will pull (or build if necessary) the container images and create and start all components.
53
58
54
59
Once all services have been started, the current vehicle status can be viewed on a [Grafana dashboard](http://127.0.0.1:3000),
55
60
using *admin*/*admin* as username and password for logging in.
@@ -61,16 +66,18 @@ The rFMS API can be used to retrieve the data, e.g.
# Using Eclipse Hono to send Vehicle Data to Back End
69
+
# Eclipse Zenoh™ Transport
65
70
66
-
By default, the Docker Compose file starts the FMS Forwarder configured to write vehicle data directly to the
67
-
Influx DB running in the back end.
71
+
The command line from the quick start section will start up containers for the _FMS Forwarder_ and _FMS Consumer_ that are configured to use a [Zenoh](https://zenoh.io) based uProtocol transport as shown in the deployment diagram below:
68
72
69
-
However, in a real world scenario, this tight coupling between the vehicle and the Influx DB is not desirable.
70
-
As an alternative, the blueprint supports configuring the FMS Forwarder to send vehicle data to the MQTT adapter
71
-
of an Eclipse Hono instance as shown in the diagram below.
73
+
<imgsrc="img/architecture-zenoh.drawio.svg">
72
74
73
-
<imgsrc="img/architecture-hono.drawio.svg">
75
+
# Eclipse Hono™ based Transport
76
+
77
+
The blueprint can also be configured to use a Hono based uProtocol transport that employs Hono's MQTT adapter
78
+
and Apache Kafka™ based messaging infrastructure for sending vehicle data to the Consumer.
79
+
80
+
In order to run the blueprint with the Hono transport, perform the following steps:
74
81
75
82
1. Register the vehicle as a device in Hono using the [create-config-hono.sh shell script](./create-config-hono.sh):
76
83
@@ -80,7 +87,7 @@ of an Eclipse Hono instance as shown in the diagram below.
80
87
81
88
Make sure to replace `MY_TENANT_ID`, `MY_DEVICE_ID` and `MY_PWD` with your own values.
82
89
83
-
The script registers the tenant and device in Hono's Sandbox installation at `hono.eclipseprojects.io` unless the
90
+
The script registers the tenant and device in [Hono's Sandbox installation](https://eclipse.dev/hono/sandbox/) at `hono.eclipseprojects.io` unless the
84
91
`--host` and/or `--kafka-brokers` command line arguments are used. Use the `--help` switch to print usage information.
85
92
86
93
The script also creates configuration files in the `OUT_DIR/config/hono` folder. The OUT_DIR can be specified using
@@ -95,25 +102,9 @@ of an Eclipse Hono instance as shown in the diagram below.
95
102
96
103
The path set via the `--env-file` option needs to be adapted to the output folder specified in the previous step.
97
104
98
-
The second compose file specified on the command line will also start the [FMS Consumer](./components/fms-consumer)
99
-
back end component which receives vehicle data via Hono's north bound Kafka based Telemetry API and writes it to the
100
-
Influx DB.
101
-
102
-
# Using Eclipse Zenoh to geographically distribute the vehicle data
103
-
104
-
The blueprint supports configuring the FMS Forwarder to send vehicle data to the Eclipse Zenoh router of an [Eclipse Zenoh](https://zenoh.io/) instance as shown in the diagram below.
105
-
Zenoh router provides a plugin mechanism to other protocols to enable the Vehicle to anything communication.
106
-
107
-
<imgsrc="img/architecture-zenoh.drawio.svg">
105
+
This will result in a deployment as shown below:
108
106
109
-
Start up the vehicle and back end services using Docker Compose:
110
-
111
-
```sh
112
-
docker compose -f ./fms-blueprint-compose.yaml -f ./fms-blueprint-compose-zenoh.yaml up --detach
113
-
```
114
-
115
-
Once all services have been started, the current vehicle status can be viewed on a [Grafana dashboard](http://127.0.0.1:3000),
116
-
using *admin*/*admin* as username and password for logging in.
107
+
<imgsrc="img/architecture-hono.drawio.svg">
117
108
118
109
# Manual configuration
119
110
@@ -125,5 +116,6 @@ Additional information can be found in the components' corresponding subfolders.
125
116
126
117
# Contributing
127
118
128
-
We are looking forward to your ideas and PRs. Each PRs triggers a GitHub action which checks the formating, performs linting and runs the test. You can performe similar check in your development environment. For more details check the respective [action](.github/workflows/lint_source_code.yaml) where the checks are listed in the bottom of the file.
129
-
119
+
We are looking forward to your ideas and PRs. Each PRs triggers a GitHub action which checks the formating, performs
120
+
linting and runs the test. You can performe similar check in your development environment. For more details check the
121
+
respective [action](.github/workflows/lint_source_code.yaml) where the checks are listed in the bottom of the file.
0 commit comments