Closed jknack closed 7 years ago
@stevehu Here is an update to latest Jooby :)
What do you think of adding a comment when the test run in the IO vs Worker thread?
Jooby for example doesn't allow to run any code in IO thread.
I think most new frameworks won't allow to run business logic in IO thread and this is what non-blocking is about. I think only servlet contain these days are using one thread for the request/response chain.
I got the result published and it is a big improvement compare with the previous version. what has been changed? Yes. My code is using IO thread as for this test it is not necessary to start another thread. For database or other IO access, it will be changed to worker thread.
Somewhere in the path I introduced a performance regression. The 404 handler was creating a lot of garbage per each new request. This wasn't need it (of course), it was just a really silly mistake.
After I fixed that did some minor/micro improvements.
Regarding to the IO thread. Yes, I know we could run this test in the IO thread... just saying we should probably mention it. Running code in the IO thread will always give us better results (of course)
Are you still using servlet container?
Never used a Servlet Container :)
Jooby comes with 3 server implementations Netty, Undertow and Jetty.
Jetty is a servlet container, but I tried to use plain/raw Jetty API as much as possible.
Cool. Then you have a lot of room to go.