Deprecated (Related to ADR-0001 which was superseded)
This ADR was proposed for cross-language communication in a hybrid C#/Python architecture, but was never implemented. The project uses Python-only architecture (see ADR-0019), eliminating the need for cross-language communication.
Kept for historical reference.
We need efficient, type-safe communication between C# and Python components in our hybrid architecture. The solution should provide:
- Low latency
- Strong typing
- Cross-language compatibility
- Good performance for both small and large payloads
We will use gRPC as the primary communication protocol between C# and Python components.
- Protocol Buffers (protobuf) for interface definition
- gRPC for high-performance RPC
- HTTP/2 for transport
- Code generation for type-safe client/server stubs
- Performance: HTTP/2 multiplexing and binary protocol
- Type Safety: Compile-time type checking
- Language Neutral: Works well with both C# and Python
- Streaming Support: Bidirectional streaming capabilities
- Code Generation: Reduces boilerplate code
- Learning Curve: Developers need to understand protobuf and gRPC concepts
- Tooling: Additional tooling required for code generation
- Debugging: More complex than REST for simple use cases
- Deployment: Requires gRPC runtime in production
- Documentation: Need to maintain .proto files and generated code