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

How to get data from kuksa-databroker using dart gRpc #23

Open
Athvaith2828 opened this issue Apr 30, 2024 · 4 comments
Open

How to get data from kuksa-databroker using dart gRpc #23

Athvaith2828 opened this issue Apr 30, 2024 · 4 comments

Comments

@Athvaith2828
Copy link

I can able to publish and subscribe to kuksa VSS ( example, Vehicle.speed), using python sdk (kuksa-client), I needs to do the same using gRpc in flutter-dart, I am looking for any basic example for the same . but wouldn't able to find and also would like to know, is it under development as i saw the similar open ticket: Databroker Api: Use cases + Errors #17

@SebastianSchildt
Copy link
Contributor

Hi,

While it should be "technically possible", currently, as far as I know, in KUKSA core team we have nobody working on dart and/or flutter.

I know that Automotive Grade Linux guys are into flutter a bit, AND they use some Kuksa, but I am not sure they have some GRPC example in Dart lying around, maybe @g-scott-murray knows and has some pointers to code

@g-scott-murray
Copy link

We have a some examples of using dart-grpc in AGL, the primary ones are:

https://git.automotivelinux.org/apps/flutter-instrument-cluster/tree/lib/vehicle-signals
(see vss_client.dart and associated provider .dart files)

and:

https://git.automotivelinux.org/apps/flutter-ics-homescreen/tree/lib/data/data_providers
(see val_client.dart and associated provider .dart files, notable vehicle_notifier.dart)

I can't say I would consider any of that code particularly great, and we do have some known issues, e.g. we see an issue in the homescreen with subscription failing after running for a while, and I've so far not had a lot of success handling it and getting back into a working state. That's on my TODO list to look into further in the next couple of months. I may also start looking at using non-Dart code (e.g. tonic in Rust) via FFI, as Toyota tells us that they're doing similar for quite a few things in their homescreen implementation.

@Athvaith2828
Copy link
Author

Thanks for the reply and reference @g-scott-murray,
And one more doubt @SebastianSchildt , I can see the above example uses protos from kuksa/val/v1
Is protos from sdv/databrokerl/v1 is also active in while running ? if yes, then what is the difference and when to use which ?

@SebastianSchildt
Copy link
Contributor

"sdv/databrokerl/v1" is an older API. In current main builds it needs to be explicitely enabled with --enable-databroker-v1, when using the Python SDK only the newer kuksa/val/v1 API (and protos) are used.

If API changes again, usually the strategy is to have a suitably long grace period where the old API is still available. Currently the recommendation is to use only the kuksa/val/v1 , unless you have an urgent need for very high performance/high frequency setting of values. That is being worked on in a newer API (version) or - unfortunately limited to current values only - in the sdv1 API.

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

No branches or pull requests

3 participants