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

Unify the HTTP Apis #673

Open
arjantijms opened this issue Apr 25, 2023 · 4 comments
Open

Unify the HTTP Apis #673

arjantijms opened this issue Apr 25, 2023 · 4 comments
Labels
EE11 Jakarta EE 11 Release jea-linked Linked in jakarta-ee-azdo project

Comments

@arjantijms
Copy link
Contributor

arjantijms commented Apr 25, 2023

Jakarta EE 10 has two competing APIs for HTTP handling; one provided by Servlet, the other by REST.

This is highly undesirable. Both users and other vendors need to learn / support two largely distinct APIs.
AB#51

@edburns edburns added the EE11 Jakarta EE 11 Release label Apr 25, 2023
@hantsy
Copy link

hantsy commented Apr 26, 2023

I hope there is a new standard API to unite common network operations, like Spring ServerExchange(adapt for different protocols, Http, WebSocket, RSocket, gRPC, etc) and DataBuffer(similar to ByteBuffer and Netty ByteBuf), use reactive/async by default.

Publisher<ServerRequest> request = exchange.getRequest();
Publisher<ServerResponse> request = exchange.getResponse();

Switch to blocking/sync by a simple method.

ServerRequest request = exchange.getRequest().toBlocking(an optional timeout);
ServerResponse request = exchange.getResponse().toBlocking();

(also create a client like this)

For Jakarta EE 11, we can consider virtual thread and construct concurrency from the scratch. And refactor the current Servlet, Rest spec, and also requires a context propagate(support sync and async automatically, recognized by all specs, esp CDI, EL, etc) to pass request state through different contexts without explicit copy etc.

@hantsy
Copy link

hantsy commented May 27, 2023

This is highly undesirable. Both users and other vendors need to learn / support two largely distinct APIs.

Maybe define a new specification, and refactor Rest and Servlet/Pages/Faces to use it as base.

@edburns edburns added the jea-linked Linked in jakarta-ee-azdo project label Jul 4, 2023
@hantsy
Copy link

hantsy commented Jul 5, 2023

@edburns Why we need Azure to manage jakarta issues, https://dev.azure.com/jakarta-ee-azdo/jakarta-ee-azdo ?

@hantsy
Copy link

hantsy commented Dec 13, 2023

Helidon4 web server is rewritten from scratched, and embraces VT. The new Http Apis can be inspired from the existing work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EE11 Jakarta EE 11 Release jea-linked Linked in jakarta-ee-azdo project
Projects
None yet
Development

No branches or pull requests

3 participants