Skip to content

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

@wba2hi

Description

@wba2hi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions