ayush00git opened a new issue, #3330:
URL: https://github.com/apache/fory/issues/3330
### Feature Request
We will generate code that implements the specialized gRPC interfaces for
serialization, similar to how FlatBuffers integrates with gRPC.
### Is your feature request related to a problem? Please describe
Enable `fory` to work seamlessly with gRPC. Fory will generate the necessary
code to plug into the standard gRPC runtime, allowing users to define services
in `.fdl` files.
### Describe the solution you'd like
### C++ Integration
We will specialize `grpc::SerializationTraits<T>` for Fory types. This
allows gRPC to serialize Fory objects directly into a `grpc::ByteBuffer`
efficiently. This implementation will be header-only and generated by the
compiler.
### Python Integration
We will provide functions that match gRPC's expectation for serializers and
deserializers, enabling Python gRPC services to use Fory objects.
### Describe alternatives you've considered
_No response_
### Additional context
## Implementation Plan
### Code Generation (`fory_compiler`)
We will update the compiler to generate gRPC-compatible code.
- **C++ (`cpp.py`)**:
- Generate `Service.grpc.fb.h`-style files.
- Generate `grpc::SerializationTraits` specializations for Fory
messages.
- Generate gRPC stub and service classes (`MyService::Stub`,
`MyService::Service`).
- **Python (`python.py`)**:
- Generate gRPC stub and servicer classes.
- Generate the `add_MyServiceServicer_to_server` function.
### Runtime Requirements
No new runtime library is required. The generated code will depend only on:
1. Existing Fory headers.
2. Standard `grpc++` and `grpcio` libraries provided by the user.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]