We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
以gRPC为例,只支持pb生成的类型,不支持pb里定义的原生类型,如int32/string 等。
比如下面的gRPC配置是不合法的,不能返回int32,要定义包装一层:
// The test service definition. service Test { // Sends a greeting rpc SayHello (HelloReply) returns int32; }
目前dubbo里pb支持了原始类型,但 map只支持 <String,String> 。
<String,String>
所以,建议dubbo里去掉原始类型的支持,和gRPC类似,只支持pb生成的类型。
The text was updated successfully, but these errors were encountered:
关于 map 只支持 <String,String>,是因为需要序列化/反序列化 RpcInvocation 中的成员变量 attachments,Dubbo 非常依赖这个对象来传递 RPC 调用的上下文,所以单独为它定义了 proto。具体可参考接口ObjectOutput中定义的 writeAttachments 方法,以及 protobuf 对这个方法的实现。
关于包装返回值和参数,dubbo 本身既支持使用原始类型,也支持使用包装类型,从用户的角度来看,多一个选择总是好的,因此我不赞成去掉对原始类型的支持。
Sorry, something went wrong.
No branches or pull requests
以gRPC为例,只支持pb生成的类型,不支持pb里定义的原生类型,如int32/string 等。
比如下面的gRPC配置是不合法的,不能返回int32,要定义包装一层:
目前dubbo里pb支持了原始类型,但 map只支持
<String,String>
。<String,String>
。所以,建议dubbo里去掉原始类型的支持,和gRPC类似,只支持pb生成的类型。
The text was updated successfully, but these errors were encountered: