Skip to content
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

Group sending of datapoints #3

Merged

Conversation

rafaeling
Copy link
Contributor

@rafaeling rafaeling commented Sep 19, 2024

This PR implements the group sending of datapoints by a newly defined json file.

  • Databroker-perf creates two gRPC channels (one for the provider and one for the subscriber) shared among groups.

  • Each provider will update its group signal values to the Databroker at the cycle time specified (in milliseconds) in the JSON configuration file provided.

  • config_group.json file:

{
  "groups": [
    {
      "group_name": "Frame 1",
      "cycle_time_ms": 10,
      "signals": [
        {
          "path": "Vehicle.Speed"
        }
      ]
    },
    {
      "group_name": "Frame 2",
      "cycle_time_ms": 20,
      "signals": [
        {
          "path": "Vehicle.IsBrokenDown"
        },
        {
          "path": "Vehicle.IsMoving"
        },
        {
          "path": "Vehicle.AverageSpeed"
        }
      ]
    }
  ]
}

Copy link
Contributor

@mikehaller mikehaller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, some minor hints for potential improvement, but nothing critical.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
configs/config_group_1.json Outdated Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
src/main.rs Show resolved Hide resolved
src/measure.rs Outdated Show resolved Hide resolved
src/measure.rs Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
src/measure.rs Outdated Show resolved Hide resolved
src/measure.rs Outdated Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
src/utils.rs Outdated Show resolved Hide resolved
@rafaeling rafaeling force-pushed the feature/group_sending_of_datapoints branch from b3633a4 to 11636c0 Compare September 24, 2024 16:35
src/measure.rs Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
Copy link
Contributor

@erikbosch erikbosch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok to me. Did a sanity test and it seemed to work ok

src/main.rs Outdated Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
src/measure.rs Outdated Show resolved Hide resolved
src/providers/kuksa_val_v1/provider.rs Show resolved Hide resolved
Copy link
Contributor

@argerus argerus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This currently doesn't work with sdv.databroker.v1. I think it has to do with the changes introduced to share a Provider between multiple senders.

My guess is that the issue stems from introducing an Arc<RwLock<<_>> around the provider. I think it would be better to use a clonable Publisher that would wrap the underlying Sender side of the channel that the provider uses to queue up things to publish.

@rafaeling rafaeling force-pushed the feature/group_sending_of_datapoints branch from 6f99acc to fc34e01 Compare October 15, 2024 08:42
Copy link
Contributor

@argerus argerus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is good enough now to enable specifying cycle time per signal.. Not really happy with a number of regressions, but lets improve those in follow up PRs

@rafaeling rafaeling merged commit fd49ba8 into eclipse-kuksa:main Oct 15, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants