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

Proposal: add compatibility guide for packages built for net/http #185

Closed
Haswf opened this issue Aug 8, 2022 · 1 comment
Closed

Proposal: add compatibility guide for packages built for net/http #185

Haswf opened this issue Aug 8, 2022 · 1 comment

Comments

@Haswf
Copy link
Contributor

Haswf commented Aug 8, 2022

Is your feature request related to a problem? Please describe.

Compatibility with existing libarays and tools in the web ecosystem is a key factor for mass adoption of Hertz. Yet, Hertz uses a very different design and API, e.g. *http.Request vs *protocol.Request, which made it very challenging to integrate with other library people already femiliar with. As of today, there are 314,984 code snippets uses *http.Handler somewhere.

For instance, the following library/package uses http.Handler interface to register handler.

Describe the solution you'd like

I think it would be worth a paragraph or two to describe how to use tools that built for net/http package in offical documentation. I understand Hertz provides adaptors to get *protocol.Request from *http.Request and http.ResponseWrite from *protocol.Response, but this is not mentioned anywhere in the documentation.
It would also be helpful to address common concerns like performance loss.

Describe alternatives you've considered

As an alternative, we can provide a fews examples on how to integrate Hertz with existing tools. This will make people feel comfortable migrating from existing stack to Hertz.

Additional context

The community has asked a similar question #119 , we should address these type of question in doc once and for all.

@Haswf Haswf changed the title Proposal: add compatibility guide for libraries built for net/http Proposal: add compatibility guide for packages built for net/http Aug 8, 2022
@welkeyever
Copy link
Member

Good point! The job is right in the TODOs, if you are interested in it. Any pr is welcome~

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

No branches or pull requests

4 participants