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

[Wishlist / feature request] Add a new okhttp-server module providing a Java IO loom based HTTP Server #7639

Closed
pull-vert opened this issue Jan 6, 2023 · 2 comments
Labels
enhancement Feature not a bug

Comments

@pull-vert
Copy link

pull-vert commented Jan 6, 2023

  • Okio provides really useful InputStream / OutputStream utilities, and is already supported by various HTTP related libraries like moshi or kotlinx-serialization.
  • Okhttp (client-side for now) already provides a lot of the HTTP/1 and HTTP/2 features, a core could be extracted from the current code base so that a new okhttp-server would not be built from scratch.
  • Project Loom provides virtual threads since Java 19 as a preview feature, so a highly efficient HTTP server with one new virtual thread per request is now possible with the good old Java IO ServerSocket, without complex thread pools, and could fully benefit from Okio internally.

I am not sure about the multiplatform part, maybe a JVM only server is good enough !
I am not sure a NIO Server option (along the IO one proposed here) is needed, but it could be done later.

This issue is related to #7576

@pull-vert pull-vert added the enhancement Feature not a bug label Jan 6, 2023
@yschimke
Copy link
Collaborator

yschimke commented Jan 7, 2023

This is not in scope. Building a server requires a different set of tradeoffs than a client. There are so many other great JVM server frameworks we'd never catch up to.

For something Okio inspired, maybe its https://github.com/cashapp/misk

@yschimke yschimke closed this as not planned Won't fix, can't repro, duplicate, stale Jan 7, 2023
@pull-vert
Copy link
Author

I can understand that.

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

No branches or pull requests

2 participants