vert-x3/vertx-service-proxy

Protobuf codec support

vietj opened this issue · 1 comments

vietj commented

In Vert.x 5 we want to support service proxies invocation to be encoded/decoded from/to protobuf as an alternative to JSON.

  • we need to distinguish two cases
    • a service method has a single argument
      • is this argument a data object ? or is it a basic/json type ?
      • the only argument is sent through the event-bus and the codec
    • a service methods has more than one argument
      • we need to wrap those arguments with an argument list

While supporting Protobuf codec, is it possible to support Protobuf generated class (extends com.google.protobuf.GeneratedMessageV3) as service method's arguments and return value?

My case is, there are some data structure defined by Protobuf outside Vert.x app. The app needs to parse and deal with those objects, my current workaround is converting those Protobuf objects to jsons and cooperate with service proxy.