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

Remove gRPC (and Proto?) Models from Public API #88

Open
wba2hi opened this issue Feb 28, 2024 · 0 comments
Open

Remove gRPC (and Proto?) Models from Public API #88

wba2hi opened this issue Feb 28, 2024 · 0 comments
Labels
breaking change This issue may introduce a breaking change

Comments

@wba2hi
Copy link
Contributor

wba2hi commented Feb 28, 2024

Describe the solution you'd like
Right now we expose classes from gRPC and protobuf. We should think about resolving the dependency and hide it's internal implementation to the outside to be "independent" from changes inside the models of the external libraries

Examples are:

gRPC:

  • DataBrokerConnector#connect(ManagedChannel,...) -> io.grpc.ManagedChannel

Proto:

  • Property#fields -> org.eclipse.kuksa.proto.v1.Types
  • PropertyListener#onPropertyChanged(List) -> org.eclipse.kuksa.proto.v1.KuksaValV1.EntryUpdate
  • DataBrokerConnection#fetch -> org.eclipse.kuksa.proto.v1.KuksaValV1.GetResponse
  • DataBrokerConnection#update -> org.eclipse.kuksa.proto.v1.KuksaValV1.SetResponse

Describe alternatives you've considered
Leave it as is

Additional context

  • evaluate dis-/advantages of re-wrapping the proto files in kuksa-sdk specific domain models. Maybe the effort to convert all proto models into kuksa-sdk specific models is not worth it. It will also mean a lot of effort when a new protocol is released
  • test if the gRPC dependency in kuksa-sdk can be reduced from api to implementation
  • aliases can not be used as they are not supported by java
@wba2hi wba2hi added the breaking change This issue may introduce a breaking change label Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change This issue may introduce a breaking change
Projects
None yet
Development

No branches or pull requests

1 participant