3 ms·
Amusingly, Loom, which will likely appear in the Java 17 time-frame will allow you to use all that blocking code and it automatically transforms it into non-blo
by spullara 6y ago
Amusingly, Loom, which will likely appear in the Java 17 time-frame will allow you to use all that blocking code and it automatically transforms it into non-blocking code. Going to make coding high-concurrency applications a lot easier. Check out the few lines of code needed to convert Jetty from blocking to non-blocking:
https://github.com/rodrigovedovato/jetty-loom/blob/master/src/main/java/io/github/rodrigovedovato/letty/infrastructure/LoomThreadPool.java https://github.com/rodrigovedovato/jetty-loom/blob/master/sr...
- hilbertseries 6y agoI'm very skeptical of this conversion into loom. Jetty bounds the number of concurrent requests it serves based on the size of its thread pool (of course Jetty also uses a few of the threads to run its acceptors and selectors). The implementation provided here, replaces Jetty's fixed sized thread pool with an unbounded thread pool. This is going to lead to some terrible failure states when the service slows down.
- kasperni 6y agoThe computational resources of a machine is finite no matter what language you use. You got to put limits somewhere.