GH-49548: [C++][FlightRPC] Decouple Flight Serialize/Deserialize from gRPC transport#49549
Open
raulcd wants to merge 3 commits intoapache:mainfrom
Open
GH-49548: [C++][FlightRPC] Decouple Flight Serialize/Deserialize from gRPC transport#49549raulcd wants to merge 3 commits intoapache:mainfrom
raulcd wants to merge 3 commits intoapache:mainfrom
Conversation
…e from gRPC transport
|
|
Member
Author
|
@github-actions crossbow submit -g cpp |
|
Revision: e852d66 Submitted crossbow builds: ursacomputing/crossbow @ actions-c88270abef |
Member
Author
|
CI failures are unrelated. I've run some comparison benchmarks between the old code path and the new code path, the full info can be seen here: Basically run the following to validate: Summary:DoGet benchmark, 4 streams, 1M records/stream (arrow-flight-benchmark)
All values in MB/s. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
Currently the Serialize/Deserialize APIs are gRPC dependent. This means that any code that needs to encode or decode Flight data must depend on gRPC C++ internals. After some discussions around trying to build a PoC using gRPC's generic API with gRPC's BidiReactor we discussed that these primitives should be made gRPC agnostic.
What changes are included in this PR?
cpp/src/arrow/flight/transport/grpc/serialization_internal.{h,cc}tocpp/src/arrow/flight/serialization_internal.ccarrow::Result<arrow::BufferVector> SerializePayloadToBuffers(const FlightPayload& msg)gRPC agnostic function.arrow::Result<arrow::flight::internal::FlightData> DeserializeFlightData(const std::shared_ptr<arrow::Buffer>& buffer)gRPC agnostic function.grpc::ByteBufferandgrpc::Slicedetails.arrow::Result<BufferVector> SerializeToBuffers() const;toFlightPayloadstruct.Are these changes tested?
Yes, both by existing tests and new tests.
Are there any user-facing changes?
No