apache / dubbo

The java implementation of Apache Dubbo. An RPC and microservice framework.
https://dubbo.apache.org/
Apache License 2.0
40.48k stars 26.43k forks source link

Serialization can be negotiated using id to improve performance. #1256

Closed chickenlj closed 3 years ago

chickenlj commented 6 years ago

When user set serialization="hessian2", use corresponding id internally.

diecui1202 commented 6 years ago

@chickenlj Could u pls. describe it with more details?

chickenlj commented 6 years ago

Firstly, this is a performance tuning task. Dubbo internally have a name-id mapping for each serialization implementation, for example,

What I suggest is, use serialization id instead of name whenever we need to negotiate serialization between Provider and Consumer.

  1. the URL registered to the registry.
  2. payload on the wire during an RPC.
chickenlj commented 6 years ago

At present, I think it's no big deal whether we are using serialization name or id. Considering the tasks we have on hand, we can tune it later.