eclipse-uprotocol / up-streamer-rust

Generic uStreamer implementation written in Rust
Apache License 2.0
1 stars 13 forks source link

Add a json configurable implementation that supports any of zenoh, mqtt and someip #57

Open ValMobBIllich opened 2 weeks ago

ValMobBIllich commented 2 weeks ago

We currently have a reference implementation for a zenoh-someip streamer. In addition to that there will be an implementation for a zenoh-mqtt streamer coming soon. These implementations can be great for people trying to understand a basic streamer setup or as a reference for people who want to build their own custom implementation using the streamer lib. However it might be nice to have a fully configurable streamer implementation as well, that supports all three transports and only needs to be configured by a config json.

ValMobBIllich commented 2 weeks ago

I put some limited thoughts into what the config json should look like. Not very happy yet... I feel like some of the information is duplicate but maybe it can serve as a starting point.

{
  up_streamer_config: {
    ...
  },
  streamer_uuri: {
    ...
    },
  usubscription_config: {
    ...
  },
  host_transport: "zenoh",
  enabled_transports: [
    "zenoh",
    "mqtt",
    "someip"
  ],
  forwarding: [
    "ZenohToMqtt",
    "ZenohToSomeip",
    "MqttToZenoh",
    "MqttToSomeip",
    "SomeipToZenoh",
    "SomeipToMqtt"
  ],
  zenoh_config: {
    important: "zenohstuff"
  },
  someip_config: {
    important: "someipstuff"
  },
  mqtt_config: {
    important: "mqttstuff"
  }
}
ValMobBIllich commented 2 weeks ago

The flow of the streamer implementation would then be something like this:

  1. get config
  2. set up the streamer
  3. create the host transport
  4. create all other transports
  5. create all endpoints
  6. add all of the selected forwardings to the streamer