-
Notifications
You must be signed in to change notification settings - Fork 66
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
Port to use Jetty-12 core without servlets #235
base: main
Are you sure you want to change the base?
Conversation
🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use -- conventional-commit-lint bot |
The core APIs means that the overheads of the servlet API can be avoided. However, there a number of conveniences that are provided in the servlet implementation that are not easily accessed from the core APIs (eg Charset handling). So this branch is currently build against a SNAPSHOT, as I'm updating jetty to better support this use case. So this is rather premature to open a PR, but I just wanted to make a place holder to show the effort is underway. Probably biggest future hurdle is that jetty-12 requires JDK 17. Future work I'd like to look at is to better support the asynchronous features of Jetty. E.g. we can asynchronously load the multi-parts of a request before we use a blocking thread to invoke the function. |
Hi Greg, thanks for doing this. |
f78acbd
to
4a0e365
Compare
@ludoch Jetty 9 support will continue whilst there are commercial support clients, so October 2024 is not an technical issue. I've gone for the port to Jetty-12 now for a number of reasons:
Can you explain a bit more why the functions currently deployed to java11 cannot be moved to a java17 runtime? The functions compiled in java11 will still run in java17 and there should be no differences in the behaviour that they see. It is not like the full java runtime, where there are servlet changes between the runtimes. Is the issue more about how those functions are deployed? Note that this PR has a green build locally against the SNAPSHOT build of Jetty-12 |
Port the invoker to upgrade to Eclipse Jetty-12 version 12. Specifically using the new core APIs of Eclipse Jetty-12 that allow the overhead of a Servlet container to be avoided. BREAKING CHANGE: use Java 17 or above, as required by Eclipse Jetty-12.
4a0e365
to
5328718
Compare
Port the invoker to upgrade to Eclipse Jetty-12 version 12. Specifically using the new core APIs of Eclipse Jetty-12 that allow the overhead of a Servlet container to be avoided. BREAKING CHANGE: use Java 17 or above, as required by Eclipse Jetty-12.
Port the invoker to upgrade to Eclipse Jetty-12 version 12. Specifically using the new core APIs of Eclipse Jetty-12 that allow the overhead of a Servlet container to be avoided. Several other minor optimizations are included. BREAKING CHANGE: use Java 17 or above, as required by Eclipse Jetty-12.
Port the invoker to upgrade to Eclipse Jetty-12 version 12. Specifically using the new core APIs of Eclipse Jetty-12 that allow the overhead of a Servlet container to be avoided. Several optimizations are included. BREAKING CHANGE: use Java 17 or above, as required by Eclipse Jetty-12.
Port the invoker to upgrade to Eclipse Jetty-12 version 12. Specifically using the new core APIs of Eclipse Jetty-12 that allow the overhead of a Servlet container to be avoided. Several optimizations are included, including the optimization that small writes can be buffered in such a way to avoid chunked responses when possible. BREAKING CHANGE: use Java 17 or above, as required by Eclipse Jetty-12.
Port the invoker to upgrade to Eclipse Jetty-12 version 12. Specifically using the new core APIs of Eclipse Jetty-12 that allow the overhead of a Servlet container to be avoided. Several optimizations are included, including the optimization that small writes can be buffered in such a way to avoid chunked responses when possible. BREAKING CHANGE: use Java 17 or above, as required by Eclipse Jetty-12.
The latest commits have been aimed at improving efficiency. Specifically by moving the buffering below the OutputStream, then we are able to commit responses that are less than the buffer size in a single operation, avoiding the need to use HTTP/1.1 chunking to frame the response. This currently is a green against the latest snapshot of jetty-12 and should would against the soon to be released jetty-12.0.2 |
@ludoch note that I could fairly easily make a lot of the optimizations from this branch in the main branch as well. There is actually no need to use Servlets just for a bit of output stream wrapping etc. The improvements would not be as much as we can achieve with 12, but they would probably be noticeable. |
Port the invoker to upgrade to Eclipse Jetty-12 version 12. Specifically using the new core APIs of Eclipse Jetty-12 that allow the overhead of a Servlet container to be avoided. Several optimizations are included, including the optimization that small writes can be buffered in such a way to avoid chunked responses when possible. BREAKING CHANGE: use Java 17 or above, as required by Eclipse Jetty-12.
See #241 that removes Servlets from the current jetty-9 usage, which should give reasonable savings in memory and CPU. |
This is port of the functions framework to use jetty-12 core APIs.