You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I have a large number of servers which all utilize native Java serialization for communication over an in house networking layer.
I'm evaluating replacing our in house networking layer/RPC code with that generated by gRPC. I'm attempting to avoid making .proto files for all of these objects since many of them are complex with deep and nested composition. Moreover the sheer scale of the objects involved make the project difficult from a testing standpoint. In a later/future state I expect us to use .protos/gRPC for the rare non-java based process communication.
What is the suggested way of attempting this migration? Is basing it off the JSON setup described here (#5048) still the preferred mechanism? If anyone has related sample code it will be greatly appreciated.
Thank you
The text was updated successfully, but these errors were encountered:
Yes, the JSON setup example is preferred mechanism for how to use custom serialization (and encoding) by creating Marshallers for the request and response types. The JSON setup example however quotes a handwritten RPC invocation rather than use a stub generated using the protoc-gen-grpc plugin for codegen.
If you are planning to use the codegen know that it need a service proto that uses protos for request and responses, that you are trying to avoid right now. The best way may be to use a gRPC codegen generated stubs for a simple HelloWorld service as a reference, and replace the Marshallers used in the method descriptors. To avoid handwriting this modified stub for every service, you can make your own simple codegen (either generating code or a annotation processor) or using something like java.lang.reflect.Proxy. Your users could define a Java interface for the RPC, with annotations if necessary, and then your codegen/Proxy would fill in the stub.
Hello, I have a large number of servers which all utilize native Java serialization for communication over an in house networking layer.
I'm evaluating replacing our in house networking layer/RPC code with that generated by gRPC. I'm attempting to avoid making .proto files for all of these objects since many of them are complex with deep and nested composition. Moreover the sheer scale of the objects involved make the project difficult from a testing standpoint. In a later/future state I expect us to use .protos/gRPC for the rare non-java based process communication.
What is the suggested way of attempting this migration? Is basing it off the JSON setup described here (#5048) still the preferred mechanism? If anyone has related sample code it will be greatly appreciated.
Thank you
The text was updated successfully, but these errors were encountered: