lidavidm opened a new issue, #37937:
URL: https://github.com/apache/arrow/issues/37937

   ### Describe the enhancement requested
   
   Flight in C++ bypass the Protobuf serializer by specializing a gRPC template 
and doing what is almost certainly an illegal cast to trick gRPC into using our 
specialization. However, gRPC supports a ["generic" 
API](https://github.com/grpc/grpc/issues/33035#issuecomment-1544701100) that 
lets you call methods by name and get back the gRPC byte buffers, which should 
be a safe, officially sanctioned way of doing what we want. The API linked 
there is only applicable to async gRPC, so it would only help our new async 
implementation.
   
   This has a few other benefits:
   - The gRPC template we specialize technically lets us return 
(de)serialization errors, but in practice gRPC crashes if you error. This new 
API would let us handle the error gracefully in Flight code.
   - We could more easily pass in other arguments, like a memory allocator, to 
the (de)serialization code. (gRPC still controls memory allocation, though.)
   - We could implement more complex deserialization code (e.g. optionally 
trying to align buffers for #32276).
   
   ### Component(s)
   
   C++, FlightRPC


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to