Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jakartaee-platform-dev] [servlet-dev] What do we exactly dislike in Servlet?

On Tue, Jul 12, 2022 at 7:10 PM Stuart Douglas <sdouglas@xxxxxxxxxx> wrote:

On Wed, 13 Jul 2022 at 06:21, Joakim Erdfelt <joakim.erdfelt@xxxxxxxxx> wrote:
I think it would make more sense to have an http-core spec.
The basics of serving http as an api.
This means:
  • no sessions
  • no authentication
  • no streaming apis
  • always async (if you want blocking calls, do it yourself.  none of this bolted on broken async that servlet has)
  • no filters (this is just wrappers of the request or the response, and can be genericized)
  • no listeners (pointless specialization, keep it generic)
  • no url-pattern mappings (there's countless ways to map a request to an internal feature, let the users control how they want it)
  • request is an interface (not an abstract class)
  • response is an interface (not an abstract class)
  • no complex war or ear magic
  • no classloader isolation concerns
  • no auto discovery of components
  • no external configuration (xml, json, etc)
  • entirely programmatic
This low level http api would be sufficient to build REST, Servlet, or whatever (grpc?) on top of.
The responsibilities of the http-api impls would be to handle the connections, the exchanges, the http/2+ streams, etc.
Transport concerns, compression, etc.

This is pretty much exactly why we use Vert.x for the core HTTP support in Quarkus, as it provides pretty much everything on this list.


This is how Jetty-12 is architected as well.
Core has no servlet, all async, simple, clean.
We support ee8, ee9, and ee10 running at the same time this way too.

- Joakim

Back to the top