Skip to content
New issue

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

[P3] Proposal: fastcodec for Hessian2 #28

Open
felix021 opened this issue Aug 12, 2023 · 3 comments
Open

[P3] Proposal: fastcodec for Hessian2 #28

felix021 opened this issue Aug 12, 2023 · 3 comments
Assignees

Comments

@felix021
Copy link
Contributor

felix021 commented Aug 12, 2023

In the first version of codec-hessian2, we'll be using the dubbo-go-hessian2 to provide encoding and decoding of hessian2.

As the dubbo-go-hessian2 uses reflection, we realize that there's room for further optimization.

So in our implementation of dubbo protocol, we defined two interfaces Encoder and Decoder, so that we can replace it with another library.

This proposal suggests the implemention of a new Hessian2 encoder/decoder to achieve the best performance.

Take thrift as an example:

  • The official (apache) way is to generate all the go code for encoding/decoding, to avoid the use of reflection.
  • Kitex goes further with the fastcodec implementation, by generating the BLength() method to calculate the length of the encoded binary, we can allocate only once before encoding, thus greatly improving the performance.

This proposal suggests to implement a fastcodec library for hessian2.

@felix021 felix021 changed the title Proposal: Hessian2 encoder & decoder Proposal: fastcodec for Hessian2 Aug 15, 2023
@felix021 felix021 changed the title Proposal: fastcodec for Hessian2 [P3] Proposal: fastcodec for Hessian2 Nov 15, 2023
@DMwangnima
Copy link
Collaborator

I want to take this issue.

@DMwangnima DMwangnima self-assigned this Jan 14, 2024
@tiltwind
Copy link

@DMwangnima Will you implement this proposal as a separate library? Hope it can be easily integrated into other framework, not only in kitex.

@DMwangnima
Copy link
Collaborator

@DMwangnima Will you implement this proposal as a separate library? Hope it can be easily integrated into other framework, not only in kitex.

I will take this into consideration so that both kitex and dubbo-go can benefit from this library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants