http server designed for virtual threads

Robert Engels rengels at ix.netcom.com
Mon Oct 30 11:12:41 UTC 2023


It is forked. The JDK httpserver has no capability to upgrade the connection - so websockets are not possible. That was the prime motivation. 

The JDK httpserver also has a bunch of async still with NIO based selectors. All of that was removed to make the code far simpler. Especially around SSL - since the JDK version requires the use of the SSLEngine due to the async. 

> On Oct 30, 2023, at 5:55 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> 
>  On 29/10/2023 18:55, robert engels wrote:
>> Hi all,
>> 
>> Posting here as I think this could be of interest to many that follow this group.
>> 
>> I released a new project that is a http server designed for virtual threads. No async. Simply supply a virtual thread based ExecutorService. It is based on the JDK httpserver and adds websocket support based on nanohttpd.
>> 
>> Feel free to ask any questions.
>> 
> When you say "based on the JDK httpserver", do you mean it uses, or you have forked, the jdk.httpserver code? Just curious what you had to do as HttpServer::setExecutor can already be used to have it create a virtual thread per each HTTP request. We have a few JDK tests that do that to make sure it works.
> 
> -Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20231030/829d66f3/attachment-0001.htm>


More information about the loom-dev mailing list