Great research and post about http4k on Java adven...
# http4k
d
Great research and post about http4k on Java advent today. And yes, we are looking at official Loom support. ๐Ÿ˜‰ https://www.javaadvent.com/2022/12/asynchronous-functional-web-server-in-kotlin.html
๐Ÿ‘ 8
๐Ÿค˜ 3
๐Ÿ‘๐Ÿพ 1
๐Ÿ‘๐Ÿผ 1
f
Great article! It's also good to hear Loom support in http4k is being looked at ๐Ÿ‘ This is probably old news already, but instead of hand-cranking a ThreadPool using virtual threads and passing that to Jetty like Umberto did in this article, one can just use the normal QueuedThreadPool from Jetty 10, which already supports using virtual threads: https://www.eclipse.org/jetty/documentation/jetty-10/programming-guide/index.html#pg-arch-threads-thread-pool-virtual-threads
d
ooh - that's a good spot!
f
That with Apache client or okhttp configured with an executor using virtual threads and Bob is indeed your uncle ๐Ÿค˜
d
The clients was one thing we were intending to look at.
f
Obviously I cannot leave Jetty client out of this - it has a configuration option to set the executor used, so that should also be fairly trivial to configure to use virtual threads